Expr Class Reference


Detailed Description

This data structure stores a linear expression of the variables (Cols) and also has a constant component.

There are several ways to access and modify the contents of this container.

Note:
clear() not only sets all coefficients to 0 but also clears the constant components.
See also:
Constr
#include <lemon/lp_base.h>

Inherits std::map<Col,Value>.

List of all members.

Public Member Functions

 Expr ()
 
 Expr (const Key &v)
 
 Expr (const Value &v)
 
void set (const Key &v, const Value &c)
 
Value & constComp ()
 
const Value & constComp () const
 
void simplify ()
 Removes the components with zero coefficient.
void simplify (double &tolerance)
 Removes the coefficients closer to zero than tolerance.
void clear ()
 Sets all coefficients and the constant component to 0.
Exproperator+= (const Expr &e)
 
Exproperator-= (const Expr &e)
 
Exproperator*= (const Value &c)
 
Exproperator/= (const Value &c)
 

Related Functions

(Note that these are not member functions.)

LpSolverBase::Expr operator- (const LpSolverBase::Expr &a, const LpSolverBase::Expr &b)
 
LpSolverBase::Expr operator* (const LpSolverBase::Expr &a, const LpSolverBase::Value &b)
 
LpSolverBase::Expr operator* (const LpSolverBase::Value &a, const LpSolverBase::Expr &b)
 
LpSolverBase::Expr operator/ (const LpSolverBase::Expr &a, const LpSolverBase::Value &b)
 


Generated on Thu Jun 4 04:05:17 2009 for LEMON by  doxygen 1.5.9