Localsolver  6.5
localsolverblackbox.LSBBExpression Class Reference

Detailed Description

Mathematical modeling expression.

Expressions are used to build the mathematical optimization model associated to LocalSolverBlackBox. An expression is composed of an operator (which corresponds to its type) and its operands (which are other expressions of the model).

See Also
LSBBModel, LSBBOperator

Public Member Functions

LSBBModel GetModel ()
 Returns the model object associated to this expression.
LocalSolverBlackBox GetLocalSolverBlackBox ()
 Returns the LocalSolverBlackBox object associated to this expression.
void AddOperand (LSBBExpression expr)
 Adds the given operand to this expression.
bool IsBool ()
 Returns true if this expression is a boolean (ie 0 or 1), false otherwise.
bool IsInt ()
 Returns true if this expression is an integer, false otherwise.
bool IsDouble ()
 Returns true if this expression is a double, false otherwise.

Member Function Documentation

LSBBModel localsolverblackbox.LSBBExpression.GetModel ( )

Returns the model object associated to this expression.

Returns
LSBBModel object
LocalSolverBlackBox localsolverblackbox.LSBBExpression.GetLocalSolverBlackBox ( )

Returns the LocalSolverBlackBox object associated to this expression.

Returns
LocalSolverBlackBox object
void localsolverblackbox.LSBBExpression.AddOperand ( LSBBExpression  expr)

Adds the given operand to this expression.

Only allowed in state LSBBState::Modeling.

Parameters
exprOperand to add.
bool localsolverblackbox.LSBBExpression.IsBool ( )

Returns true if this expression is a boolean (ie 0 or 1), false otherwise.

Only allowed in states LSBBState::Paused or LSBBState::Stopped.

Returns
True if the expression is a boolean.
bool localsolverblackbox.LSBBExpression.IsInt ( )

Returns true if this expression is an integer, false otherwise.

Only allowed in states LSBBState::Paused or LSBBState::Stopped. Note that a boolean is also an integer.

Returns
True if the expression is an integer.
bool localsolverblackbox.LSBBExpression.IsDouble ( )

Returns true if this expression is a double, false otherwise.

Only allowed in states LSBBState::Paused or LSBBState::Stopped.

Returns
True if the expression is a double.