16 #ifndef __APXX_COEFF_HH 17 #define __APXX_COEFF_HH 73 coeff(
const mpq_class& x);
85 coeff(
int inf,
int sup);
88 coeff(
long inf,
long sup);
91 coeff(
double inf,
double sup);
97 coeff(
const mpq_class& inf,
const mpq_class& sup);
100 coeff(mpfr_t inf, mpfr_t sup);
204 coeff&
set(
const mpq_class& inf,
const mpq_class& sup);
272 void print(FILE* stream=stdout)
const;
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_coeff.hh:401
Definition: apxx_abstract0.hh:27
void reduce()
Converts a singleton intervals to scalar.
Definition: apxx_coeff.hh:461
interval & get_interval()
Returns a (modifiable) reference to the interval contained in the coeff.
Definition: apxx_coeff.hh:253
friend bool operator==(const coeff &a, const coeff &b)
Set equality.
Definition: apxx_coeff.hh:445
friend std::ostream & operator<<(std::ostream &os, const coeff &s)
Printing.
Definition: apxx_coeff.hh:392
void neg()
Negates *this.
Definition: apxx_coeff.hh:466
bool is_zero() const
Whether the coeff is the scalar 0 or the interval [0;0].
Definition: apxx_coeff.hh:410
~coeff()
Definition: apxx_coeff.hh:156
coeff()
Makes a double scalar coeff equal to 0.0.
Definition: apxx_coeff.hh:28
coeff & set(const coeff &x)
Copies the coeff into *this (setting its type and value).
Definition: apxx_coeff.hh:266
const ap_coeff_t * get_ap_coeff_t() const
Returns a pointer to the internal APRON object stored in *this.
Definition: apxx_coeff.hh:484
friend bool operator!=(const coeff &a, const coeff &b)
Set inequality.
Definition: apxx_coeff.hh:450
coeff(const scalar &x)
Makes a scalar coeff from a scalar (copied).
Definition: apxx_coeff.hh:42
coeff & operator=(const coeff &x)
Copies the coeff into *this (setting its type and value).
Definition: apxx_coeff.hh:165
ap_coeff_t c
Structure managed by APRON.
Definition: apxx_coeff.hh:40
long hash() const
Returns a hash code.
Definition: apxx_coeff.hh:476
friend int cmp(const coeff &a, const coeff &b)
Non-total comparison.
Definition: apxx_coeff.hh:415
Coefficient (ap_coeff_t wrapper).
Definition: apxx_coeff.hh:36
Empty interval or domain, to simplify initialisations and assignments.
Definition: apxx_interval.hh:33
scalar & get_scalar()
Returns a (modifiable) reference to the scalar contained in the coeff.
Definition: apxx_coeff.hh:241
coeff operator-() const
Returns the opposite of *this.
Definition: apxx_coeff.hh:471
Full interval (]-oo,+oo[) or domain, to simplify initialisations and assignments.
Definition: apxx_interval.hh:27
friend void swap(coeff &a, coeff &b)
Swaps the contents and type of both coeff.
Definition: apxx_coeff.hh:382
Interval (ap_interval_t wrapper).
Definition: apxx_interval.hh:47
Inherited by most wrappers to map new and delete to malloc and free.
Definition: apxx_scalar.hh:69
ap_coeff_discr_t get_discr() const
Whether the coeff is a scalar or an interval.
Definition: apxx_coeff.hh:236
A fraction with native int coefficients, to simplify initialisations and assignments.
Definition: apxx_scalar.hh:41
Scalar (ap_scalar_t wrapper).
Definition: apxx_scalar.hh:89