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

Custom class that inheritates LpParser::LpDataBase with all the required callbacks defined. More...

Inheritance diagram for LpDataBase:
LpParser::LpDataBase

Public Types

typedef LpParser::int64_t int64_t
 use int64_t in base type
 

Public Member Functions

 LpDataBase ()
 constructor
 
void add_variable (string const &vname, double l, double r)
 add variable that l <= vname <= r. More...
 
void add_constraint (string const &cname, LpParser::TermArray const &terms, char compare, double constant)
 add constraint that terms compare constant. More...
 
void add_objective (bool minimize, LpParser::TermArray const &terms)
 add object terms More...
 
void set_integer (string const &vname, bool binary)
 set integer variables More...
 

Detailed Description

Custom class that inheritates LpParser::LpDataBase with all the required callbacks defined.

Definition at line 20 of file test_bison.cpp.

Member Function Documentation

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

add constraint that terms compare constant.

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

Implements LpParser::LpDataBase.

Definition at line 43 of file test_bison.cpp.

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

add object terms

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

Implements LpParser::LpDataBase.

Definition at line 53 of file test_bison.cpp.

void LpDataBase::add_variable ( string const &  vname,
double  l,
double  r 
)
inlinevirtual

add variable that l <= vname <= r.

Parameters
vnamevariable name
llower bound
rupper bound

Implements LpParser::LpDataBase.

Definition at line 34 of file test_bison.cpp.

void LpDataBase::set_integer ( string const &  vname,
bool  binary 
)
inlinevirtual

set integer variables

Parameters
vnameinteger variables
binarydenotes whether they are binary variables

Implements LpParser::LpDataBase.

Definition at line 67 of file test_bison.cpp.


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