PPL  1.2
Parma_Polyhedra_Library::MIP_Problem::const_iterator Class Reference

A read-only iterator on the constraints defining the feasible region. More...

#include <MIP_Problem_defs.hh>

Public Types

typedef Base_Traits::iterator_category iterator_category
 
typedef Base_Traits::difference_type difference_type
 
typedef const Constraint value_type
 
typedef const Constraintpointer
 
typedef const Constraintreference
 

Public Member Functions

difference_type operator- (const const_iterator &y) const
 Iterator difference: computes distances. More...
 
const_iteratoroperator++ ()
 Prefix increment. More...
 
const_iteratoroperator-- ()
 Prefix decrement. More...
 
const_iterator operator++ (int)
 Postfix increment. More...
 
const_iterator operator-- (int)
 Postfix decrement. More...
 
const_iteratoroperator+= (difference_type n)
 Moves iterator forward of n positions. More...
 
const_iteratoroperator-= (difference_type n)
 Moves iterator backward of n positions. More...
 
const_iterator operator+ (difference_type n) const
 Returns an iterator n positions forward. More...
 
const_iterator operator- (difference_type n) const
 Returns an iterator n positions backward. More...
 
reference operator* () const
 Returns a reference to the "pointed" object. More...
 
pointer operator-> () const
 Returns the address of the "pointed" object. More...
 
bool operator== (const const_iterator &y) const
 Compares *this with y. More...
 
bool operator!= (const const_iterator &y) const
 Compares *this with y. More...
 

Private Types

typedef Constraint_Sequence::const_iterator Base
 
typedef std::iterator_traits< BaseBase_Traits
 

Private Member Functions

 const_iterator (Base b)
 Constructor from a Base iterator. More...
 

Private Attributes

Base itr
 The Base iterator on the Constraint_Sequence. More...
 

Friends

class MIP_Problem
 

Detailed Description

A read-only iterator on the constraints defining the feasible region.

Definition at line 241 of file MIP_Problem_defs.hh.

Member Typedef Documentation

typedef Constraint_Sequence::const_iterator Parma_Polyhedra_Library::MIP_Problem::const_iterator::Base
private

Definition at line 243 of file MIP_Problem_defs.hh.

Definition at line 244 of file MIP_Problem_defs.hh.

Definition at line 248 of file MIP_Problem_defs.hh.

Definition at line 247 of file MIP_Problem_defs.hh.

Constructor & Destructor Documentation

Parma_Polyhedra_Library::MIP_Problem::const_iterator::const_iterator ( Base  b)
inlineexplicitprivate

Constructor from a Base iterator.

Definition at line 241 of file MIP_Problem_inlines.hh.

242  : itr(b) {
243 }
Base itr
The Base iterator on the Constraint_Sequence.

Member Function Documentation

bool Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator!= ( const const_iterator y) const
inline

Compares *this with y.

Parameters
yThe iterator that will be compared with *this.

Definition at line 314 of file MIP_Problem_inlines.hh.

References itr.

314  {
315  return itr != y.itr;
316 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator::reference Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator* ( ) const
inline

Returns a reference to the "pointed" object.

Definition at line 299 of file MIP_Problem_inlines.hh.

299  {
300  return *(*itr);
301 }
MIP_Problem::const_iterator Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator+ ( difference_type  n) const
inline

Returns an iterator n positions forward.

Definition at line 277 of file MIP_Problem_inlines.hh.

277  {
278  return const_iterator(itr + n);
279 }
const_iterator(Base b)
Constructor from a Base iterator.
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator & Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator++ ( )
inline

Prefix increment.

Definition at line 251 of file MIP_Problem_inlines.hh.

251  {
252  ++itr;
253  return *this;
254 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator++ ( int  )
inline

Postfix increment.

Definition at line 263 of file MIP_Problem_inlines.hh.

263  {
264  const_iterator x = *this;
265  operator++();
266  return x;
267 }
const_iterator(Base b)
Constructor from a Base iterator.
MIP_Problem::const_iterator & Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator+= ( difference_type  n)
inline

Moves iterator forward of n positions.

Definition at line 287 of file MIP_Problem_inlines.hh.

287  {
288  itr += n;
289  return *this;
290 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator::difference_type Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator- ( const const_iterator y) const
inline

Iterator difference: computes distances.

Definition at line 246 of file MIP_Problem_inlines.hh.

References itr.

246  {
247  return itr - y.itr;
248 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator- ( difference_type  n) const
inline

Returns an iterator n positions backward.

Definition at line 282 of file MIP_Problem_inlines.hh.

282  {
283  return const_iterator(itr - n);
284 }
const_iterator(Base b)
Constructor from a Base iterator.
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator & Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator-- ( )
inline

Prefix decrement.

Definition at line 257 of file MIP_Problem_inlines.hh.

257  {
258  --itr;
259  return *this;
260 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator-- ( int  )
inline

Postfix decrement.

Definition at line 270 of file MIP_Problem_inlines.hh.

270  {
271  const_iterator x = *this;
272  operator--();
273  return x;
274 }
const_iterator(Base b)
Constructor from a Base iterator.
MIP_Problem::const_iterator & Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator-= ( difference_type  n)
inline

Moves iterator backward of n positions.

Definition at line 293 of file MIP_Problem_inlines.hh.

293  {
294  itr -= n;
295  return *this;
296 }
Base itr
The Base iterator on the Constraint_Sequence.
MIP_Problem::const_iterator::pointer Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator-> ( ) const
inline

Returns the address of the "pointed" object.

Definition at line 304 of file MIP_Problem_inlines.hh.

304  {
305  return *itr;
306 }
Base itr
The Base iterator on the Constraint_Sequence.
bool Parma_Polyhedra_Library::MIP_Problem::const_iterator::operator== ( const const_iterator y) const
inline

Compares *this with y.

Parameters
yThe iterator that will be compared with *this.

Definition at line 309 of file MIP_Problem_inlines.hh.

References itr.

309  {
310  return itr == y.itr;
311 }
Base itr
The Base iterator on the Constraint_Sequence.

Friends And Related Function Documentation

friend class MIP_Problem
friend

Definition at line 307 of file MIP_Problem_defs.hh.

Member Data Documentation

Base Parma_Polyhedra_Library::MIP_Problem::const_iterator::itr
private

The Base iterator on the Constraint_Sequence.

Definition at line 305 of file MIP_Problem_defs.hh.

Referenced by operator!=(), operator-(), and operator==().


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