| Overview | Group | Tree | Graph | Index | Concepts |

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:
operator!= on constrained
variables (instances of IloNumVar
and its subclasses)
or expressions (instances of IloExpr and its
subclasses).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:
IloAllDiff, IloConstraint, IloExpr, IloNumVar
| 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 |
|---|
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.
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 |
|---|