| APRONXX 0.9.15
    | 
Level 1 linear constraint (ap_lincons1_t wrapper). More...
#include <apxx_lincons1.hh>
Inherits apron::use_malloc.
| Public Member Functions | |
| Constructors | |
| lincons1 (const environment &e, const lincons0 &x) | |
| Creates a new constraint from a lincons0 (copied) and an environment (reference count incremented) associating names to dimensions in lincons0. | |
| lincons1 (const environment &e, ap_constyp_t constyp=AP_CONS_SUPEQ) | |
| Creates a new (non-modulo) constraint from an empty linear expression. | |
| lincons1 (ap_constyp_t constyp, const linexpr1 &lin) | |
| Creates a new (non-modulo) constraint from a linear expression (copied). | |
| lincons1 (ap_constyp_t constyp, const linexpr1 &lin, const scalar &modulo) | |
| Creates a new constraint from a linear expression and a modulo scalar (both copied). | |
| lincons1 (const environment &e, unsat x) | |
| Makes an unsatisfiable constraint (-1>=0). | |
| lincons1 (const lincons1 &x) | |
| (Deep) copy of a constraint. | |
| lincons1 (const lincons1 &x, const environment &e) | |
| Makes a (deep) copy of x and extends its environment. | |
| Destructor | |
| ~lincons1 () | |
| Frees all space for the expression and coefficients, and decrements the reference count of the environment. | |
| Assignment | |
| lincons1 & | operator= (const lincons1 &x) | 
| Makes a (deep) copy. | |
| lincons1 & | operator= (unsat x) | 
| Assigns an unsatisfiable constraint to *this (-1>=0). | |
| void | set_modulo (const scalar &c) | 
| Sets the auxiliary scalar modulo to c (copied). | |
| void | set_linexpr (const linexpr1 &c) | 
| Sets the underlying linear expression to c (copied). | |
| Dimension operations | |
| void | extend_environment (const environment &e) | 
| Extends the environment of the expression. | |
| Accesses, size | |
| environment | get_environment () const | 
| Returns the environment of the constraint (with incremented reference count). | |
| const lincons0 & | get_lincons0 () const | 
| Returns a reference to the underlying lincons0. | |
| lincons0 & | get_lincons0 () | 
| Returns a (modifiable) reference to the underlying lincons0. | |
| size_t | size () const | 
| Returns the size of the underlying linear expression. | |
| ap_constyp_t & | get_constyp () | 
| Returns a (modifiable) reference to the constraint type. | |
| const ap_constyp_t & | get_constyp () const | 
| Returns a reference to the constraint type. | |
| bool | has_modulo () const | 
| Whether the constraint has a valid auxiliary scalar (used in modulo constraints). | |
| bool | has_linexpr () const | 
| Whether the constraint has a valid linear expression. | |
| scalar & | get_modulo () | 
| Returns a (modifiable) reference to the auxiliary scalar. | |
| const scalar & | get_modulo () const | 
| Returns a reference to the auxiliary scalar. | |
| linexpr1 | get_linexpr () const | 
| Returns a copy of the underlying linear expression. | |
| coeff & | get_cst () | 
| Returns a (modifiable) reference to the constant coefficient. | |
| const coeff & | get_cst () const | 
| Returns a reference to the constant coefficient. | |
| coeff & | operator[] (const var &v) | 
| Returns a (modifiable) reference to the coefficient corresponding to the given variable name. | |
| const coeff & | operator[] (const var &v) const | 
| Returns a reference to the coefficient corresponding to the given variable name. | |
| Tests | |
| bool | is_unsat () const | 
| Whether the constraint is unsatisfiable. | |
| bool | is_linear () const | 
| Whether the underlying linear expression has only scalar coefficients. | |
| bool | is_quasilinear () const | 
| Whether the underlying linear expression has only scalar coefficients, except maybe for the constant one. | |
| C API compatibility | |
| const ap_lincons1_t * | get_ap_lincons1_t () const | 
| Returns a pointer to the internal APRON object stored in *this. | |
| ap_lincons1_t * | get_ap_lincons1_t () | 
| Returns a pointer to the internal APRON object stored in *this. | |
|  Public Member Functions inherited from apron::use_malloc | |
| void * | operator new (size_t sz) | 
| void * | operator new[] (size_t sz) | 
| void | operator delete (void *p) | 
| void | operator delete[] (void *p) | 
| Protected Member Functions | |
| lincons1 (ap_lincons1_t p) | |
| Internal use only. Shallow copy (no copy of lincons0 or environment). | |
| Protected Attributes | |
| ap_lincons1_t | l | 
| Structure managed by APRON. | |
| Printing | |
| void | print (FILE *stream=stdout) const | 
| Prints to a C stream. | |
Level 1 linear constraint (ap_lincons1_t wrapper).
Level 1 version of linear constraints with scalar or interval coefficients (coeff). Terms are indexed using variable names (var) instead of dimensions (ap_dim_t). Internally, a lincons1 wraps together a lincons0 (memory managed) and an environment (holding a reference count).
| 
 | inlineprotected | 
