Go to the documentation of this file.
36 #ifndef __GECODE_TEST_INT_HH__
37 #define __GECODE_TEST_INT_HH__
204 void prune(
int i,
bool bounds_only);
243 bool eqv(
void)
const;
246 bool imp(
void)
const;
248 bool pmi(
void)
const;
259 Test(
const std::string&
p,
const std::string& s,
270 Test(
const std::string& s,
281 Test(
const std::string&
p,
const std::string& s,
282 int a,
int min,
int max,
bool r=
false,
292 Test(
const std::string& s,
293 int a,
int min,
int max,
bool r=
false,
307 virtual bool run(
void);
317 static std::string
str(
bool b);
319 static std::string
str(
int i);
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
virtual bool ignore(const Assignment &) const
Whether to ignore assignment for reification.
IntRelType
Relation types for integers.
Iterator for integer relation types.
Post propagator for SetVar SetOpType SetVar y
bool testsearch
Whether to perform search test.
ConTestLevel contest
Whether to test for certain consistency.
virtual ~Assignment(void)
Destructor.
void reset(void)
Reset iterator.
void operator++(void)
Increment to next level.
Test * test
The test currently run.
virtual void operator++(void)
Move to next assignment.
virtual int operator[](int i) const
Return value for variable i.
virtual int operator[](int i) const
Return value for variable i.
void operator++(void)
Increment to next level.
Gecode::IntPropLevel ipl
Propagation level.
void operator++(void)
Increment to next relation type.
Generate random selection of assignments.
Gecode::IntRelType irt(void) const
Return current relation type.
BoolOpTypes(void)
Initialize iterator.
void rndrel(const Assignment &a, int i, Gecode::IntRelType &irt, int &v)
Randomly select a pruning rel for variable i.
int n
Number of variables.
bool operator()(void) const
Test whether iterator is done.
Test for domain-consistency.
virtual int operator[](int i) const =0
Return value for variable i.
int randval(const Gecode::IntSet &d)
int a
How many assigments still to be generated.
Test for bounds(z)-consistency.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
IntPropLevel
Propagation levels for integer propagators.
ConTestLevel
Level of consistency to test for.
Space for executing tests.
virtual void operator++(void)
Move to next assignment.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
virtual int operator[](int i) const
Return value for variable i.
int size(void) const
Return number of variables.
virtual ~CpltAssignment(void)
Destructor.
bool operator()(void) const
Test whether iterator is done.
struct Gecode::Space::@61::@63 c
Data available only during copying.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
virtual bool run(void)
Perform test.
bool testfix
Whether to perform fixpoint test.
Base class for all tests to be run
Gecode::IntPropLevel ipl(void) const
Return current level.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
Gecode::Reify r
Reification information.
Iterator for Boolean operation types.
Test for bounds(d)-consistency.
virtual Assignment * assignment(void) const
Create assignment.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
bool failed(void)
Compute a fixpoint and check for failure.
bool operator()(void) const
Test whether iterator is done.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
Node * x
Pointer to corresponding Boolean expression node.
BoolOpType
Operation types for Booleans.
bool assigned(void) const
Test whether all variables are assigned.
IntPropLevels(void)
Initialize iterator.
Reification specification.
IntRelTypes(void)
Initialize iterator.
Gecode::IntSetValues * dsv
Iterator for each variable.
bool imp(void) const
Test whether implication as reification mode is supported.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
virtual void operator++(void)=0
Move to next assignment.
int a
How many assigments still to be generated Generate new value according to domain.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
IntPropBasicAdvanced(void)
Initialize iterator.
int _n1
How many variables in the second set.
const int max
Largest allowed integer value.
int * vals
The current values for the variables.
void prune(void)
Prune some random values for some random variable.
void operator++(void)
Increment to next operation type.
Iterator for simple integer propagation levels.
Gecode::BoolOpType bot(void) const
Return current operation type.
virtual ~RandomAssignment(void)
Destructor.
void assign(const Assignment &a, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
int arity
Number of variables.
int * vals
The current values for the variables.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
RandomMixAssignment(int n0, const Gecode::IntSet &d0, int n1, const Gecode::IntSet &d1, int a0)
Initialize for a assignments for n0 variables and values d0.
Generate all assignments.
Base class for assignments
void bound(void)
Assing a random variable to a random bound.
unsigned int propagators(void)
Return the number of propagators.
virtual bool solution(const Assignment &) const =0
Check for solution.
void post(void)
Post propagator.
bool reified
Does the constraint also exist as reified constraint.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
Simple propagation levels.
bool operator()(void) const
Test whether iterator is done.
virtual void operator++(void)
Move to next assignment.
ReifyMode
Mode for reification.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
bool reified
Whether the test is for a reified propagator.
void enable(void)
Enable propagators in space.
virtual ~RandomMixAssignment(void)
Destructor.
const int min
Smallest allowed integer value.
virtual Gecode::Space * copy(void)
Copy space during cloning.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntPropLevel i=Gecode::IPL_DEF)
Constructor.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
Generate random selection of assignments.
int rndvar(void)
Randomly select an unassigned variable.
Gecode::IntSet d
Initial domain.
void disable(void)
Disable propagators in space and compute fixpoint (make all idle)
Gecode::IntVarArray x
Variables to be tested.
int n
Number of negative literals for node type.
Passing integer arguments.
Value iterator for integer sets.
bool disabled(const Assignment &a, TestSpace &c, bool testfix)
Prune values also in a space c with disabled propagators, but not those in assignment a.
Gecode::IntArgs i({1, 2, 3, 4})
Gecode::IntSet d
Domain for each variable.
int p
Number of positive literals for node type.
int rms
Which reification modes are supported.
Gecode::IntSet dom
Domain of variables.
Gecode::IntPropLevel ipl(void) const
Return current level.
Iterator for basic and advanced integer propagation levels.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.