Dimension change object (ap_dimchange_t wrapper).
More...
#include <apxx_dimension.hh>
Inherits apron::use_malloc.
|
ap_dimchange_t | c |
| Structure managed by APRON. More...
|
|
Dimension change object (ap_dimchange_t wrapper).
dimchange objects are used to insert or remove dimensions at arbitrary positions in expressions, constraints, and domains. A dimchange object embeds the number of integer and real dimensions to add/remove, as well as an array of indices where to add/remove dimensions. The array should be sorted in increasing order.
◆ dimchange() [1/4]
apron::dimchange::dimchange |
( |
size_t |
intdim = 0 , |
|
|
size_t |
realdim = 0 |
|
) |
| |
|
inline |
Makes an uninitialized dimchange.
◆ dimchange() [2/4]
dimchange::dimchange |
( |
size_t |
intdim, |
|
|
size_t |
realdim, |
|
|
const ap_dim_t |
d[] |
|
) |
| |
|
inline |
Makes a dimchange initialized using the given array of indices (copied).
d
should contain (at least) intdim+realdim dimensions.
◆ dimchange() [3/4]
dimchange::dimchange |
( |
size_t |
intdim, |
|
|
size_t |
realdim, |
|
|
const std::vector< ap_dim_t > & |
d |
|
) |
| |
|
inline |
Makes a dimchange initialized using the given vector of indices (copied).
- Exceptions
-
std::invalid_argument | if d contains less than intdim+realdim dimensions. |
◆ dimchange() [4/4]
apron::dimchange::dimchange |
( |
const dimchange & |
x, |
|
|
bool |
inv = false |
|
) |
| |
|
inline |
Makes a copy of a dimchange, copying the array, and optionally inverting the dimension change.
- inv if inv==true, then the constructed dimchange is the inverse of x (see add_invert).
◆ ~dimchange()
dimchange::~dimchange |
( |
| ) |
|
|
inline |
◆ add_invert()
void dimchange::add_invert |
( |
| ) |
|
|
inline |
Inverts *this.
If the dimchange was used to add some dimensions, it can now be used to remove the added dimensions (but not the converse).
◆ get() [1/2]
ap_dim_t & dimchange::get |
( |
size_t |
dim | ) |
|
|
inline |
Returns a (modifiable) reference to an index in the underlying array (bound-checked).
- Exceptions
-
std::out_of_range | is thrown if dim>=intdim+realdim. |
◆ get() [2/2]
const ap_dim_t & dimchange::get |
( |
size_t |
dim | ) |
const |
|
inline |
Returns a reference to a (checked) index in the underlying array (bound-checked).
- Exceptions
-
std::out_of_range | is thrown if dim>=intdim+realdim. |
◆ get_ap_dimchange_t() [1/2]
const ap_dimchange_t * dimchange::get_ap_dimchange_t |
( |
| ) |
const |
|
inline |
Returns a pointer to the internal APRON object stored in *this.
◆ get_ap_dimchange_t() [2/2]
ap_dimchange_t * dimchange::get_ap_dimchange_t |
( |
| ) |
|
|
inline |
Returns a pointer to the internal APRON object stored in *this.
◆ get_intdim()
size_t dimchange::get_intdim |
( |
| ) |
const |
|
inline |
Returns the number of integer dimensions to add/remove.
◆ get_realdim()
size_t dimchange::get_realdim |
( |
| ) |
const |
|
inline |
Returns the number of real dimensions to add/remove.
◆ operator-()
Returns the inverse of *this.
See add_invert
.
◆ operator=() [1/3]
◆ operator=() [2/3]
dimchange & dimchange::operator= |
( |
const ap_dim_t |
d[] | ) |
|
|
inline |
Assignment from an array of indices.
d
should contain (at least) intdim+realdim dimensions.
◆ operator=() [3/3]
dimchange & dimchange::operator= |
( |
const std::vector< ap_dim_t > & |
d | ) |
|
|
inline |
Assignment from a vector of indices (no change in size).
- Exceptions
-
std::invalid_argument | if d contains less than intdim+realdim dimensions. |
◆ operator[]() [1/2]
ap_dim_t & dimchange::operator[] |
( |
size_t |
dim | ) |
|
|
inline |
Returns a (modifiable) reference to an index in the underlying array.
dim
should be strictly smaller than intdim+realdim (not bound-checked).
◆ operator[]() [2/2]
const ap_dim_t & dimchange::operator[] |
( |
size_t |
dim | ) |
const |
|
inline |
Returns a reference to a (checked) index in the underlying array.
dim
should be strictly smaller than intdim+realdim (not bound-checked).
◆ print()
void dimchange::print |
( |
FILE * |
stream = stdout | ) |
const |
|
inline |
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const dimchange & |
s |
|
) |
| |
|
friend |
Printing.
Variable naming can be configured through the varname stream modifier.
ap_dimchange_t apron::dimchange::c |
|
protected |
Structure managed by APRON.
The documentation for this class was generated from the following files: