16 #ifndef __APXX_LINEXPR1_HH 17 #define __APXX_LINEXPR1_HH 19 #include "ap_linexpr1.h" 181 void print(FILE* stream=stdout)
const;
342 const_iterator
begin()
const;
iterator begin()
Returns a new iterator to traverse and mutate the linear expression.
Definition: apxx_linexpr1.hh:304
Definition: apxx_abstract0.hh:27
environment get_environment() const
Returns the environment of the expression (with incremented reference count).
Definition: apxx_linexpr1.hh:98
const_iterator & operator=(const const_iterator &i)
Assigns the iterator.
Definition: apxx_linexpr1.hh:239
ap_dim_t pos
Internal use only. Current index.
Definition: apxx_linexpr1.hh:246
const ap_linexpr1_t * get_ap_linexpr1_t() const
Returns a pointer to the internal APRON object stored in *this.
Definition: apxx_linexpr1.hh:322
bool valid() const
Whether we are at a valid position (true) or past the last iterator position (false).
Definition: apxx_linexpr1.hh:294
friend std::ostream & operator<<(std::ostream &os, const linexpr1 &s)
Printing.
Definition: apxx_linexpr1.hh:153
Variable name (ap_var_t wrapper).
Definition: apxx_var.hh:39
coeff & get_coeff() const
Returns a (modifiable) reference to the coefficient at the current iterator position.
Definition: apxx_linexpr1.hh:276
const var & get_var() const
Returns the variable name of the coefficient at the current iterator position.
Definition: apxx_linexpr1.hh:260
coeff & get_cst()
Returns a (modifiable) reference to the constant coefficient.
Definition: apxx_linexpr1.hh:123
iterator & operator=(const iterator &i)
Assigns the iterator.
Definition: apxx_linexpr1.hh:246
iterator(ap_linexpr1_t *l)
Internal use only.
Definition: apxx_linexpr1.hh:227
const_iterator(ap_linexpr1_t *l)
Internal use only.
Definition: apxx_linexpr1.hh:209
~linexpr1()
Frees all space for the expression and coefficients, and decrements the reference count of the enviro...
Definition: apxx_linexpr1.hh:64
const linexpr0 & get_linexpr0() const
Returns a reference to the underlying linexpr0.
Definition: apxx_linexpr1.hh:103
Level 1 environment (ap_environment_t wrapper).
Definition: apxx_environment.hh:51
coeff & operator[](const var &v)
Returns a (modifiable) reference to the coefficient corresponding to the given variable name.
Definition: apxx_linexpr1.hh:133
void minimize()
Minimizes all coefficients.
Definition: apxx_linexpr1.hh:313
void next()
Moves the iterator to the following position.
Definition: apxx_linexpr1.hh:283
void print(FILE *stream=stdout) const
Prints to a C stream.
Definition: apxx_linexpr1.hh:165
ap_linexpr_discr_t get_discr() const
Returns the type of underlying linexpr0.
Definition: apxx_linexpr1.hh:118
Level 1 linear expression (ap_linexpr1_t wrapper).
Definition: apxx_linexpr1.hh:39
bool is_quasilinear() const
Whether all coefficients are scalar, except maybe the constant one.
Definition: apxx_linexpr1.hh:194
Coefficient (ap_coeff_t wrapper).
Definition: apxx_coeff.hh:36
ap_linexpr1_t * l
Internal use only. Pointer to the underlying APRON structure.
Definition: apxx_linexpr1.hh:245
bool is_linear() const
Whether all coefficients are scalar.
Definition: apxx_linexpr1.hh:189
Inherited by most wrappers to map new and delete to malloc and free.
Definition: apxx_scalar.hh:69
ap_dim_t get_dim() const
Returns the dimension of the coefficient at the current iterator position.
Definition: apxx_linexpr1.hh:253
ap_linexpr1_t l
Structure managed by APRON.
Definition: apxx_linexpr1.hh:43
linexpr1(ap_linexpr1_t &p)
Internal use only. Shallow copy (no copy of linexpr0 or environment).
Definition: apxx_linexpr1.hh:29
void extend_environment(const environment &e)
Extends the environment of the expression.
Definition: apxx_linexpr1.hh:85
bool is_integer() const
Whether the expression only depends on integer variables.
Definition: apxx_linexpr1.hh:174
void operator++()
Moves the iterator to the following position.
Definition: apxx_linexpr1.hh:289
bool is_real() const
Whether the expression only depends on real variables.
Definition: apxx_linexpr1.hh:179
const coeff & get_coeff() const
Returns a reference to the coefficient at the current iterator position.
Definition: apxx_linexpr1.hh:269
linexpr1 & operator=(const linexpr1 &x)
Makes a (deep) copy.
Definition: apxx_linexpr1.hh:73
Iterator to traverse and mutate a linear expression.
Definition: apxx_linexpr1.hh:306
linexpr1(const linexpr1 &x, const environment &e)
Makes a (deep) copy of x and extends its environment.
Definition: apxx_linexpr1.hh:50
size_t size() const
Returns the number of coefficients in the expression.
Definition: apxx_linexpr1.hh:113
Level 0 linear expression (ap_linexpr0_t wrapper).
Definition: apxx_linexpr0.hh:44
Iterator to traverse a constant linexpr1.
Definition: apxx_linexpr1.hh:235
void skip_AP_DIM_MAX()
Internal use only. Skips free coefficients in sparse expressions.
Definition: apxx_linexpr1.hh:203
ap_linexpr_type_t get_type() const
Gets the type of the linear expression.
Definition: apxx_linexpr1.hh:184