Limbo
|
Describe linear constraint. More...
#include <Solvers.h>
Public Types | |
typedef T | coefficient_value_type |
coefficient type | |
typedef Variable < coefficient_value_type > | variable_type |
variable type | |
typedef LinearTerm < coefficient_value_type > | term_type |
term type | |
typedef LinearExpression < coefficient_value_type > | expression_type |
expression type | |
Public Member Functions | |
LinearConstraint (expression_type expr=expression_type(), coefficient_value_type rhs=0, char s= '<') | |
constructor More... | |
LinearConstraint (LinearConstraint const &rhs) | |
copy constructor | |
LinearConstraint & | operator= (LinearConstraint const &rhs) |
assignment | |
~LinearConstraint () | |
destructor | |
unsigned int | id () const |
void | setId (unsigned int i) |
expression_type const & | expression () const |
void | setExpression (expression_type const &expr) |
void | emplaceExpression (expression_type &expr) |
coefficient_value_type | rightHandSide () const |
void | setRightHandSide (coefficient_value_type rhs) |
char | sense () const |
void | setSense (char s) |
void | swap (LinearConstraint &rhs) |
swap with a constraint More... | |
void | simplify () |
simplify expression by merge terms of the same variables | |
void | normalize (char s) |
normalize sense More... | |
void | scale (coefficient_value_type factor) |
scale constraint by a scaling factor More... | |
void | clearConstant () |
move the constant in the expression to rhs For example, x + 5 < 10 will become x < 5 | |
void | reserve (unsigned int n) |
reserve space for expression terms More... | |
LinearConstraint & | operator+= (term_type const &term) |
LinearConstraint & | operator+= (expression_type const &expr) |
LinearConstraint & | operator-= (term_type term) |
LinearConstraint & | operator-= (expression_type const &expr) |
Protected Member Functions | |
void | copy (LinearConstraint const &rhs) |
copy object More... | |
Protected Attributes | |
unsigned int | m_id |
constraint index | |
expression_type | m_expr |
linear expression | |
coefficient_value_type | m_rhs |
constant at the right hand side | |
char | m_sense |
sign of operator, < (<=), > (>=), = (==) | |
Describe linear constraint.
T | coefficient type |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |