36#ifndef __GECODE_TEST_INT_HH__
37#define __GECODE_TEST_INT_HH__
204 void prune(
int i,
bool bounds_only);
244 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);
Passing integer arguments.
Value iterator for integer sets.
Reification specification.
struct Gecode::Space::@055132133326276162005044145100211202071356247106::@155123175027073262103111264343315000271204104107 c
Data available only during copying.
Base(const std::string &s)
Create and register test with name s.
Base class for assignments
Gecode::IntSet d
Domain for each variable.
int n
Number of variables.
virtual ~Assignment(void)
Destructor.
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
virtual void operator++(void)=0
Move to next assignment.
int size(void) const
Return number of variables.
virtual bool operator()(void) const =0
Test whether all assignments have been iterated.
virtual int operator[](int i) const =0
Return value for variable i.
BoolOpTypes(void)
Initialize iterator.
bool operator()(void) const
Test whether iterator is done.
Gecode::BoolOpType bot(void) const
Return current operation type.
void operator++(void)
Increment to next operation type.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
virtual int operator[](int i) const
Return value for variable i.
virtual ~CpltAssignment(void)
Destructor.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
Gecode::IntSetValues * dsv
Iterator for each variable.
virtual void operator++(void)
Move to next assignment.
Gecode::IntPropLevel ipl(void) const
Return current level.
bool operator()(void) const
Test whether iterator is done.
IntPropBasicAdvanced(void)
Initialize iterator.
void operator++(void)
Increment to next level.
IntPropLevels(void)
Initialize iterator.
Gecode::IntPropLevel ipl(void) const
Return current level.
bool operator()(void) const
Test whether iterator is done.
void operator++(void)
Increment to next level.
void operator++(void)
Increment to next relation type.
bool operator()(void) const
Test whether iterator is done.
void reset(void)
Reset iterator.
IntRelTypes(void)
Initialize iterator.
Gecode::IntRelType irt(void) const
Return current relation type.
virtual int operator[](int i) const
Return value for variable i.
virtual ~RandomAssignment(void)
Destructor.
RandomAssignment(int n, const Gecode::IntSet &d, int a)
Initialize for a assignments for n0 variables and values d0.
int a
How many assigments still to be generated Generate new value according to domain.
int * vals
The current values for the variables.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual void operator++(void)
Move to next assignment.
int _n1
How many variables in the second set.
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.
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
virtual int operator[](int i) const
Return value for variable i.
virtual bool operator()(void) const
Test whether all assignments have been iterated.
virtual ~RandomMixAssignment(void)
Destructor.
int a
How many assigments still to be generated.
int * vals
The current values for the variables.
virtual void operator++(void)
Move to next assignment.
int randval(const Gecode::IntSet &d)
Gecode::Reify r
Reification information.
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
Gecode::IntSet d
Initial domain.
void rndrel(const Assignment &a, int i, Gecode::IntRelType &irt, int &v)
Randomly select a pruning rel for variable i.
Test * test
The test currently run.
virtual Gecode::Space * copy(void)
Copy space during cloning.
void post(void)
Post propagator.
bool assigned(void) const
Test whether all variables are assigned.
void prune(void)
Prune some random values for some random variable.
void bound(void)
Assing a random variable to a random bound.
void assign(const Assignment &a, bool skip=false)
Assign all (or all but one, if skip is true) variables to values in a.
bool failed(void)
Compute a fixpoint and check for failure.
bool reified
Whether the test is for a reified propagator.
int rndvar(void)
Randomly select an unassigned variable.
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.
void disable(void)
Disable propagators in space and compute fixpoint (make all idle)
Gecode::IntVarArray x
Variables to be tested.
void enable(void)
Enable propagators in space.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
unsigned int propagators(void)
Return the number of propagators.
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
virtual bool run(void)
Perform test.
bool reified
Does the constraint also exist as reified constraint.
virtual bool ignore(const Assignment &) const
Whether to ignore assignment for reification.
bool testsearch
Whether to perform search test.
bool testfix
Whether to perform fixpoint test.
int rms
Which reification modes are supported.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
Gecode::IntPropLevel ipl
Propagation level.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
int arity
Number of variables.
static std::string str(Gecode::IntPropLevel ipl)
Map integer propagation level to string.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
virtual bool solution(const Assignment &) const =0
Check for solution.
virtual Assignment * assignment(void) const
Create assignment.
Gecode::IntSet dom
Domain of variables.
bool imp(void) const
Test whether implication as reification mode is supported.
ConTestLevel contest
Whether to test for certain consistency.
IntRelType
Relation types for integers.
ReifyMode
Mode for reification.
BoolOpType
Operation types for Booleans.
IntPropLevel
Propagation levels for integer propagators.
@ IPL_DEF
Simple propagation levels.
Testing finite domain integers.
ConTestLevel
Level of consistency to test for.
@ CTL_BOUNDS_Z
Test for bounds(z)-consistency.
@ CTL_BOUNDS_D
Test for bounds(d)-consistency.
@ CTL_NONE
No consistency-test.
@ CTL_DOMAIN
Test for domain-consistency.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const Dictionary &d)
Print statistics summary.