Base class for tests with set constraints More...
#include <set.hh>
Public Member Functions | |
SetTest (const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0) | |
Constructor. | |
virtual bool | solution (const SetAssignment &) const =0 |
Check for solution. | |
virtual void | post (Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &y)=0 |
Post propagator. | |
virtual void | post (Gecode::Space &, Gecode::SetVarArray &, Gecode::IntVarArray &, Gecode::Reify) |
Post reified propagator. | |
virtual bool | run (void) |
Perform test. | |
![]() | |
Base (const std::string &s) | |
Create and register test with name s. | |
const std::string & | name (void) const |
Return name of test. | |
Base * | next (void) const |
Return next test. | |
void | next (Base *n) |
Set next test. | |
virtual | ~Base (void) |
Destructor. | |
Protected Attributes | |
bool | disabled |
Whether to perform full tests for disabled propagators. | |
bool | testsubsumed |
Whether to check for subsumption. | |
Mapping scalar values to strings | |
static std::string | str (Gecode::SetRelType srt) |
Map set relation to string. | |
static std::string | str (Gecode::SetOpType srt) |
Map set operation to string. | |
static std::string | str (int i) |
Map integer to string. | |
static std::string | str (const Gecode::IntArgs &i) |
Map integer array to string. | |
Additional Inherited Members | |
![]() | |
static void | sort (void) |
Sort tests alphabetically. | |
static Base * | tests (void) |
Return all tests. | |
static bool | fixpoint (void) |
Throw a coin whether to compute a fixpoint. | |
![]() | |
static Gecode::Support::RandomGenerator | rand = Gecode::Support::RandomGenerator() |
Random number generator. | |
![]() | |
int | main (int argc, char *argv[]) |
Main function. | |
|
inline |
|
pure virtual |
Check for solution.
Implemented in Test::Set::Channel::ChannelBool, Test::Set::Channel::ChannelInt, Test::Set::Channel::ChannelSet, Test::Set::Channel::ChannelSorted, Test::Set::Convex::Convex, Test::Set::Convex::ConvexHull, Test::Set::Convex::ConvexHullS, Test::Set::Distinct::AtmostOne, Test::Set::Dom::CardRange, Test::Set::Dom::DomDom, Test::Set::Dom::DomInt, Test::Set::Dom::DomIntRange, Test::Set::Dom::DomRange, Test::Set::Element::ElementDisjoint, Test::Set::Element::ElementInter, Test::Set::Element::ElementInterIn, Test::Set::Element::ElementSet, Test::Set::Element::ElementSetConst, Test::Set::Element::ElementUnion, Test::Set::Element::ElementUnionConst, Test::Set::Element::MatrixIntSet, Test::Set::Exec::Wait, Test::Set::Int::Card, Test::Set::Int::Elem, Test::Set::Int::IntRel, Test::Set::Int::Max, Test::Set::Int::Min, Test::Set::Int::NoElem, Test::Set::Int::NotMax, Test::Set::Int::NotMin, Test::Set::Int::Rel, Test::Set::Int::Weights, Test::Set::Precede::Multi, Test::Set::Precede::Single, Test::Set::Rel::ITE, Test::Set::Rel::RelBin, Test::Set::RelOp::Rel, Test::Set::RelOp::RelIntN, Test::Set::RelOp::RelN, Test::Set::RelOpConst::RelISI, Test::Set::RelOpConst::RelSIS, Test::Set::RelOpConst::RelSSI, Test::Set::Sequence::SeqU, Test::Set::Sequence::Sequence, and Test::Set::Var::Construct.
|
pure virtual |
Post propagator.
Implemented in Test::Set::Channel::ChannelBool, Test::Set::Channel::ChannelInt, Test::Set::Channel::ChannelSet, Test::Set::Channel::ChannelSorted, Test::Set::Convex::Convex, Test::Set::Convex::ConvexHull, Test::Set::Convex::ConvexHullS, Test::Set::Distinct::AtmostOne, Test::Set::Dom::CardRange, Test::Set::Dom::DomDom, Test::Set::Dom::DomInt, Test::Set::Dom::DomIntRange, Test::Set::Dom::DomRange, Test::Set::Element::ElementDisjoint, Test::Set::Element::ElementInter, Test::Set::Element::ElementInterIn, Test::Set::Element::ElementSet, Test::Set::Element::ElementSetConst, Test::Set::Element::ElementUnion, Test::Set::Element::ElementUnionConst, Test::Set::Element::MatrixIntSet, Test::Set::Exec::Wait, Test::Set::Int::Card, Test::Set::Int::Elem, Test::Set::Int::IntRel, Test::Set::Int::Max, Test::Set::Int::Min, Test::Set::Int::NoElem, Test::Set::Int::NotMax, Test::Set::Int::NotMin, Test::Set::Int::Rel, Test::Set::Int::Weights, Test::Set::Precede::Multi, Test::Set::Precede::Single, Test::Set::Rel::ITE, Test::Set::Rel::RelBin, Test::Set::RelOp::Rel, Test::Set::RelOp::RelIntN, Test::Set::RelOp::RelN, Test::Set::RelOpConst::RelISI, Test::Set::RelOpConst::RelSIS, Test::Set::RelOpConst::RelSSI, Test::Set::Sequence::SeqU, Test::Set::Sequence::Sequence, and Test::Set::Var::Construct.
|
inlinevirtual |
Post reified propagator.
Reimplemented in Test::Set::Dom::DomDom, Test::Set::Dom::DomInt, Test::Set::Dom::DomIntRange, Test::Set::Dom::DomRange, Test::Set::Int::Card, Test::Set::Int::Elem, Test::Set::Int::IntRel, Test::Set::Int::Max, Test::Set::Int::Min, Test::Set::Int::Rel, and Test::Set::Rel::RelBin.
|
virtual |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
protected |
|
protected |