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;
291 friend bool operator<= (const coeff& a, const coeff& b);
294 friend bool operator>= (const coeff& a, const coeff& b);
297 friend bool operator< (const coeff& a, const coeff& b);
300 friend bool operator> (const coeff& a, const coeff& b);
scalar & get_scalar()
Returns a (modifiable) reference to the scalar contained in the coeff.
Definition apxx_coeff.hh:241
friend bool operator!=(const coeff &a, const coeff &b)
Set inequality.
Definition apxx_coeff.hh:450
coeff & operator=(const coeff &x)
Copies the coeff into *this (setting its type and value).
Definition apxx_coeff.hh:165
long hash() const
Returns a hash code.
Definition apxx_coeff.hh:476
ap_coeff_discr_t get_discr() const
Whether the coeff is a scalar or an interval.
Definition apxx_coeff.hh:236
coeff & set(const coeff &x)
Copies the coeff into *this (setting its type and value).
Definition apxx_coeff.hh:266
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition apxx_coeff.hh:401
~coeff()
Definition apxx_coeff.hh:156
friend bool operator==(const coeff &a, const coeff &b)
Set equality.
Definition apxx_coeff.hh:445
coeff(const mpq_class &x)
Makes a MPQ scalar coeff from a MPQ (copied).
Definition apxx_coeff.hh:72
coeff(const frac &x)
Makes a MPQ scalar coeff from a fraction with native integer coefficients.
Definition apxx_coeff.hh:66
void neg()
Negates *this.
Definition apxx_coeff.hh:466
friend std::ostream & operator<<(std::ostream &os, const coeff &s)
Printing.
Definition apxx_coeff.hh:392
friend int cmp(const coeff &a, const coeff &b)
Non-total comparison.
Definition apxx_coeff.hh:415
bool is_zero() const
Whether the coeff is the scalar 0 or the interval [0;0].
Definition apxx_coeff.hh:410
coeff()
Makes a double scalar coeff equal to 0.0.
Definition apxx_coeff.hh:28
void reduce()
Converts a singleton intervals to scalar.
Definition apxx_coeff.hh:461
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
interval & get_interval()
Returns a (modifiable) reference to the interval contained in the coeff.
Definition apxx_coeff.hh:253
coeff operator-() const
Returns the opposite of *this.
Definition apxx_coeff.hh:471
ap_coeff_t c
Structure managed by APRON.
Definition apxx_coeff.hh:40
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
Scalar (ap_scalar_t wrapper).
Definition apxx_scalar.hh:89
Definition apxx_abstract0.hh:27
Empty interval or domain, to simplify initialisations and assignments.
Definition apxx_interval.hh:33
A fraction with native int coefficients, to simplify initialisations and assignments.
Definition apxx_scalar.hh:41
Full interval (]-oo,+oo[) or domain, to simplify initialisations and assignments.
Definition apxx_interval.hh:27
Inherited by most wrappers to map new and delete to malloc and free.
Definition apxx_scalar.hh:69