Internal use only. Shallow copy (no copy of lincons0 or environment).
| 
 | inline | 
| 
 | inline | 
Creates a new (non-modulo) constraint from an empty linear expression.
The auxiliary scalar is not created (has_modulo returns false). The linear expression is created sparse and empty (has_linexpr returns true).
e associates a variable name to each dimension (reference counter incremented). constyp can be AP_CONS_EQ, AP_CONS_SUPEQ, AP_CONS_SUP, or AP_CONS_DISEQ (but not AP_CONS_EQMOD). | 
 | inline | 
Creates a new (non-modulo) constraint from a linear expression (copied).
The auxiliary scalar is not created (has_modulo returns false).
constyp can be AP_CONS_EQ, AP_CONS_SUPEQ, AP_CONS_SUP, or AP_CONS_DISEQ (but not AP_CONS_EQMOD). Creates a new constraint from a linear expression and a modulo scalar (both copied).
constyp can be AP_CONS_EQ, AP_CONS_SUPEQ, AP_CONS_SUP, AP_CONS_EQMOD, or AP_CONS_DISEQ. | 
 | inline | 
Makes an unsatisfiable constraint (-1>=0).
| 
 | inline | 
(Deep) copy of a constraint.
| 
 | inline | 
Makes a (deep) copy of x and extends its environment.
| std::invalid_argument | if e is not a super-environment of that of x. | 
| 
 | inline | 
Frees all space for the expression and coefficients, and decrements the reference count of the environment.
| 
 | inline | 
Extends the environment of the expression.
| std::invalid_argument | if e is not a super-environment of that of *this. | 
| 
 | 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 | 
Returns a (modifiable) reference to the constraint type.
AP_CONS_EQ, AP_CONS_SUPEQ, AP_CONS_SUP, AP_CONS_EQMOD, or AP_CONS_DISEQ. | 
 | inline | 
Returns a reference to the constraint type.
AP_CONS_EQ, AP_CONS_SUPEQ, AP_CONS_SUP, AP_CONS_EQMOD, or AP_CONS_DISEQ. | 
 | inline | 
Returns a (modifiable) reference to the constant coefficient.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Returns a reference to the constant coefficient.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Returns the environment of the constraint (with incremented reference count).
| 
 | inline | 
Returns a (modifiable) reference to the underlying lincons0.
| 
 | inline | 
Returns a reference to the underlying lincons0.
| 
 | inline | 
Returns a copy of the underlying linear expression.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Returns a (modifiable) reference to the auxiliary scalar.
| std::invalid_argument | if no valid auxiliary scalar has been defined. | 
| 
 | inline | 
Returns a reference to the auxiliary scalar.
| std::invalid_argument | if no valid auxiliary scalar has been defined. | 
| 
 | inline | 
Whether the constraint has a valid linear expression.
| 
 | inline | 
Whether the constraint has a valid auxiliary scalar (used in modulo constraints).
| 
 | inline | 
Whether the underlying linear expression has only scalar coefficients.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Whether the underlying linear expression has only scalar coefficients, except maybe for the constant one.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Whether the constraint is unsatisfiable.
| std::invalid_argument | if no valid linear expression has been defined. | 
Assigns an unsatisfiable constraint to *this (-1>=0).
Returns a (modifiable) reference to the coefficient corresponding to the given variable name.
| std::invalid_argument | if the variable name is not present in the environment. | 
| std::invalid_argument | if no valid linear expression has been defined. | 
Returns a reference to the coefficient corresponding to the given variable name.
| std::invalid_argument | if the variable name is not present in the environment. | 
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | inline | 
Prints to a C stream.
| 
 | inline | 
Sets the underlying linear expression to c (copied).
Does not fail as get_linexpr can: if the constraint was created without an underlying expression, it is created.
| 
 | inline | 
Sets the auxiliary scalar modulo to c (copied).
Does not fail as get_modulo can: if the constraint was created without an auxiliary scalar, it is created.
| 
 | inline | 
Returns the size of the underlying linear expression.
| std::invalid_argument | if no valid linear expression has been defined. | 
| 
 | protected | 
Structure managed by APRON.