Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
LpParser::LpDataBase Class Referenceabstract

Base class for lp database. Only pure virtual functions are defined. User needs to inheritate this class and derive a custom database type with all callback functions defined. More...

#include <LpDataBase.h>

Inheritance diagram for LpParser::LpDataBase:
limbo::solvers::LinearModel< T, V > limbo::solvers::lpmcf::LpDualMcf< T > LpDataBase

Public Member Functions

virtual void add_variable (string const &vname, double l=limbo::lowest< double >(), double r=std::numeric_limits< double >::max())=0
 add variable that l <= vname <= r. More...
 
virtual void add_constraint (string const &cname, TermArray const &terms, char compare, double constant)=0
 add constraint that terms compare constant. More...
 
virtual void add_objective (bool minimize, TermArray const &terms)=0
 add object terms More...
 
virtual void set_integer (string const &vname, bool binary)=0
 set integer variables More...
 

Detailed Description

Base class for lp database. Only pure virtual functions are defined. User needs to inheritate this class and derive a custom database type with all callback functions defined.

Definition at line 114 of file LpDataBase.h.

Member Function Documentation

virtual void LpParser::LpDataBase::add_constraint ( string const &  cname,
TermArray const &  terms,
char  compare,
double  constant 
)
pure virtual

add constraint that terms compare constant.

Parameters
cnameconstraint name
termsarray of terms in left hand side
compareoperator '<', '>', '='
constantconstant in the right hand side

Implemented in LpDataBase.

virtual void LpParser::LpDataBase::add_objective ( bool  minimize,
TermArray const &  terms 
)
pure virtual

add object terms

Parameters
minimizetrue denotes minimizing object, false denotes maximizing object
termsarray of terms

Implemented in limbo::solvers::LinearModel< T, V >, limbo::solvers::lpmcf::LpDualMcf< T >, and LpDataBase.

virtual void LpParser::LpDataBase::add_variable ( string const &  vname,
double  l = limbo::lowest< double >(),
double  r = std::numeric_limits< double >::max() 
)
pure virtual

add variable that l <= vname <= r.

Parameters
vnamevariable name
llower bound
rupper bound

Implemented in limbo::solvers::lpmcf::LpDualMcf< T >, and LpDataBase.

virtual void LpParser::LpDataBase::set_integer ( string const &  vname,
bool  binary 
)
pure virtual

set integer variables

Parameters
vnameinteger variables
binarydenotes whether they are binary variables

Implemented in LpDataBase.


The documentation for this class was generated from the following file: