APRONXX
0.9.12
|
Iterator to traverse and mutate a linear expression. More...
#include <apxx_linexpr0.hh>
Inherits apron::linexpr0::const_iterator.
Public Member Functions | |
iterator (linexpr0 &e) | |
Starts a new iterator to traverse the linear expression. More... | |
iterator (const iterator &i) | |
Duplicates the iterator. More... | |
iterator & | operator= (const iterator &i) |
Assigns the iterator. More... | |
coeff & | get_coeff () const |
Returns a (modifiable) reference to the coefficient at the current iterator position. More... | |
![]() | |
const_iterator (const linexpr0 &e) | |
Starts a new iterator to traverse the linear expression. More... | |
const_iterator (const const_iterator &i) | |
Duplicates the iterator. More... | |
const_iterator & | operator= (const const_iterator &i) |
Assigns the iterator. More... | |
ap_dim_t | get_dim () const |
Returns the dimension of the coefficient at the current iterator position. More... | |
const coeff & | get_coeff () const |
Returns a reference to the coefficient at the current iterator position. More... | |
void | next () |
Moves the iterator to the following position. More... | |
void | operator++ () |
Moves the iterator to the following position. More... | |
bool | valid () const |
Whether we are at a valid position (true) or past the last iterator position (false). More... | |
Protected Member Functions | |
iterator (ap_linexpr0_t *l) | |
Internal use only. More... | |
![]() | |
void | skip_AP_DIM_MAX () |
Internal use only. Skips free coefficients in sparse expressions. More... | |
const_iterator (ap_linexpr0_t *l) | |
Internal use only. More... | |
Additional Inherited Members | |
![]() | |
ap_linexpr0_t * | l |
Internal use only. Pointer to the underlying APRON structure. More... | |
ap_dim_t | pos |
Internal use only. Current index. More... | |
Iterator to traverse and mutate a linear expression.
As const_iterator, but for non-constant linexpr0.
Caution: do not modify the expression during traversal, except through the iterator.
Sample code:
|
inlineprotected |
Internal use only.
|
inline |
Starts a new iterator to traverse the linear expression.
|
inline |
Duplicates the iterator.
|
inline |
Returns a (modifiable) reference to the coefficient at the current iterator position.
std::out_of_range | if valid() returns false (we are past the last position). |
|
inline |
Assigns the iterator.