APRONXX
0.9.12
|
Coefficient (ap_coeff_t wrapper). More...
#include <apxx_coeff.hh>
Inherits apron::use_malloc.
Public Member Functions | |
Constructors | |
coeff () | |
Makes a double scalar coeff equal to 0.0. More... | |
coeff (const coeff &x) | |
Makes a copy of a coeff. More... | |
coeff (const scalar &x) | |
Makes a scalar coeff from a scalar (copied). More... | |
coeff (int x) | |
Makes a MPQ scalar coeff from a native integer. More... | |
coeff (long x) | |
Makes a MPQ scalar coeff from a native integer. More... | |
coeff (double x) | |
Makes a double scalar coeff from a double. More... | |
coeff (const frac &x) | |
Makes a MPQ scalar coeff from a fraction with native integer coefficients. More... | |
coeff (const mpq_class &x) | |
Makes a MPQ scalar coeff from a MPQ (copied). More... | |
coeff (mpfr_t x) | |
Makes a MPFR scalar coeff from a MPFR (copied). More... | |
coeff (const interval &x) | |
Makes an interval coeff from an interval (copied). More... | |
coeff (const scalar &inf, const scalar &sup) | |
Makes an interval coeff from two scalar bounds (copied). More... | |
coeff (int inf, int sup) | |
Makes an interval coeff with MPQ bounds from native integer bounds. More... | |
coeff (long inf, long sup) | |
Makes an interval coeff with MPQ bounds from native integer bounds. More... | |
coeff (double inf, double sup) | |
Makes an interval coeff with double bounds from double bounds. More... | |
coeff (const frac &inf, const frac &sup) | |
Makes an interval coeff with MPQ bounds from fractions with native integer coefficients. More... | |
coeff (const mpq_class &inf, const mpq_class &sup) | |
Makes an interval coeff with MPQ bounds from MPQ bounds (copied). More... | |
coeff (mpfr_t inf, mpfr_t sup) | |
Makes an interval coeff with MPFR bounds from MPFR bounds (copied). More... | |
coeff (top t) | |
Makes an interval coeff representing ]-oo,+oo[. More... | |
coeff (bottom t) | |
Makes an empty interval coeff [+1;-1]. More... | |
Destructor | |
~coeff () | |
Accesses | |
ap_coeff_discr_t | get_discr () const |
Whether the coeff is a scalar or an interval. More... | |
scalar & | get_scalar () |
Returns a (modifiable) reference to the scalar contained in the coeff. More... | |
const scalar & | get_scalar () const |
Returns a reference to the scalar contained in the coeff. More... | |
interval & | get_interval () |
Returns a (modifiable) reference to the interval contained in the coeff. More... | |
const interval & | get_interval () const |
Returns a reference to the interval contained in the coeff. More... | |
Operators | |
void | reduce () |
Converts a singleton intervals to scalar. More... | |
void | neg () |
Negates *this. More... | |
coeff | operator- () const |
Returns the opposite of *this. More... | |
long | hash () const |
Returns a hash code. More... | |
C API compatibility | |
const ap_coeff_t * | get_ap_coeff_t () const |
Returns a pointer to the internal APRON object stored in *this. More... | |
ap_coeff_t * | get_ap_coeff_t () |
Returns a pointer to the internal APRON object stored in *this. More... | |
![]() | |
void * | operator new (size_t sz) |
void * | operator new[] (size_t sz) |
void | operator delete (void *p) |
void | operator delete[] (void *p) |
Protected Attributes | |
ap_coeff_t | c |
Structure managed by APRON. More... | |
Assignments | |
coeff & | operator= (const coeff &x) |
Copies the coeff into *this (setting its type and value). More... | |
coeff & | operator= (const scalar &x) |
Copies the scalar into *this, setting its type to scalar coeff. More... | |
coeff & | operator= (int x) |
Assigns a native integer to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | operator= (long x) |
Assigns a native integer to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | operator= (double x) |
Assigns a double to *this, setting its type to double scalar coeff. More... | |
coeff & | operator= (const frac &x) |
Assigns a native integer fraction to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | operator= (const mpq_class &x) |
Assigns a MPQ to *this, setting its type to MPQ scalar coeff and copying the MPQ. More... | |
coeff & | operator= (mpfr_t x) |
Assigns a MPFR to *this, setting its type to MPFR scalar coeff and copying the MPFR. More... | |
coeff & | operator= (const interval &x) |
Copies the interval into *this, setting its type to interval coeff. More... | |
coeff & | operator= (top t) |
Set *this to the top interval (]-oo;+oo[), setting its type to interval coeff. More... | |
coeff & | operator= (bottom t) |
Set *this to the empty interval ([+1;-1])., setting its type to interval coeff. More... | |
coeff & | set (const coeff &x) |
Copies the coeff into *this (setting its type and value). More... | |
coeff & | set (const scalar &x) |
Copies the scalar into *this, setting its type to scalar coeff. More... | |
coeff & | set (int x) |
Assigns a native integer to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | set (long x) |
Assigns a native integer to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | set (double x) |
Assigns a double to *this, setting its type to double scalar coeff. More... | |
coeff & | set (const frac &x) |
Assigns a native integer fraction to *this, setting its type to MPQ scalar coeff. More... | |
coeff & | set (const mpq_class &x) |
Assigns a MPQ to *this, setting its type to MPQ scalar coeff and copying the MPQ. More... | |
coeff & | set (mpfr_t x) |
Assigns a MPFR to *this, setting its type to MPFR scalar coeff and copying the MPFR. More... | |
coeff & | set (const interval &x) |
Copies the interval into *this, setting its type to interval coeff. More... | |
coeff & | set (const scalar &inf, const scalar &sup) |
Sets *this to an interval coeff with the given scalar bounds (copied). More... | |
coeff & | set (int inf, int sup) |
Sets *this to an interval coeff with MPQ scalar bounds. More... | |
coeff & | set (long inf, long sup) |
Sets *this to an interval coeff with MPQ scalar bounds. More... | |
coeff & | set (double inf, double sup) |
Sets *this to an interval coeff with double scalar bounds. More... | |
coeff & | set (const frac &inf, const frac &sup) |
Sets *this to an interval coeff with MPQ scalar bounds. More... | |
coeff & | set (const mpq_class &inf, const mpq_class &sup) |
Sets *this to an interval coeff with MPQ scalar bounds (copied). More... | |
coeff & | set (mpfr_t inf, mpfr_t sup) |
Sets *this to an interval coeff with MPFR scalar bounds (copied). More... | |
coeff & | set (top t) |
Sets *this to the top interval (]-oo;+oo[), setting its type to interval coeff. More... | |
coeff & | set (bottom t) |
Sets *this to the empty interval ([+1;-1])., setting its type to interval coeff. More... | |
void | swap (coeff &a, coeff &b) |
Swaps the contents and type of both coeff. More... | |
Printing | |
void | print (FILE *stream=stdout) const |
Prints to a C stream. More... | |
std::ostream & | operator<< (std::ostream &os, const coeff &s) |
Printing. More... | |
Tests | |
bool | is_zero () const |
Whether the coeff is the scalar 0 or the interval [0;0]. More... | |
int | cmp (const coeff &a, const coeff &b) |
Non-total comparison. More... | |
bool | operator== (const coeff &a, const coeff &b) |
Set equality. More... | |
bool | operator!= (const coeff &a, const coeff &b) |
Set inequality. More... | |
Coefficient (ap_coeff_t wrapper).
A coeff is either a scalar or an interval.
|
inline |
Makes a double scalar coeff equal to 0.0.
|
inline |
Makes a copy of a coeff.
|
inline |
Makes a scalar coeff from a scalar (copied).
|
inline |
Makes a MPQ scalar coeff from a native integer.
|
inline |
Makes a MPQ scalar coeff from a native integer.
|
inline |
Makes a double scalar coeff from a double.
|
inline |
Makes a MPQ scalar coeff from a fraction with native integer coefficients.
|
inline |
Makes a MPQ scalar coeff from a MPQ (copied).
|
inline |
Makes a MPFR scalar coeff from a MPFR (copied).
|
inline |
Makes an interval coeff from an interval (copied).
Makes an interval coeff from two scalar bounds (copied).
|
inline |
Makes an interval coeff with MPQ bounds from native integer bounds.
|
inline |
Makes an interval coeff with MPQ bounds from native integer bounds.
|
inline |
Makes an interval coeff with double bounds from double bounds.
Makes an interval coeff with MPQ bounds from fractions with native integer coefficients.
|
inline |
Makes an interval coeff with MPQ bounds from MPQ bounds (copied).
|
inline |
Makes an interval coeff with MPFR bounds from MPFR bounds (copied).
|
inline |
Makes an interval coeff representing ]-oo,+oo[.
|
inline |
Makes an empty interval coeff [+1;-1].
|
inline |
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inline |
Returns a pointer to the internal APRON object stored in *this.
|
inline |
Whether the coeff is a scalar or an interval.
AP_COEFF_SCALAR
or AP_COEFF_INTERVAL
.
|
inline |
Returns a (modifiable) reference to the interval contained in the coeff.
bad_discriminant | when the coeff is not of interval type |
|
inline |
Returns a reference to the interval contained in the coeff.
bad_discriminant | when the coeff is not of interval type |
|
inline |
Returns a (modifiable) reference to the scalar contained in the coeff.
bad_discriminant | when the coeff is not of scalar type |
|
inline |
Returns a reference to the scalar contained in the coeff.
bad_discriminant | when the coeff is not of scalar type |
|
inline |
Returns a hash code.
|
inline |
Whether the coeff is the scalar 0 or the interval [0;0].
|
inline |
Negates *this.
|
inline |
Returns the opposite of *this.
Copies the coeff into *this (setting its type and value).
Copies the scalar into *this, setting its type to scalar coeff.
|
inline |
Assigns a native integer to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a native integer to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a double to *this, setting its type to double scalar coeff.
Assigns a native integer fraction to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a MPQ to *this, setting its type to MPQ scalar coeff and copying the MPQ.
|
inline |
Assigns a MPFR to *this, setting its type to MPFR scalar coeff and copying the MPFR.
Copies the interval into *this, setting its type to interval coeff.
Set *this to the top interval (]-oo;+oo[), setting its type to interval coeff.
Set *this to the empty interval ([+1;-1])., setting its type to interval coeff.
|
inline |
Prints to a C stream.
|
inline |
Converts a singleton intervals to scalar.
Copies the coeff into *this (setting its type and value).
Copies the scalar into *this, setting its type to scalar coeff.
|
inline |
Assigns a native integer to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a native integer to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a double to *this, setting its type to double scalar coeff.
Assigns a native integer fraction to *this, setting its type to MPQ scalar coeff.
|
inline |
Assigns a MPQ to *this, setting its type to MPQ scalar coeff and copying the MPQ.
|
inline |
Assigns a MPFR to *this, setting its type to MPFR scalar coeff and copying the MPFR.
Copies the interval into *this, setting its type to interval coeff.
Sets *this to an interval coeff with the given scalar bounds (copied).
|
inline |
Sets *this to an interval coeff with MPQ scalar bounds.
|
inline |
Sets *this to an interval coeff with MPQ scalar bounds.
|
inline |
Sets *this to an interval coeff with double scalar bounds.
Sets *this to an interval coeff with MPQ scalar bounds.
|
inline |
Sets *this to an interval coeff with MPQ scalar bounds (copied).
|
inline |
Sets *this to an interval coeff with MPFR scalar bounds (copied).
Sets *this to the top interval (]-oo;+oo[), setting its type to interval coeff.
Sets *this to the empty interval ([+1;-1])., setting its type to interval coeff.
|
friend |
Printing.
|
protected |
Structure managed by APRON.