Overview | Group | Tree | Graph | Index | Concepts |
Constrained Boolean variables are variables whose possible values are
IlcTrue
and IlcFalse
. These variables are
instances of the class IlcBoolVar
, which is a subclass of the
class IlcConstraint
. This class inherits the member functions,
isTrue
and isFalse
, as well as the operators
defined for IlcConstraint
, of course.
A constrained Boolean expression can be transformed into a constrained Boolean variable by means of the class constructor or the assignment operator. The effect of either of those is to associate a domain with the constrained Boolean expression.
See Also:
IlcBoolAbstraction, IlcBoolVarArray, IlcConstraint, IlcGoal
Constructor Summary | |
---|---|
public | IlcBoolVar(IloSolver solver, const char * name=0) |
public | IlcBoolVar(const IlcConstraint exp) |
public | IlcBoolVar() |
Method Summary | |
---|---|
public IlcBool | isBound() |
public void | operator=(const IlcBoolVar & exp) |
public void | operator=(const IlcConstraint & exp) |
Inherited Methods from IlcConstraint |
---|
getImpl, getName, getObject, getParentDemon, getSolver, isFalse, isTrue, setName, setObject |
Inherited Methods from IlcDemon |
---|
getConstraint, getImpl, getSolver, operator= |
Constructor Detail |
---|
This constructor creates a constrained Boolean variable with a domain containing IlcTrue
and IlcFalse
. The optional argument name
, if provided, becomes the name of
the constrained Boolean variable.
This constructor associates a domain with the constrained Boolean expression, exp
.
That expression thus becomes a constrained Boolean variable. Moreover, the newly created constrained
Boolean variable points to the same implementation object as exp
.
This constructor creates a constrained Boolean variable which is empty, that is, whose handle pointer is null. This object must then be assigned before it can be used, exactly as when you declare a pointer.
Method Detail |
---|
This member function indicates whether or not its invoking object is bound to a value in its domain.
This operator assigns an address to the handle pointer of the invoking object. That address is the
location of the implementation object of the argument exp
. After the execution of this
operator, the invoking object and exp
both point to the same implementation object. This
assignment operator has no effect on its argument.
This operator assigns an address to the handle pointer of the invoking object. That address is
the location of the implementation object of the argument exp
. After the execution of
this operator, the invoking object and the exp
object both point to the same implementation
object. Moreover, this assignment operator associates a domain with the constrained Boolean expression
exp
, which is thus transformed into a constrained Boolean variable.