40 #ifndef __GECODE_TEST_SET_HH__ 41 #define __GECODE_TEST_SET_HH__ 74 : dv(d0), cur(cur0), i(1) {
95 }
while (! (i & cur) && i<cur);
98 int val(
void)
const {
return dv.
val(); }
169 assert((i>=0) && (i<n));
262 unsigned int propagators(
void);
310 :
Base(
"Set::"+s), arity(a), lub(d), reified(
r), withInt(w),
311 disabled(true), testsubsumed(true) {}
321 virtual bool run(
void);
330 static std::string str(
int i);
virtual void post(Gecode::Space &, Gecode::SetVarArray &, Gecode::IntVarArray &, Gecode::Reify)
Post reified propagator.
Iterator for Boolean operation types.
bool disabled
Whether to perform full tests for disabled propagators.
CountableSetRanges(const Gecode::IntSet &d, int cur)
Initialize with set d0 and bit-pattern cur0.
SetRelType
Common relation types for sets.
Iterator for set relation types.
bool testsubsumed
Whether to check for subsumption.
void operator++(void)
Move to next value.
Gecode::Reify r
Reification information.
void post(Home home, Term *t, int n, FloatRelType frt, FloatVal c)
Post propagator for linear constraint over floats.
void log(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Gecode::SetVarArray x
Set variables to be tested.
ExecStatus subsumed(Space &home, Propagator &p, int c, TaskArray< Task > &t)
Check for subsumption (all tasks must be assigned)
CountableSet(void)
Default constructor.
int val(void) const
Return current subset.
bool operator()(void) const
Test if finished.
SetOpType
Common operations for sets.
CountableSetRanges(void)
Default constructor.
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
SetTest(const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0)
Constructor.
int val(void) const
Return current value.
void init(const Gecode::IntSet &d, int cur)
Initialize with set d0 and bit-pattern cur0.
bool reified
Whether the test is for a reified propagator.
Gecode::FloatVal c(-8, 8)
int n
Number of negative literals for node type.
IntRelType
Relation types for integers.
void init(I &i)
Initialize with value iterator i.
Range iterator from value iterator.
Reification specification.
Base class for all tests to be run
Gecode::IntSet lub
The common superset for all domains.
const Test::Int::Assignment & ints(void) const
Return assignment for integer variables.
CountableSetValues(void)
Default constructor.
Value iterator producing subsets of an IntSet.
Passing integer arguments.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const Dictionary &d)
Print statistics summary.
Gecode::IntSet d
Initial domain.
LinIntExpr cardinality(const SetExpr &e)
Cardinality of set expression.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
int val(void) const
Return current value.
Post propagator for SetVar SetOpType SetVar y
int withInt
How many integer variables to iterate.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
Base class for tests with set constraints
Generate all set assignments.
Base class for assignments
bool assigned(View x, int v)
Whether x is assigned to value v.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
bool same(const Item &i, const Item &j)
Whether two items are the same.
Gecode::IntVarArray y
Int variables to be tested.
~SetAssignment(void)
Destructor.
Value iterator for integer sets.
Range iterator producing subsets of an IntSet.
int withInt
How many integer variables are used by the test.
Post propagator for SetVar x
CountableSetValues(const Gecode::IntSet &d0, int cur0)
Initialize with set d0 and bit-pattern cur0.
void init(const Gecode::IntSet &d0, int cur0)
Initialize with set d0 and bit-pattern cur0.
bool operator()(void) const
Test whether all assignments have been iterated.
int size(void) const
Return arity.
SetTest * test
The test currently run.
Space for executing set tests.
void assign(Home home, const FloatVarArgs &x, FloatAssign fa, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with value selection vals.
Iterate all subsets of a given set.
ReifyMode
Mode for reification.
int intval(void) const
Return value for first integer variable.
int operator[](int i) const
Return value for variable i.
bool operator()(void) const
Check if still subsets left.
Generate all assignments.