Iterator to traverse a constant linexpr1.
More...
#include <apxx_linexpr1.hh>
Inherited by apron::linexpr1::iterator.
|
| const_iterator (const linexpr1 &e) |
| Starts a new iterator to traverse the linear expression.
|
|
| const_iterator (const const_iterator &i) |
| Duplicates the iterator.
|
|
const_iterator & | operator= (const const_iterator &i) |
| Assigns the iterator.
|
|
const var & | get_var () const |
| Returns the variable name of the coefficient at the current iterator position.
|
|
ap_dim_t | get_dim () const |
| Returns the dimension of the coefficient at the current iterator position.
|
|
const coeff & | get_coeff () const |
| Returns a reference to the coefficient at the current iterator position.
|
|
void | next () |
| Moves the iterator to the following position.
|
|
void | operator++ () |
| Moves the iterator to the following position.
|
|
bool | valid () const |
| Whether we are at a valid position (true) or past the last iterator position (false).
|
|
|
ap_linexpr1_t * | l |
| Internal use only. Pointer to the underlying APRON structure.
|
|
ap_dim_t | pos |
| Internal use only. Current index.
|
|
Iterator to traverse a constant linexpr1.
At each position, there is variable name and its corresponding coefficients. The expression is traversed in increasing order of integer variable names followed by real variable names also in increasing order.
To mutate a linear expression, use the iterator class instead.
Sample code:
Iterator to traverse a constant linexpr1.
Definition apxx_linexpr1.hh:235
bool valid() const
Whether we are at a valid position (true) or past the last iterator position (false).
Definition apxx_linexpr1.hh:294
◆ const_iterator() [1/3]
apron::linexpr1::const_iterator::const_iterator |
( |
ap_linexpr1_t * | l | ) |
|
|
inlineprotected |
◆ const_iterator() [2/3]
linexpr1::const_iterator::const_iterator |
( |
const linexpr1 & | e | ) |
|
|
inline |
Starts a new iterator to traverse the linear expression.
◆ const_iterator() [3/3]
◆ get_coeff()
const coeff & linexpr1::const_iterator::get_coeff |
( |
| ) |
const |
|
inline |
Returns a reference to the coefficient at the current iterator position.
- Exceptions
-
std::out_of_range | if valid() returns false (we are past the last position). |
◆ get_dim()
ap_dim_t linexpr1::const_iterator::get_dim |
( |
| ) |
const |
|
inline |
Returns the dimension of the coefficient at the current iterator position.
- Exceptions
-
std::out_of_range | if valid() returns false (we are past the last position). |
◆ get_var()
const var & linexpr1::const_iterator::get_var |
( |
| ) |
const |
|
inline |
Returns the variable name of the coefficient at the current iterator position.
- Exceptions
-
std::out_of_range | if valid() returns false (we are past the last position). |
◆ next()
void linexpr1::const_iterator::next |
( |
| ) |
|
|
inline |
Moves the iterator to the following position.
◆ operator++()
void linexpr1::const_iterator::operator++ |
( |
| ) |
|
|
inline |
Moves the iterator to the following position.
(Identical to next()).
◆ operator=()
◆ skip_AP_DIM_MAX()
void linexpr1::const_iterator::skip_AP_DIM_MAX |
( |
| ) |
|
|
inlineprotected |
Internal use only. Skips free coefficients in sparse expressions.
◆ valid()
bool linexpr1::const_iterator::valid |
( |
| ) |
const |
|
inline |
Whether we are at a valid position (true) or past the last iterator position (false).
ap_linexpr1_t* apron::linexpr1::const_iterator::l |
|
protected |
Internal use only. Pointer to the underlying APRON structure.
◆ pos
ap_dim_t apron::linexpr1::const_iterator::pos |
|
protected |
Internal use only. Current index.
The documentation for this class was generated from the following files: