37 boost::shared_ptr<SingleValue> factor(
new SingleValue(dkey, value));
43 boost::shared_ptr<BinaryAllDiff> factor(
50 boost::shared_ptr<AllDiff> factor(
new AllDiff(dkeys));
63 sharedValues optimalAssignment()
const;
85 void runArcConsistency(
size_t cardinality,
size_t nrIterations = 10,
86 bool print =
false)
const;
void print(const Matrix &A, const string &s, ostream &stream)
void addAllDiff(const DiscreteKeys &dkeys)
Add a general AllDiff constraint.
static enum @843 ordering
const Symbol key1('v', 1)
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
std::pair< Key, size_t > DiscreteKey
void addAllDiff(const DiscreteKey &key1, const DiscreteKey &key2)
Add a binary AllDiff constraint.
const Symbol key2('v', 2)
boost::shared_ptr< Values > sharedValues
void addSingleValue(const DiscreteKey &dkey, size_t value)
Add a unary constraint, allowing only a single value.
DiscreteKeys is a set of keys that can be assembled using the & operator.