Loading...
Searching...
No Matches
LpBase::Expr::ConstCoeffIt Class Reference

## Detailed Description

The iterator iterates over the terms of the expression.

double s=0;
for(LpBase::Expr::ConstCoeffIt i(e);i!=INVALID;++i)
s+=*i * primal(i);
lemon::INVALID
const Invalid INVALID
Invalid iterators.
Definition base.cc:32
lemon::LpBase::Expr::ConstCoeffIt
Const iterator over the expression.
Definition lp_base.h:504

`#include <lemon/lp_base.h>`

## Public Member Functions

| ConstCoeffIt (const Expr &e)
| Sets the iterator to the first term.
| operator Col () const
| Convert the iterator to the column 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.

## Constructor & Destructor Documentation

## ConstCoeffIt()

ConstCoeffIt | ( | const Expr & | 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.