Iterator to traverse a constant linexpr0.
More...
#include <apxx_linexpr0.hh>
Inherited by apron::linexpr0::iterator.
|
| | const_iterator (const linexpr0 &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.
|
| |
| 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_linexpr0_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 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:
Iterator to traverse a constant linexpr0.
Definition apxx_linexpr0.hh:286
bool valid() const
Whether we are at a valid position (true) or past the last iterator position (false).
Definition apxx_linexpr0.hh:425
◆ const_iterator() [1/3]
| apron::linexpr0::const_iterator::const_iterator |
( |
ap_linexpr0_t * | l | ) |
|
|
inlineprotected |
◆ const_iterator() [2/3]
| linexpr0::const_iterator::const_iterator |
( |
const linexpr0 & | e | ) |
|
|
inline |
Starts a new iterator to traverse the linear expression.
◆ const_iterator() [3/3]
◆ get_coeff()
| const coeff & linexpr0::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 linexpr0::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). |
◆ next()
| void linexpr0::const_iterator::next |
( |
| ) |
|
|
inline |
Moves the iterator to the following position.
◆ operator++()
| void linexpr0::const_iterator::operator++ |
( |
| ) |
|
|
inline |
Moves the iterator to the following position.
(Identical to next()).
◆ operator=()
◆ skip_AP_DIM_MAX()
| void linexpr0::const_iterator::skip_AP_DIM_MAX |
( |
| ) |
|
|
inlineprotected |
Internal use only. Skips free coefficients in sparse expressions.
◆ valid()
| bool linexpr0::const_iterator::valid |
( |
| ) |
const |
|
inline |
Whether we are at a valid position (true) or past the last iterator position (false).
| ap_linexpr0_t* apron::linexpr0::const_iterator::l |
|
protected |
Internal use only. Pointer to the underlying APRON structure.
◆ pos
| ap_dim_t apron::linexpr0::const_iterator::pos |
|
protected |
Internal use only. Current index.
The documentation for this class was generated from the following files: