Level 0 generator (ap_generator0_t wrapper).
More...
#include <apxx_generator0.hh>
Inherits apron::use_malloc.
|
| | generator0 (ap_generator0_t &l) |
| | Internal use only. Performs a shallow copy and takes ownership of the contents. More...
|
| |
|
| ap_generator0_t | l |
| | Structure managed by APRON. More...
|
| |
Level 0 generator (ap_generator0_t wrapper).
A generator0 object represents a generator: vertex, ray, line, modular line, or modular ray. It stores and manages a linexpr0 (linear expression with scalar coefficients only), and a generator type (vertex, ray , etc).
| apron::generator0::generator0 |
( |
ap_generator0_t & |
l | ) |
|
|
inlineprotected |
Internal use only. Performs a shallow copy and takes ownership of the contents.
| apron::generator0::generator0 |
( |
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).
gentyp can be AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD.
| generator0::generator0 |
( |
ap_gentyp_t |
gentyp, |
|
|
const linexpr0 & |
lin |
|
) |
| |
|
inline |
Creates a new generator constraint from a linear expression (copied).
gentyp can be AP_GEN_LINE, AP_GEN_RAY, AP_GEN_VERTEX, AP_GEN_LINEMOD, or AP_GEN_RAYMOD.
- Warning
lin should have only scalar (non-interval) coefficients (unchecked).
(Deep) copy of a generator.
Makes a (deep) copy of a generator, and applies a dimension change to the underlying linear expression.
Makes a (deep) copy of a generator, and applies a permutation to the underlying linear expression.
| generator0::~generator0 |
( |
| ) |
|
|
inline |
Frees the generator, including the embedded linear expression.
| void generator0::add_dimensions |
( |
const dimchange & |
d | ) |
|
|
inline |
Changes the dimension of the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| const ap_generator0_t * apron::generator0::get_ap_generator0_t |
( |
| ) |
const |
|
inline |
Returns a pointer to the internal APRON object stored in *this.
| ap_generator0_t * generator0::get_ap_generator0_t |
( |
| ) |
|
|
inline |
Returns a pointer to the internal APRON object stored in *this.
| ap_gentyp_t & generator0::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.
| const ap_gentyp_t & apron::generator0::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.
Returns a (modifiable) reference to the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| const linexpr0 & apron::generator0::get_linexpr |
( |
| ) |
const |
|
inline |
Returns a reference to the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| bool generator0::has_linexpr |
( |
| ) |
const |
|
inline |
Returns 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) generator0_array.
| void generator0::permute_dimensions |
( |
const dimperm & |
d | ) |
|
|
inline |
Applies a permutation to the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| void generator0::print |
( |
char ** |
name_of_dim = NULL, |
|
|
FILE * |
stream = stdout |
|
) |
| const |
|
inline |
| void generator0::resize |
( |
size_t |
size | ) |
|
|
inline |
Resizes the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| void generator0::set_linexpr |
( |
const linexpr0 & |
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
c should have only scalar (non-interval) coefficients (unchecked).
| size_t generator0::size |
( |
| ) |
const |
|
inline |
Returns the size of the underlying linear expression.
- Exceptions
-
| std::invalid_argument | if no valid linear expression has been defined. |
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const generator0 & |
s |
|
) |
| |
|
friend |
Printing.
Variable naming can be configured through the varname stream modifier.
- Exceptions
-
| std::invalid_argument | if the underlying expression is missing. |
| ap_generator0_t apron::generator0::l |
|
protected |
Structure managed by APRON.
The documentation for this class was generated from the following files: