PPL  1.2
Parma_Polyhedra_Library::Linear_Expression::const_iterator Class Reference

#include <ppl.hh>

Public Member Functions

 const_iterator ()
 Constructs an invalid const_iterator. More...
 
 const_iterator (const const_iterator &i)
 The copy constructor. More...
 
void m_swap (const_iterator &i)
 Swaps i with *this. More...
 
const_iteratoroperator= (const const_iterator &i)
 Assigns i to *this . More...
 
const_iteratoroperator++ ()
 Navigates to the next nonzero coefficient. More...
 
const_iteratoroperator-- ()
 Navigates to the previous nonzero coefficient. More...
 
reference operator* () const
 Returns the current element.
 
Variable variable () const
 Returns the variable of the coefficient pointed to by *this. More...
 
bool operator== (const const_iterator &i) const
 Compares *this with i. More...
 
bool operator!= (const const_iterator &i) const
 Compares *this with i . More...
 

Related Functions

(Note that these are not member functions.)

void swap (Linear_Expression::const_iterator &x, Linear_Expression::const_iterator &y)
 Swaps x with y. More...
 
void swap (Linear_Expression::const_iterator &x, Linear_Expression::const_iterator &y)
 

Detailed Description

A const iterator on the expression (homogeneous) coefficient that are nonzero.

These iterators are invalidated by operations that modify the expression.

Constructor & Destructor Documentation

Parma_Polyhedra_Library::Linear_Expression::const_iterator::const_iterator ( )
inlineexplicit

Constructs an invalid const_iterator.

This constructor takes $O(1)$ time.

Parma_Polyhedra_Library::Linear_Expression::const_iterator::const_iterator ( const const_iterator i)
inline

The copy constructor.

Parameters
iThe iterator that will be copied.

This constructor takes $O(1)$ time.

Member Function Documentation

void Parma_Polyhedra_Library::Linear_Expression::const_iterator::m_swap ( const_iterator i)
inline

Swaps i with *this.

Parameters
iThe iterator that will be swapped with *this.

This method takes $O(1)$ time.

Linear_Expression::const_iterator & Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator= ( const const_iterator i)
inline

Assigns i to *this .

Parameters
iThe iterator that will be assigned into *this.

This method takes $O(1)$ time.

Linear_Expression::const_iterator & Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator++ ( )
inline

Navigates to the next nonzero coefficient.

This method takes $O(n)$ time for dense expressions, and $O(1)$ time for sparse expressions.

Linear_Expression::const_iterator & Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator-- ( )
inline

Navigates to the previous nonzero coefficient.

This method takes $O(n)$ time for dense expressions, and $O(1)$ time for sparse expressions.

Variable Parma_Polyhedra_Library::Linear_Expression::const_iterator::variable ( ) const
inline

Returns the variable of the coefficient pointed to by *this.

Returns
the variable of the coefficient pointed to by *this.
bool Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator== ( const const_iterator i) const
inline

Compares *this with i.

Parameters
iThe iterator that will be compared with *this.
bool Parma_Polyhedra_Library::Linear_Expression::const_iterator::operator!= ( const const_iterator i) const
inline

Compares *this with i .

Parameters
iThe iterator that will be compared with *this.

Friends And Related Function Documentation

Swaps x with y.


The documentation for this class was generated from the following file: