40 #ifndef __GECODE_TEST_INT_HH__
41 #define __GECODE_TEST_INT_HH__
204 void prune(
int i,
bool bounds_only);
235 bool eqv(
void)
const;
238 bool imp(
void)
const;
240 bool pmi(
void)
const;
251 Test(
const std::string&
p,
const std::string& s,
262 Test(
const std::string& s,
273 Test(
const std::string&
p,
const std::string& s,
274 int a,
int min,
int max,
bool r=
false,
284 Test(
const std::string& s,
285 int a,
int min,
int max,
bool r=
false,
299 virtual bool run(
void);
311 static std::string
str(
int i);
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.
virtual void operator++(void)
Move to next assignment.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
Gecode::IntSet d
Initial domain.
IntConLevel
Consistency levels for integer propagators.
Gecode::IntVarArray x
Variables to be tested.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
Test(const std::string &p, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF)
Constructor.
virtual void operator++(void)
Move to next assignment.
int a
How many assigments still to be generated Generate new value according to domain. ...
BoolOpType
Operation types for Booleans.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Gecode::Reify r
Reification information.
virtual ~RandomAssignment(void)
Destructor.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Gecode::IntSet dom
Domain of variables.
Iterator for integer consistency levels.
bool failed(void)
Compute a fixpoint and check for failure.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
Gecode::IntConLevel icl(void) const
Return current level.
Space for executing tests.
ConTestLevel contest
Whether to test for certain consistency.
const int max
Largest allowed integer value.
int rms
Which reification modes are supported.
int _n1
How many variables in the second set.
virtual ~CpltAssignment(void)
Destructor.
Generate random selection of assignments.
const int min
Smallest allowed integer value.
int n
Number of variables.
bool assigned(void) const
Test whether all variables are assigned.
virtual Gecode::Space * copy(bool share)
Copy space during cloning.
virtual int operator[](int i) const =0
Return value for variable i.
Gecode::IntSet d
Domain for each variable.
virtual Assignment * assignment(void) const
Create assignment.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
void prune(void)
Prune some random values for some random variable.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
bool operator()(void) const
Test whether iterator is done.
Generate random selection of assignments.
virtual bool run(void)
Perform test.
Gecode::IntConLevel icl
Consistency level.
IntRelType
Relation types for integers.
ConTestLevel
Level of consistency to test for.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
int a
How many assigments still to be generated.
void operator++(void)
Increment to next level.
void bound(void)
Assing a random variable to a random bound.
int * vals
The current values for the variables.
IntRelTypes(void)
Initialize iterator.
Iterator for integer relation types.
virtual void operator++(void)=0
Move to next assignment.
virtual int operator[](int i) const
Return value for variable i.
Reification specification.
Base class for all tests to be run
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
Gecode::IntSetValues * dsv
Iterator for each variable.
bool imp(void) const
Test whether implication as reification mode is supported.
Test for bounds(z)-consistency.
Test for bounds(d)-consistency.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
Test for domain-consistency.
virtual bool ignore(const Assignment &) const
Whether to ignore assignment for reification.
int randval(const Gecode::IntSet &d)
ExtensionalPropKind
Extensional propagation kind.
Gecode::IntRelType irt(void) const
Return current relation type.
bool operator()(void) const
Test whether iterator is done.
Passing integer arguments.
void operator++(void)
Increment to next operation type.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
bool testfix
Whether to perform fixpoint test.
virtual ~RandomMixAssignment(void)
Destructor.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
Node * x
Pointer to corresponding Boolean expression node.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
bool testsearch
Whether to perform search test.
void assign(const Assignment &a, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a.
Base class for assignments
IntConLevels(void)
Initialize iterator.
The default consistency for a constraint.
Value iterator for integer sets.
bool operator()(void) const
Test whether iterator is done.
void operator++(void)
Increment to next relation type.
virtual int operator[](int i) const
Return value for variable i.
BoolOpTypes(void)
Initialize iterator.
Iterator for Boolean operation types.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const FloatView &x)
Print float variable view.
virtual int operator[](int i) const
Return value for variable i.
int arity
Number of variables.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
void reset(void)
Reset iterator.
virtual void operator++(void)
Move to next assignment.
virtual ~Assignment(void)
Destructor.
Test * test
The test currently run.
ReifyMode
Mode for reification.
void post(void)
Post propagator.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int size(void) const
Return number of variables.
bool reified
Does the constraint also exist as reified constraint.
Gecode::BoolOpType bot(void) const
Return current operation type.
Generate all assignments.
int * vals
The current values for the variables.
bool reified
Whether the test is for a reified propagator.
virtual bool solution(const Assignment &) const =0
Check for solution.