NO FRAMES

Class IloDiff

Definition file: ilconcert/ilomodel.h
Constraint that enforces inequality.

An instance of this class is a constraint that enforces inequality (that is, “not equal” as specified by !=) in Concert Technology.

To create a constraint, you can:

In order for the 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.

See Also:

Constructor Summary
public IloDiff()
public IloDiff(IloDiffI * impl)
public IloDiff(const IloEnv env, const IloNumExprArg expr1, const IloNumExprArg expr2, const char * name=0)
public IloDiff(const IloEnv env, const IloNumExprArg expr1, IloNum val, const char * name=0)
Method Summary
public IloDiffI *getImpl() const
Inherited Methods from IloConstraint
getImpl
Inherited Methods from IloIntExprArg
getImpl
Inherited Methods from IloNumExprArg
getImpl
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

IloDiff

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

IloDiff

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

IloDiff

public IloDiff(const IloEnv env, const IloNumExprArg expr1, const IloNumExprArg expr2, const char * name=0)

This constructor creates a constraint that enforces inequality (!=) in a model between the two expressions that are passed as its arguments. You must use the template IloAdd or the member function IloModel::add to add this constraint to a model in order for it to be taken into account.

The optional argument name is set to 0 by default.


IloDiff

public IloDiff(const IloEnv env, const IloNumExprArg expr1, IloNum val, const char * name=0)

This constructor creates a constraint that enforces inequality (!=) in a model between the expression expr1 and the floating-point value that are passed as its arguments. You must use the template IloAdd or the member function IloModel::add to add this constraint to a model in order for it to be taken into account.

The optional argument name is set to 0 by default.


Method Detail

getImpl

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