[ library(gfd) | Reference Manual | Alphabetic Index ]
# <ConsistencyModule:> ?ExprX #\= ?ExprY

ExprX is not equal to ExprY.
*ExprX*
- Integer arithmetic expression
*ExprY*
- Integer arithmetic expression

## Description

Constrains ExprX to be not equal to ExprY. Also constrains all variables
appearing in ExprX and ExprY to be domain variable and checks that all
constants and ground sub-expressions are integers.

ConsistencyModule is the optional module specification to give the
consistency level for the propagation for this constraint: gfd_bc
for bounds consistency, and gfd_gac for domain (generalised arc)
consistency. Note that some operators (integer division, modulus)
only support bounds consistency and will be propagated with bounds
consistency even when posted with gfd_gac.

This constraint is implemented using Gecode's MiniModel's rel() for
both integer and boolean expressions, with sub-expressions/constraints
not supported by MiniModel factored out and posted as auxiliary
constraints.

A more restricted version of this constraint is defined in the
global constraint catalog as 'neq'. Here the constraint is defined
between two domain variables rather than two expressions.

### Modules

This predicate is sensitive to its module context (tool predicate, see @/2).
## See Also

#< / 2, #=< / 2, #= / 2, #>= / 2, #> / 2, #\= / 3, suspend : #\= / 2, ic : #\= / 2, fd : #\= / 2