Skip to main content
FRAMES NO FRAMES

Class IloInverse

Definition file: ilconcert/ilomodel.h
Map of IloInverseIloInverseIloInverseIloConstraintIloIntExprArgIloNumExprArgIloExtractable
For constraint programming: constrains elements of one array to be inverses of another.

An instance of IloInverse represents an inverse constraint. Informally, we say that an inverse constraint works on two arrays, say, f and invf, so that an element of f composed with the corresponding element of invf produces the index of that element.

In formal terms, if the length of the arrays f and invf is n, then the inverse constraint makes sure that:

In order for a constraint to take effect, you must add it to a model with the template IloAdd or the member function IloModel::add and extract the model for an algorithm with the member function IloAlgorithm::extract.

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.

Note: This constraint cannot be used in a logical constraint.

See Also:

Method Summary
public IloInverseI *getImpl() const
public IloInverse()
public IloInverse(IloInverseI * impl)
public IloInverse(const IloEnv env, const IloIntExprArray f, const IloIntExprArray invf, const char * name=0)
Inherited Methods from IloConstraint
getImpl, IloConstraint, IloConstraint
Inherited Methods from IloIntExprArg
getImpl, IloIntExprArg, IloIntExprArg
Inherited Methods from IloNumExprArg
getImpl, IloNumExprArg, IloNumExprArg
Inherited Methods from IloExtractable
asConstraint, asIntExpr, asModel, asNumExpr, asObjective, asVariable, end, getEnv, getId, getImpl, getName, getObject, IloExtractable, isConstraint, isIntExpr, isModel, isNumExpr, isObjective, isVariable, removeFromAll, setLocation, setName, setObject
Method Detail

IloInverse

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

IloInverse

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

IloInverse

public IloInverse(const IloEnv env, const IloIntExprArray f, const IloIntExprArray invf, const char * name=0)

This constructor creates an inverse constraint that if the length of the arrays f and invf is n, then this function returns a constraint that ensures that:


getImpl

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