Generated on for Gecode by doxygen 1.17.0
Test::Set::SetTest Class Referenceabstract

Base class for tests with set constraints More...

#include <test/set.hh>

Public Member Functions

 SetTest (const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0)
 Constructor.
 SetTest (TestTags tags, const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0)
 Construct and register a test with explicitly assigned tags.
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.
Public Member Functions inherited from Test::Base
 Base (std::string s)
 Create and register a standard test with name s.
 Base (std::string s, TestTags t)
 Create and register test with name s and tags t.
const std::string & name (void) const
 Return name of test.
TestTags tags (void) const
 Return tags for test.
Base * next (void) const
 Return next test.
void next (Base *n)
 Set next test.
bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
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 Public Member Functions inherited from Test::Base
static void sort (void)
 Sort tests alphabetically.
static Base * tests (void)
 Return all tests.
static bool fixpoint (Gecode::Support::RandomGenerator &rand)
 Throw a coin whether to compute a fixpoint.
static std::string str (bool b)
 Map bool 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.
Gecode::Support::RandomGenerator _rand
 Random number generator.

Detailed Description

Base class for tests with set constraints

Definition at line 287 of file set.hh.

Constructor & Destructor Documentation

◆ SetTest() [1/2]

Test::Set::SetTest::SetTest ( const std::string & s,
int a,
const Gecode::IntSet & d,
bool r = false,
int w = 0 )
inline

Constructor.

Constructs a test with name s and arity a and variable domain d. Also tests for a reified constraint, if r is true, checking all three reification modes. In addition, w integer variables are provided.

Definition at line 312 of file set.hh.

◆ SetTest() [2/2]

Test::Set::SetTest::SetTest ( TestTags tags,
const std::string & s,
int a,
const Gecode::IntSet & d,
bool r = false,
int w = 0 )
inline

Construct and register a test with explicitly assigned tags.

Definition at line 316 of file set.hh.

Member Function Documentation

◆ solution()

◆ post() [1/2]

◆ post() [2/2]

◆ run()

bool Test::Set::SetTest::run ( void )
virtual

Perform test.

Implements Test::Base.

Definition at line 722 of file set.cpp.

◆ str() [1/4]

std::string Test::Set::SetTest::str ( Gecode::SetRelType srt)
inlinestatic

Map set relation to string.

Definition at line 46 of file set.hpp.

◆ str() [2/4]

std::string Test::Set::SetTest::str ( Gecode::SetOpType srt)
inlinestatic

Map set operation to string.

Definition at line 64 of file set.hpp.

◆ str() [3/4]

std::string Test::Set::SetTest::str ( int i)
inlinestatic

Map integer to string.

Definition at line 38 of file set.hpp.

◆ str() [4/4]

std::string Test::Set::SetTest::str ( const Gecode::IntArgs & i)
inlinestatic

Map integer array to string.

Definition at line 76 of file set.hpp.

Member Data Documentation

◆ disabled

bool Test::Set::SetTest::disabled
protected

Whether to perform full tests for disabled propagators.

Definition at line 300 of file set.hh.

◆ testsubsumed

bool Test::Set::SetTest::testsubsumed
protected

Whether to check for subsumption.

Definition at line 302 of file set.hh.


The documentation for this class was generated from the following files: