Level 1 linear expression (ap_linexpr1_t wrapper).  
 More...
#include <apxx_linexpr1.hh>
Inherits apron::use_malloc.
|  | 
|  | linexpr1 (ap_linexpr1_t &p) | 
|  | Internal use only. Shallow copy (no copy of linexpr0 or environment). 
 | 
|  | 
|  | 
| ap_linexpr1_t | l | 
|  | Structure managed by APRON. 
 | 
|  | 
|  | 
| void | print (FILE *stream=stdout) const | 
|  | Prints to a C stream. 
 | 
|  | 
Level 1 linear expression (ap_linexpr1_t wrapper). 
Level 1 version of linear expressions with scalar or interval coefficients (coeff). Terms are indexed using variable names (var) instead of dimensions (ap_dim_t). Internally, a linexpr1 wraps together a linexpr0 (memory managed) and an environment (holding a reference count). 
◆ linexpr1() [1/5]
  
  | 
        
          | linexpr1::linexpr1 | ( | ap_linexpr1_t & | p | ) |  |  | inlineprotected | 
 
Internal use only. Shallow copy (no copy of linexpr0 or environment). 
 
 
◆ linexpr1() [2/5]
Creates a new expression from a linexpr0 (copied) and an environment (reference count incremented) associating names to dimensions in linexpr0. 
 
 
◆ linexpr1() [3/5]
  
  | 
        
          | linexpr1::linexpr1 | ( | const environment & | e, |  
          |  |  | ap_linexpr_discr_t | lin_discr = AP_LINEXPR_SPARSE, |  
          |  |  | size_t | size = 0 ) |  | inline | 
 
Creates a new null expression. 
- eassociates a variable name to each dimension.
- discrwhether the expression is sparse (- AP_LINEXPR_SPARSE) or dense (- AP_LINEXPR_DENSE).
- size, for- AP_LINEXPR_SPARSEexpressions, is the initial number of dimensions in the underlying linexpr0 (new dimensions being added as needed); ignored for- AP_LINEXPR_DENSEexpressions (the size being always the size of the environment).
 
 
◆ linexpr1() [4/5]
  
  | 
        
          | linexpr1::linexpr1 | ( | const linexpr1 & | x | ) |  |  | inline | 
 
 
◆ linexpr1() [5/5]
Makes a (deep) copy of x and extends its environment. 
- Exceptions
- 
  
    | std::invalid_argument | if e is not a super-environment of that of x. |  
 
 
 
◆ ~linexpr1()
Frees all space for the expression and coefficients, and decrements the reference count of the environment. 
 
 
◆ begin() [1/2]
Returns a new iterator to traverse and mutate the linear expression. 
 
 
◆ begin() [2/2]
Returns a new constant iterator to traverse the linear expression. 
 
 
◆ extend_environment()
  
  | 
        
          | void linexpr1::extend_environment | ( | const environment & | e | ) |  |  | inline | 
 
Extends the environment of the expression. 
- Exceptions
- 
  
    | std::invalid_argument | if e is not a super-environment of that of *this. |  
 
 
 
◆ get_ap_linexpr1_t() [1/2]
  
  | 
        
          | ap_linexpr1_t * linexpr1::get_ap_linexpr1_t | ( |  | ) |  |  | inline | 
 
Returns a pointer to the internal APRON object stored in *this. 
 
 
◆ get_ap_linexpr1_t() [2/2]
  
  | 
        
          | const ap_linexpr1_t * linexpr1::get_ap_linexpr1_t | ( |  | ) | const |  | inline | 
 
Returns a pointer to the internal APRON object stored in *this. 
 
 
◆ get_cst() [1/2]
  
  | 
        
          | coeff & linexpr1::get_cst | ( |  | ) |  |  | inline | 
 
Returns a (modifiable) reference to the constant coefficient. 
 
 
◆ get_cst() [2/2]
  
  | 
        
          | const coeff & linexpr1::get_cst | ( |  | ) | const |  | inline | 
 
Returns a reference to the constant coefficient. 
 
 
◆ get_discr()
  
  | 
        
          | ap_linexpr_discr_t linexpr1::get_discr | ( |  | ) | const |  | inline | 
 
Returns the type of underlying linexpr0. 
- Returns
- Either AP_LINEXPR_SPARSEorAP_LINEXPR_DENSE.
 
 
◆ get_environment()
Returns the environment of the expression (with incremented reference count). 
 
 
◆ get_linexpr0() [1/2]
Returns a modifiable reference to the underlying linexpr0. 
 
 
◆ get_linexpr0() [2/2]
  
  | 
        
          | const linexpr0 & linexpr1::get_linexpr0 | ( |  | ) | const |  | inline | 
 
Returns a reference to the underlying linexpr0. 
 
 
◆ get_type()
  
  | 
        
          | ap_linexpr_type_t linexpr1::get_type | ( |  | ) | const |  | inline | 
 
Gets the type of the linear expression. 
- Returns
- Either AP_LINEXPR_INTLINEAR(coefficients are interval),AP_LINEXPR_QUASILINEAR(coefficients are scalar except the constant one), orAP_LINEXPR_LINEAR(all coefficients are scalar).
 
 
◆ is_integer()
  
  | 
        
          | bool linexpr1::is_integer | ( |  | ) | const |  | inline | 
 
Whether the expression only depends on integer variables. 
 
 
◆ is_linear()
  
  | 
        
          | bool linexpr1::is_linear | ( |  | ) | const |  | inline | 
 
Whether all coefficients are scalar. 
 
 
◆ is_quasilinear()
  
  | 
        
          | bool linexpr1::is_quasilinear | ( |  | ) | const |  | inline | 
 
Whether all coefficients are scalar, except maybe the constant one. 
 
 
◆ is_real()
  
  | 
        
          | bool linexpr1::is_real | ( |  | ) | const |  | inline | 
 
Whether the expression only depends on real variables. 
 
 
◆ minimize()
  
  | 
        
          | void linexpr1::minimize | ( |  | ) |  |  | inline | 
 
Minimizes all coefficients. 
In sparse expressions, also remove zero and unused (hole) coefficients to save space. 
 
 
◆ operator=()
◆ operator[]() [1/2]
  
  | 
        
          | coeff & apron::linexpr1::operator[] | ( | const var & | v | ) |  |  | inline | 
 
Returns a (modifiable) reference to the coefficient corresponding to the given variable name. 
- Exceptions
- 
  
    | std::invalid_argument | if the variable name is not present in the environment. |  
 
 
 
◆ operator[]() [2/2]
  
  | 
        
          | const coeff & apron::linexpr1::operator[] | ( | const var & | v | ) | const |  | inline | 
 
Returns a reference to the coefficient corresponding to the given variable name. 
- Exceptions
- 
  
    | std::invalid_argument | if the variable name is not present in the environment. |  
 
 
 
◆ print()
  
  | 
        
          | void linexpr1::print | ( | FILE * | stream = stdout | ) | const |  | inline | 
 
 
◆ size()
  
  | 
        
          | size_t linexpr1::size | ( |  | ) | const |  | inline | 
 
Returns the number of coefficients in the expression. 
 
 
  
  | 
        
          | ap_linexpr1_t apron::linexpr1::l |  | protected | 
 
Structure managed by APRON. 
 
 
The documentation for this class was generated from the following files: