Level 1 generator (ap_generator1_t wrapper).  
 More...
#include <apxx_generator1.hh>
Inherits apron::use_malloc.
|  | 
|  | generator1 (ap_generator1_t p) | 
|  | Internal use only. Shallow copy (no copy of generator0 or environment). 
 | 
|  | 
|  | 
| ap_generator1_t | l | 
|  | Structure managed by APRON. 
 | 
|  | 
|  | 
| void | print (FILE *stream=stdout) const | 
|  | Prints to a C stream. 
 | 
|  | 
Level 1 generator (ap_generator1_t wrapper). 
Level 1 version of linear generators with scalar coefficients (coeff). Terms are indexed using variable names (var) instead of dimensions (ap_dim_t). Internally, a generator1 wraps together a generator0 (memory managed) and an environment (holding a reference count). 
◆ generator1() [1/6]
  
  | 
        
          | generator1::generator1 | ( | ap_generator1_t | p | ) |  |  | inlineprotected | 
 
Internal use only. Shallow copy (no copy of generator0 or environment). 
 
 
◆ generator1() [2/6]
Creates a new generator from a generator0 (copied) and an environment (reference count incremented) associating names to dimensions in generator0. 
 
 
◆ generator1() [3/6]
  
  | 
        
          | generator1::generator1 | ( | const environment & | e, |  
          |  |  | ap_gentyp_t | gentyp = AP_GEN_RAY ) |  | inline | 
 
Creates a new generator from an empty linear expression. 
The linear expression is created sparse and empty (has_linexpr returns true). 
- eassociates a variable name to each dimension (reference counter incremented).
- gentypcan be AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD.
 
 
◆ generator1() [4/6]
  
  | 
        
          | generator1::generator1 | ( | ap_gentyp_t | gentyp, |  
          |  |  | const linexpr1 & | lin ) |  | inline | 
 
Creates a new generator from a linear expression (copied). 
- eassociates a variable name to each dimension (reference counter incremented).
- gentypcan be AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD.
- Warning
- linshould have only scalar (non-interval) coefficients (unchecked).
 
 
◆ generator1() [5/6]
(Deep) copy of a generator. 
 
 
◆ generator1() [6/6]
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. |  
 
 
 
◆ ~generator1()
  
  | 
        
          | generator1::~generator1 | ( |  | ) |  |  | inline | 
 
Frees all space for the generator, and decrements the reference count of the environment. 
 
 
◆ extend_environment()
  
  | 
        
          | void generator1::extend_environment | ( | const environment & | e | ) |  |  | inline | 
 
Extends the environment of the generator. 
- Exceptions
- 
  
    | std::invalid_argument | if e is not a super-environment of that of *this. |  
 
 
 
◆ get_ap_generator1_t() [1/2]
  
  | 
        
          | ap_generator1_t * generator1::get_ap_generator1_t | ( |  | ) |  |  | inline | 
 
Returns a pointer to the internal APRON object stored in *this. 
 
 
◆ get_ap_generator1_t() [2/2]
  
  | 
        
          | const ap_generator1_t * generator1::get_ap_generator1_t | ( |  | ) | const |  | inline | 
 
Returns a pointer to the internal APRON object stored in *this. 
 
 
◆ get_cst() [1/2]
  
  | 
        
          | coeff & generator1::get_cst | ( |  | ) |  |  | inline | 
 
Returns a (modifiable) reference to the constant coefficient. 
- Exceptions
- 
  
    | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
◆ get_cst() [2/2]
  
  | 
        
          | const coeff & generator1::get_cst | ( |  | ) | const |  | inline | 
 
Returns a reference to the constant coefficient. 
- Exceptions
- 
  
    | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
◆ get_environment()
Returns the environment of the generator (with incremented reference count). 
 
 
◆ get_generator0() [1/2]
Returns a (modifiable) reference to the underlying generator0. 
 
 
◆ get_generator0() [2/2]
  
  | 
        
          | const generator0 & generator1::get_generator0 | ( |  | ) | const |  | inline | 
 
 
◆ get_gentyp() [1/2]
  
  | 
        
          | ap_gentyp_t & generator1::get_gentyp | ( |  | ) |  |  | inline | 
 
Returns a (modifiable) reference to the constraint type. 
- Returns
- either AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD. 
 
 
◆ get_gentyp() [2/2]
  
  | 
        
          | const ap_gentyp_t & generator1::get_gentyp | ( |  | ) | const |  | inline | 
 
Returns a reference to the constraint type. 
- Returns
- either AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD. 
 
 
◆ get_linexpr()
  
  | 
        
          | linexpr1 generator1::get_linexpr | ( |  | ) | const |  | inline | 
 
Returns a copy of the underlying linear expression. 
- Exceptions
- 
  
    | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
◆ has_linexpr()
  
  | 
        
          | bool generator1::has_linexpr | ( |  | ) | const |  | inline | 
 
Whether the generator has a valid linear expression. 
- Note
- The only way the linear expression may be invalid is when accessing fields of uninitialised (or enlarged) generator1_array. 
 
 
◆ operator=()
◆ operator[]() [1/2]
  
  | 
        
          | coeff & apron::generator1::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. |  | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
◆ operator[]() [2/2]
  
  | 
        
          | const coeff & apron::generator1::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. |  | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
◆ print()
  
  | 
        
          | void generator1::print | ( | FILE * | stream = stdout | ) | const |  | inline | 
 
 
◆ set_linexpr()
  
  | 
        
          | void generator1::set_linexpr | ( | const linexpr1 & | c | ) |  |  | inline | 
 
Sets the underlying linear expression to c (copied). 
Does not fail as get_linexpr can: if the generator was created without an underlying expression, it is created.
- Warning
- cshould have only scalar (non-interval) coefficients (unchecked).
- 
assumes that c and *this have equal environments (unchecked). 
 
 
◆ size()
  
  | 
        
          | size_t generator1::size | ( |  | ) | const |  | inline | 
 
Returns the size of the underlying linear expression. 
- Exceptions
- 
  
    | std::invalid_argument | if no valid linear expression has been defined. |  
 
 
 
  
  | 
        
          | ap_generator1_t apron::generator1::l |  | protected | 
 
Structure managed by APRON. 
 
 
The documentation for this class was generated from the following files: