FRAMES NO FRAMES

Class IloAnyVar

Definition file: ilconcert/iloany.h
For IBM® ILOG® Solver: a class to represent an enumerated variable.

An instance of this class offers a convenient way to represent an enumerated variable in Concert Technology.

Most member functions in this class contain assert statements. For an explanation of the macro NDEBUG (a way to turn on or turn off these assert statements), see the concept Assert and NDEBUG.

See Also:

Constructor Summary
public IloAnyVar()
public IloAnyVar(IloNumVarI * impl)
public IloAnyVar(const IloEnv env, const IloAnyArray array, const char * name=0)
Method Summary
public IloNumVarI *getImpl() const
public voidgetPossibleValues(IloAnyArray values) const
public voidsetPossibleValues(const IloAnyArray values)
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, setName, setObject
Constructor Detail

IloAnyVar

public IloAnyVar()
This constructor creates an empty handle. You must initialize it before you use it.

IloAnyVar

public IloAnyVar(IloNumVarI * impl)
This constructor creates a handle object from a pointer to an implementation object.

IloAnyVar

public IloAnyVar(const IloEnv env, const IloAnyArray array, const char * name=0)

This constructor creates a constrained enumerated variable from the values in array and makes the variable part of the environment specified by env. By default, its name is the empty string, but you can specify a name of your own choice.


Method Detail

getImpl

public IloNumVarI * getImpl() const
This member function returns a pointer to the implementation object of the invoking handle.

getPossibleValues

public void getPossibleValues(IloAnyArray values) const

This constructor creates a constrained enumerated variable from the given collection.

This member function accesses the possible values of the invoking enumerated variable and puts those values into its argument values.


setPossibleValues

public void setPossibleValues(const IloAnyArray values)

This member function sets values as the domain of the invoking enumerated variable.