MExpression::MExpression()
Construct a MExpression object with the given constant.
Synopsis
MExpression(double constant)
Arguments
constant
: constant number.
MExpression::MExpression()
Construct a MExpression object with the given linear expression.
Synopsis
MExpression(const Expr &expr)
Arguments
expr
: a linear expression.
MExpression::AddExpr()
Add a linear expression to MExpression object.
Synopsis
void AddExpr(const Expr &expr, double mult)
Arguments
expr
: linear expression object.
mult
: the multiplier of linear expression, default value is 1.0.
MExpression::AddMExpr()
Add MExpression to MExpression object.
Synopsis
void AddMExpr(const MExpression &expr, double mult)
Arguments
expr
: MExpression object.
mult
: the multiplier of MExpression, default value is 1.0.
MExpression::AddTerm()
Add a linear term to MExpression object.
Synopsis
void AddTerm(const Var &var, double coeff)
Arguments
var
: variable of new term.
coeff
: coefficient of new term.
MExpression::Clone()
Clone MExpression object.
Synopsis
MExpression Clone()
Return
new MExpression object.
MExpression::Represent()
String representation of MExpression object.
Synopsis
std::string Represent(size_t maxlen)
Arguments
maxlen
: max length of representation.Return
string object.