Iterator to traverse and mutate a linear expression.
More...
#include <apxx_linexpr1.hh>
Inherits apron::linexpr1::const_iterator.
|
| iterator (linexpr1 &e) |
| Starts a new iterator to traverse the linear expression.
|
|
| iterator (const iterator &i) |
| Duplicates the iterator.
|
|
iterator & | operator= (const iterator &i) |
| Assigns the iterator.
|
|
coeff & | get_coeff () const |
| Returns a (modifiable) reference to the coefficient at the current iterator position.
|
|
| 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 and mutate a linear expression.
As const_iterator, but for non-constant linexpr1.
Caution: do not modify the expression during traversal, except through the iterator.
Sample code:
bool valid() const
Whether we are at a valid position (true) or past the last iterator position (false).
Definition apxx_linexpr1.hh:294
Iterator to traverse and mutate a linear expression.
Definition apxx_linexpr1.hh:306
◆ iterator() [1/3]
apron::linexpr1::iterator::iterator |
( |
ap_linexpr1_t * | l | ) |
|
|
inlineprotected |
◆ iterator() [2/3]
linexpr1::iterator::iterator |
( |
linexpr1 & | e | ) |
|
|
inline |
Starts a new iterator to traverse the linear expression.
◆ iterator() [3/3]
linexpr1::iterator::iterator |
( |
const iterator & | i | ) |
|
|
inline |
◆ get_coeff()
coeff & linexpr1::iterator::get_coeff |
( |
| ) |
const |
|
inline |
Returns a (modifiable) reference to the coefficient at the current iterator position.
- Exceptions
-
std::out_of_range | if valid() returns false (we are past the last position). |
◆ operator=()
The documentation for this class was generated from the following files: