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

Iterator over the expression. More...

#include <lemon/lp_base.h>

Public Member Functions

 ConstCoeffIt (const DualExpr &e)
 Sets the iterator to the first term.
 operator Row () const
 Convert the iterator to the row of the term.
const Value & operator* () const
 Returns the coefficient of the term.
ConstCoeffIt & operator++ ()
 Next term.
bool operator== (Invalid) const
 Equality operator.
bool operator!= (Invalid) const
 Inequality operator.

Detailed Description

The iterator iterates over the terms of the expression.

double s = 0;
for( LpBase::DualExpr::ConstCoeffIt i( e ) ; i != INVALID ; ++i )
s += *i * dual( i );
Iterator over the expression.
Definition lp_base.h:852
const Invalid INVALID
Invalid iterators.
Definition base.cc:33

Constructor & Destructor Documentation

◆ ConstCoeffIt()

ConstCoeffIt ( const DualExpr & e)
inline

Sets the iterator to the first term of the expression.

Member Function Documentation

◆ operator++()

ConstCoeffIt & operator++ ( )
inline

Assign the iterator to the next term.