Generated on Thu Mar 22 10:39:47 2012 for Gecode by doxygen 1.6.3

ter-dom.hpp File Reference

(Revision: 10364)

Go to the source code of this file.

Namespaces

namespace  Gecode
 

Gecode toplevel namespace


namespace  Gecode::Int
 

Finite domain integers.


namespace  Gecode::Int::Distinct
 

Distinct propagators


Defines

#define GECODE_INT_HALL_ONE(x0, x1, x2)
 Check whether x0 forms a Hall set of cardinality one.
#define GECODE_INT_HALL_TWO(x0, x1, x2)
 Check whether x0 and x1 form a Hall set of cardinality two.

Define Documentation

#define GECODE_INT_HALL_ONE ( x0,
x1,
x2   ) 
Value:
if (x0.assigned()) {                          \
    GECODE_ME_CHECK(x1.nq(home,x0.val()));      \
    GECODE_ME_CHECK(x2.nq(home,x0.val()));      \
    if (x1.assigned()) {                        \
      GECODE_ME_CHECK(x2.nq(home,x1.val()));    \
      return home.ES_SUBSUMED(*this);            \
    }                                           \
    if (x2.assigned()) {                        \
      GECODE_ME_CHECK(x1.nq(home,x2.val()));    \
      return home.ES_SUBSUMED(*this);            \
    }                                           \
    return ES_FIX;                              \
  }

Check whether x0 forms a Hall set of cardinality one.

Definition at line 70 of file ter-dom.hpp.

#define GECODE_INT_HALL_TWO ( x0,
x1,
x2   ) 
Value:
if ((x0.size() == 2) && (x1.size() == 2) &&                   \
      (x0.min() == x1.min()) && (x0.max() == x1.max())) {       \
    GECODE_ME_CHECK(x2.nq(home,x0.min()));                      \
    GECODE_ME_CHECK(x2.nq(home,x0.max()));                      \
    return ES_FIX;                                              \
  }

Check whether x0 and x1 form a Hall set of cardinality two.

Definition at line 87 of file ter-dom.hpp.