int.hh
Go to the documentation of this file.
118 RandomAssignment(int n, const Gecode::IntSet& d, int a0, Gecode::Support::RandomGenerator& rand);
204 void rndrel(const Assignment& a, int i, Gecode::IntRelType& irt, int& v, Gecode::Support::RandomGenerator& rand);
228 bool disabled(const Assignment& a, TestSpace& c, bool testfix, Gecode::Support::RandomGenerator& rand);
510GECODE_TESTINT_EXPORT std::ostream& operator<<(std::ostream& os, const ::Test::Int::Assignment& a);
Assignment(int n0, const Gecode::IntSet &d0)
Initialize assignments for n0 variables and values d0.
Definition int.hpp:43
virtual void next(Gecode::Support::RandomGenerator &rand)=0
Move to next assignment.
virtual bool has_more(void) const =0
Test whether all assignments have been iterated.
CpltAssignment(int n, const Gecode::IntSet &d)
Initialize assignments for n0 variables and values d0.
Definition int.hpp:54
virtual void next(Gecode::Support::RandomGenerator &rand)
Move to next assignment.
virtual bool has_more(void) const
Test whether all assignments have been iterated.
Definition int.hpp:61
void post(Gecode::Space &home, Gecode::IntVarArray &x) override
Adapt the relation to the ordinary closed-list tests.
OpenTest(const std::string &name, int items, int extra, const Gecode::IntSet &domain, Gecode::IntPropLevel ipl=Gecode::IPL_DEF)
Initialize item and auxiliary variables with the common domain.
virtual void post(Gecode::Space &home, Gecode::OpenIntVarList list, Gecode::IntVarArray &x)=0
Post the tested relation on an open list and its variable array.
int a
How many assignments still to be generated Generate new value according to domain.
Definition int.hh:113
virtual void next(Gecode::Support::RandomGenerator &rand)
Move to next assignment.
RandomAssignment(int n, const Gecode::IntSet &d, int a0, Gecode::Support::RandomGenerator &rand)
Initialize for a assignments for n0 variables and values d0.
Definition int.hpp:88
int randval(Gecode::Support::RandomGenerator &rand)
Definition int.hpp:76
virtual bool has_more(void) const
Test whether all assignments have been iterated.
Definition int.hpp:95
int randval(const Gecode::IntSet &d, Gecode::Support::RandomGenerator &rand)
Definition int.hpp:109
Gecode::IntSet _d1
Domain for second set of variables Generate new value according to domain d.
Definition int.hh:135
virtual bool has_more(void) const
Test whether all assignments have been iterated.
Definition int.hpp:132
virtual void next(Gecode::Support::RandomGenerator &rand)
Move to next assignment.
RandomMixAssignment(int n0, const Gecode::IntSet &d0, int n1, const Gecode::IntSet &d1, int a0, Gecode::Support::RandomGenerator &rand)
Initialize for a assignments for n0 variables and values d0.
Definition int.hpp:121
int rndvar(Gecode::Support::RandomGenerator &rand)
Randomly select an unassigned variable.
void assign(const Assignment &a, bool skip, Gecode::Support::RandomGenerator &rand)
Assign all (or all but one, if skip is true) variables to values in a.
bool prune(const Assignment &a, bool testfix, Gecode::Support::RandomGenerator &rand)
Prune values but not those in assignment a.
TestSpace(int n, Gecode::IntSet &d, Test *t)
Create test space without reification.
void rndrel(const Assignment &a, int i, Gecode::IntRelType &irt, int &v, Gecode::Support::RandomGenerator &rand)
Randomly select a pruning rel for variable i.
bool disabled(const Assignment &a, TestSpace &c, bool testfix, Gecode::Support::RandomGenerator &rand)
Prune values also in a space c with disabled propagators, but not those in assignment a.
void prune(Gecode::Support::RandomGenerator &rand)
Prune some random values for some random variable.
void prune(int i, bool bounds_only, Gecode::Support::RandomGenerator &rand)
Prune some random values from variable i.
void disable(void)
Disable propagators in space and compute fixpoint (make all idle).
TestSpace(int n, Gecode::IntSet &d, Test *t, Gecode::ReifyMode rm)
Create test space with reification.
void bound(Gecode::Support::RandomGenerator &rand)
Assign a random variable to a random bound.
void rel(int i, Gecode::IntRelType irt, int n)
Perform integer tell operation on x[i].
bool pmi(void) const
Test whether reverse implication as reification mode is supported.
Definition int.hpp:160
int rms
Supported reification modes, encoded as a bit mask of 1 << Gecode::RM_*.
Definition int.hh:279
virtual Assignment * assignment(void) const
Create the assignment generator (complete by default).
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)=0
Post constraint.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x, Gecode::Reify r)
Post reified constraint.
bool eqv(void) const
Test whether equivalence as reification mode is supported.
Definition int.hpp:152
virtual bool ignore(const Assignment &) const
Whether to ignore assignment for reification.
static bool cmp(T x, Gecode::IntRelType r, T y)
Compare x and y with respect to r.
Definition int.hpp:296
bool imp(void) const
Test whether implication as reification mode is supported.
Definition int.hpp:156
LinearCongruentialGenerator< 2147483647, 48271, 44488, 3399 > RandomGenerator
Default values for linear congruential generator.
Definition random.hpp:183
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const Dictionary &d)
Print statistics summary.
Definition scowl.hpp:13625
