My Project
Loading...
Searching...
No Matches
List of all members | Public Member Functions
LpBase::ColIt Class Reference

Detailed Description

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

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

#include <lemon/lp_base.h>

+ Inheritance diagram for LpBase::ColIt:

Public Member Functions

 ColIt ()
 Default constructor.
 
 ColIt (const LpBase &solver)
 Sets the iterator to the first Col.
 
 ColIt (const Invalid &)
 Invalid constructor & conversion.
 
ColItoperator++ ()
 Next column.
 
- Public Member Functions inherited from LpBase::Col
 Col ()
 Default constructor.
 
 Col (const Invalid &)
 Invalid constructor & conversion.
 
bool operator== (Col c) const
 Equality operator.
 
bool operator!= (Col c) const
 Inequality operator.
 
bool operator< (Col c) const
 Artificial ordering operator.
 

Constructor & Destructor Documentation

◆ ColIt() [1/3]

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

◆ ColIt() [2/3]

ColIt ( const LpBase solver)
inline

Sets the iterator to the first Col.

◆ ColIt() [3/3]

ColIt ( const Invalid )
inline

Initialize the iterator to be invalid.

See also
Invalid for more details.

Member Function Documentation

◆ operator++()

ColIt & operator++ ( )
inline

Assign the iterator to the next column.