The iterator iterates over the terms of the expression.
double s=0; for(LpBase::DualExpr::CoeffIt i(e);i!=INVALID;++i) s+= *i * dual(i);
#include <lemon/lp_base.h>
Public Member Functions | |
CoeffIt (DualExpr &e) | |
Sets the iterator to the first term. | |
operator Row () const | |
Convert the iterator to the row of the term. | |
Value & | operator* () |
Returns the coefficient of the term. | |
const Value & | operator* () const |
Returns the coefficient of the term. | |
CoeffIt & | operator++ () |
Next term. | |
bool | operator== (Invalid) const |
Equality operator. | |
bool | operator!= (Invalid) const |
Inequality operator. |
CoeffIt& operator++ | ( | ) | [inline] |
Assign the iterator to the next term.