abLEMON 1.9.0-101-gccb8629
A maintained fork of LEMON
Loading...
Searching...
No Matches
LpBase::RowIt Class Reference

Iterator for iterate over the rows of an LP problem. More...

#include <lemon/lp_base.h>

Inheritance diagram for LpBase::RowIt:

Public Member Functions

 RowIt ()
 Default constructor.
 RowIt (const LpBase &solver)
 Sets the iterator to the first Row.
 RowIt (const Invalid &)
 Invalid constructor & conversion.
RowIt & operator++ ()
 Next row.
Public Member Functions inherited from LpBase::Row
 Row ()=default
 Default constructor.
 Row (const Invalid &)
 Invalid constructor & conversion.
bool operator== (Row r) const
 Equality operator.
bool operator!= (Row r) const
 Inequality operator.
bool operator< (Row r) const
 Artificial ordering operator.

Detailed Description

Its usage is quite simple, for example, you can count the number of rows in an LP lp:

int count = 0;
for( LpBase::RowIt c( lp ) ; c != INVALID ; ++c )
++count;
Iterator for iterate over the rows of an LP problem.
Definition lp_base.h:279
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ RowIt() [1/3]

RowIt ( )
inline
Warning
The default constructor sets the iterator to an undefined value.

◆ RowIt() [2/3]

RowIt ( const LpBase & solver)
inline

Sets the iterator to the first Row.

◆ RowIt() [3/3]

RowIt ( const Invalid & )
inline

Initialize the iterator to be invalid.

See also
Invalid for more details.

Member Function Documentation

◆ operator++()

RowIt & operator++ ( )
inline

Assign the iterator to the next row.