CoeffIt Class Reference


Detailed Description

The iterator iterates over the terms of the expression.

         double s=0;
         for(LpBase::Expr::CoeffIt i(e);i!=INVALID;++i)
           s+= *i * primal(i);

#include <lemon/lp_base.h>

List of all members.

Public Member Functions

 CoeffIt (Expr &e)
 Sets the iterator to the first term.
 operator Col () const
 Convert the iterator to the column of the term.
Valueoperator* ()
 Returns the coefficient of the term.
const Valueoperator* () const
 Returns the coefficient of the term.
CoeffItoperator++ ()
 Next term.
bool operator== (Invalid) const
 Equality operator.
bool operator!= (Invalid) const
 Inequality operator.

Constructor & Destructor Documentation

CoeffIt ( Expr e  )  [inline]

Sets the iterator to the first term of the expression.


Member Function Documentation

CoeffIt& operator++ (  )  [inline]

Assign the iterator to the next term.


Generated on Sat Oct 3 07:24:20 2009 for LEMON by  doxygen 1.6.1