APRONXX
0.9.12
|
Iterator to traverse a constant linexpr0. More...
#include <apxx_linexpr0.hh>
Inherited by apron::linexpr0::iterator.
Public Member Functions | |
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 | |
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... | |
Protected Attributes | |
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 a constant linexpr0.
At each position, there is dimension and its corresponding coefficients. For sparse expressions, there can be a gap between the dimension at two successive position (holes are skipped.) In all cases, the expression is traversed in increasing dimension order.
To mutate a linear expression, use the iterator class instead.
Sample code:
|
inlineprotected |
Internal use only.
|
inline |
Starts a new iterator to traverse the linear expression.
|
inline |
Duplicates the iterator.
|
inline |
Returns a reference to the coefficient at the current iterator position.
std::out_of_range | if valid() returns false (we are past the last position). |
|
inline |
Returns the dimension of the coefficient at the current iterator position.
std::out_of_range | if valid() returns false (we are past the last position). |
|
inline |
Moves the iterator to the following position.
|
inline |
Moves the iterator to the following position.
(Identical to next()).
|
inline |
Assigns the iterator.
|
inlineprotected |
Internal use only. Skips free coefficients in sparse expressions.
|
inline |
Whether we are at a valid position (true) or past the last iterator position (false).
|
protected |
Internal use only. Pointer to the underlying APRON structure.
|
protected |
Internal use only. Current index.