Generated on Fri Aug 31 2012 16:23:32 for Gecode by doxygen 1.8.1.2
Test::Int::Test Class Reference

Base class for tests with integer constraints More...

#include <int.hh>

Public Member Functions

 Test (const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF)
 Constructor.
 Test (const std::string &s, int a, int min, int max, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF)
 Constructor.
virtual Assignmentassignment (void) const
 Create assignment.
virtual bool solution (const Assignment &) const =0
 Check for solution.
virtual bool ignore (const Assignment &) const
 Whether to ignore assignment for reification.
virtual void post (Gecode::Space &home, Gecode::IntVarArray &x)=0
 Post constraint.
virtual void post (Gecode::Space &home, Gecode::IntVarArray &x, Gecode::BoolVar b)
 Post reified constraint.
virtual bool run (void)
 Perform test.
- Public Member Functions inherited from Test::Base
 Base (const std::string &s)
 Create and register test with name s.
const std::string & name (void) const
 Return name of test.
Basenext (void) const
 Return next test.
void next (Base *n)
 Set next test.
virtual ~Base (void)
 Destructor.

Protected Attributes

int arity
 Number of variables.
Gecode::IntSet dom
 Domain of variables.
bool reified
 Does the constraint also exist as reified constraint.
Gecode::IntConLevel icl
 Consistency level.
ConTestLevel contest
 Whether to test for certain consistency.
bool testsearch
 Whether to perform search test.
bool testfix
 Whether to perform fixpoint test.

Mapping scalar values to strings

static std::string str (Gecode::ExtensionalPropKind epk)
 Map extensional propagation kind to string.
static std::string str (Gecode::IntConLevel icl)
 Map integer consistency level to string.
static std::string str (Gecode::IntRelType irl)
 Map integer relation to string.
static std::string str (Gecode::BoolOpType bot)
 Map Boolean 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.

General support

template<class T >
static bool cmp (T x, Gecode::IntRelType r, T y)
 Compare x and y with respect to r.

Additional Inherited Members

- Static Public Member Functions inherited from Test::Base
static void sort (void)
 Sort tests alphabetically.
static Basetests (void)
 Return all tests.
static bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
- Static Public Attributes inherited from Test::Base
static
Gecode::Support::RandomGenerator 
rand = Gecode::Support::RandomGenerator()
 Random number generator.

Detailed Description

Base class for tests with integer constraints

Definition at line 209 of file int.hh.

Constructor & Destructor Documentation

Test::Int::Test::Test ( const std::string &  s,
int  a,
const Gecode::IntSet d,
bool  r = false,
Gecode::IntConLevel  i = Gecode::ICL_DEF 
)
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. The consistency level is maintained for convenience.

Definition at line 156 of file int.hpp.

Test::Int::Test::Test ( const std::string &  s,
int  a,
int  min,
int  max,
bool  r = false,
Gecode::IntConLevel  i = Gecode::ICL_DEF 
)
inline

Constructor.

Constructs a test with name s and arity a and variable domain min ... max. Also tests for a reified constraint, if r is true. The consistency level is maintained for convenience.

Definition at line 163 of file int.hpp.

Member Function Documentation

virtual bool Test::Int::Test::solution ( const Assignment ) const
pure virtual

Check for solution.

Implemented in Test::Int::Arithmetic::MaxNaryShared, Test::Int::Arithmetic::MaxNary, Test::Int::Arithmetic::MinNaryShared, Test::Int::Arithmetic::MinNary, Test::Int::Extensional::TupleSetBool, Test::Int::Arithmetic::MaxXXX, Test::Int::Rel::BoolArray, Test::Int::Arithmetic::MaxXYY, Test::Int::Element::MatrixBoolVarBoolVarXX, Test::Int::Extensional::TupleSetB, Test::Int::Arithmetic::MaxXYX, Test::Int::Rel::IntArrayDiff, Test::Int::Element::MatrixBoolVarBoolVarXY, Test::Int::Arithmetic::MaxXXY, Test::Int::Arithmetic::MaxXYZ, Test::Int::Element::MatrixIntVarIntVarXX, Test::Int::Rel::IntArray, Test::Int::Bool::ClauseConst, Test::Int::Cumulative::OptFlexCumulative, Test::Int::Arithmetic::MinXXX, Test::Int::Arithmetic::MinXYY, Test::Int::Element::MatrixIntVarIntVarXY, Test::Int::MiniModelLin::LinRelMixed, Test::Int::Bool::ClauseXXY, Test::Int::Extensional::TupleSetA, Test::Int::Rel::BoolSharedSeq, Test::Int::Arithmetic::MinXYX, Test::Int::Count::VarVarSharedC, Test::Int::Element::MatrixIntBoolVarXX, Test::Int::Arithmetic::MinXXY, Test::Int::Bool::ClauseXXYYX, Test::Int::Extensional::RegOpt, Test::Int::Rel::BoolSeq, Test::Int::Count::VarVarSharedB, Test::Int::Arithmetic::MinXYZ, Test::Int::Element::MatrixIntBoolVarXY, Test::Int::Extensional::RegEmptyREG, Test::Int::Arithmetic::AbsXX, Test::Int::Bool::ClauseXYZ, Test::Int::Count::VarVarSharedA, Test::Int::Element::MatrixIntIntVarXX, Test::Int::Rel::IntSharedSeq, Test::Int::Extensional::RegEmptyDFA, Test::Int::Arithmetic::AbsXY, Test::Int::Cumulative::ManFlexCumulative, Test::Int::MiniModelLin::LinRelBool, Test::Int::Bool::NaryConst, Test::Int::MiniModelArithmetic::MaxNary, Test::Int::Count::VarInt, Test::Int::Extensional::RegSharedD, Test::Int::Element::MatrixIntIntVarXY, Test::Int::Arithmetic::Mod, Test::Int::Rel::IntSeq, Test::Int::Circuit::CircuitFullCost, Test::Int::MiniModelArithmetic::MinNary, Test::Int::Extensional::RegSharedC, Test::Int::Count::VarVar, Test::Int::Bool::NaryShared, Test::Int::Arithmetic::Div, Test::Int::Element::VarBoolInt, Test::Int::MiniModelArithmetic::Max, Test::Int::GCC::VarSome, Test::Int::MiniModelCount::IntArrayVar, Test::Int::Count::IntVarShared, Test::Int::Rel::BoolInt, Test::Int::Arithmetic::DivMod, Test::Int::Extensional::RegSharedB, Test::Int::MiniModelArithmetic::Min, Test::Int::Bool::Nary, Test::Int::Element::VarBoolVar, Test::Int::Unary::OptFlexUnary, Test::Int::Arithmetic::SqrtXX, Test::Int::MiniModelSet::SetExprExpr, Test::Int::Linear::BoolVar, Test::Int::Count::IntArrayVar, Test::Int::Circuit::PathCost, Test::Int::MiniModelArithmetic::Abs, Test::Int::Element::VarIntShared, Test::Int::Extensional::RegSharedA, Test::Int::MiniModelCount::IntArrayInt, Test::Int::Bool::BinConstXX, Test::Int::Cumulatives::Cumulatives, Test::Int::Rel::IntInt, Test::Int::Arithmetic::SqrtXY, Test::Int::MiniModelLin::LinRelInt, Test::Int::Cumulative::OptFixPCumulative, Test::Int::GCC::VarAll, Test::Int::MiniModelArithmetic::Sqrt, Test::Int::Element::VarIntInt, Test::Int::Extensional::RegRoland, Test::Int::Count::IntArrayInt, Test::Int::Bool::BinConstXY, Test::Int::NValues::BoolVar, Test::Int::NoOverlap::VarOpt2, Test::Int::Arithmetic::SqrXX, Test::Int::Channel::ChannelLinkMulti, Test::Int::Rel::BoolVarXX, Test::Int::MiniModelCount::VarInt, Test::Int::Linear::BoolInt, Test::Int::MiniModelArithmetic::Sqr, Test::Int::Unary::ManFlexUnary, Test::Int::BinPacking::BPT, Test::Int::Element::VarIntVar, Test::Int::MiniModelLin::LinExprMixed, Test::Int::Arithmetic::SqrXY, Test::Int::Bool::BinXXX, Test::Int::Count::SetVar, Test::Int::Circuit::CircuitCost, Test::Int::Channel::ChannelLinkSingle, Test::Int::GCC::IntSome< hole >, Test::Int::MiniModelBoolean::BoolExprVar, Test::Int::Element::IntBoolInt, Test::Int::NValues::BoolInt, Test::Int::MiniModelArithmetic::Minus, Test::Int::NoOverlap::Var2, Test::Int::Arithmetic::MultXXX, Test::Int::Extensional::RegDistinct, Test::Int::Bool::BinXYY, Test::Int::MiniModelCount::VarVar, Test::Int::Dom::DomDom, Test::Int::MiniModelSet::SetExprConst, Test::Int::Channel::ChannelShared, Test::Int::Count::IntVar, Test::Int::MiniModelLin::LinExprBool, Test::Int::Rel::BoolVarXY, Test::Int::Distinct::Random, Test::Int::GCC::IntAllMax, Test::Int::Element::IntBoolVar, Test::Int::Exec::When, Test::Int::MiniModelBoolean::BoolExprInt, Test::Int::Arithmetic::MultXYY, Test::Int::MiniModelArithmetic::Plus, Test::Int::Linear::IntVar, Test::Int::Bool::BinXYX, Test::Int::Unary::OptFixPUnary, Test::Int::Dom::DomRangeEmpty, Test::Int::Sorted::PermVar, Test::Int::MiniModelLin::LinExprInt, Test::Int::NValues::IntVar, Test::Int::Count::IntIntDup, Test::Int::Element::IntIntShared, Test::Int::Rel::IntVarXX, Test::Int::Circuit::Path, Test::Int::Channel::ChannelHalf, Test::Int::Extensional::RegSimpleC, Test::Int::MiniModelCount::IntVar, Test::Int::NoOverlap::IntOpt2, Test::Int::MiniModelArithmetic::Mod, Test::Int::Arithmetic::MultXYX, Test::Int::Distinct::Offset, Test::Int::Bool::BinXXY, Test::Int::GCC::IntAllMinMaxDef, Test::Int::MiniModel::BoolLex, Test::Int::Member::Bool, Test::Int::Cumulative::ManFixPCumulative, Test::Int::Exec::BoolWait, Test::Int::Precede::Multi, Test::Int::Element::IntIntInt, Test::Int::Dom::DomRange, Test::Int::Extensional::RegSimpleB, Test::Int::Count::SetInt, Test::Int::MiniModelArithmetic::Div, Test::Int::Unshare::Bool, Test::Int::Arithmetic::MultXXY, Test::Int::Linear::IntInt, Test::Int::Unary::ManFixPUnary, Test::Int::Bool::BinXYZ, Test::Int::NValues::IntInt, Test::Int::MiniModelCount::IntInt, Test::Int::Sorted::NoVar, Test::Int::Sequence::SequenceTest, Test::Int::NoOverlap::Int2, Test::Int::Distinct::Distinct< useCount >, Test::Int::Channel::ChannelFull, Test::Int::Element::IntIntVar, Test::Int::Circuit::Circuit, Test::Int::Rel::IntVarXY, Test::Int::MiniModel::IntLex, Test::Int::Arithmetic::MultXYZ, Test::Int::Basic::Basic, Test::Int::Extensional::RegSimpleA, Test::Int::GCC::IntAllMinMax, Test::Int::MiniModelArithmetic::Mult, Test::Int::Count::IntInt, Test::Int::Precede::Single, Test::Int::Exec::IntWait, Test::Int::Unshare::Int, Test::Int::Member::Int, and Test::Int::Dom::DomInt.

bool Test::Int::Test::ignore ( const Assignment ) const
virtual

Whether to ignore assignment for reification.

Reimplemented in Test::Int::Linear::BoolVar.

Definition at line 351 of file int.cpp.

virtual void Test::Int::Test::post ( Gecode::Space home,
Gecode::IntVarArray x 
)
pure virtual

Post constraint.

Implemented in Test::Int::Arithmetic::MaxNaryShared, Test::Int::Arithmetic::MaxNary, Test::Int::Arithmetic::MinNaryShared, Test::Int::Extensional::TupleSetBool, Test::Int::Arithmetic::MinNary, Test::Int::Rel::BoolArray, Test::Int::Arithmetic::MaxXXX, Test::Int::Element::MatrixBoolVarBoolVarXX, Test::Int::Arithmetic::MaxXYY, Test::Int::Extensional::TupleSetB, Test::Int::Rel::IntArrayDiff, Test::Int::Arithmetic::MaxXYX, Test::Int::Element::MatrixBoolVarBoolVarXY, Test::Int::Cumulative::OptFlexCumulative, Test::Int::Arithmetic::MaxXXY, Test::Int::Bool::ClauseConst, Test::Int::Element::MatrixIntVarIntVarXX, Test::Int::Arithmetic::MaxXYZ, Test::Int::Rel::IntArray, Test::Int::Arithmetic::MinXXX, Test::Int::Element::MatrixIntVarIntVarXY, Test::Int::Rel::BoolSharedSeq, Test::Int::Extensional::TupleSetA, Test::Int::MiniModelLin::LinRelMixed, Test::Int::Arithmetic::MinXYY, Test::Int::Bool::ClauseXXY, Test::Int::Arithmetic::MinXYX, Test::Int::Element::MatrixIntBoolVarXX, Test::Int::Count::VarVarSharedC, Test::Int::Bool::ClauseXXYYX, Test::Int::Rel::BoolSeq, Test::Int::Arithmetic::MinXXY, Test::Int::Extensional::RegOpt, Test::Int::Count::VarVarSharedB, Test::Int::Element::MatrixIntBoolVarXY, Test::Int::Arithmetic::MinXYZ, Test::Int::Cumulative::ManFlexCumulative, Test::Int::Extensional::RegEmptyREG, Test::Int::Bool::ClauseXYZ, Test::Int::Arithmetic::AbsXX, Test::Int::Rel::IntSharedSeq, Test::Int::Count::VarVarSharedA, Test::Int::Element::MatrixIntIntVarXX, Test::Int::Extensional::RegEmptyDFA, Test::Int::Arithmetic::AbsXY, Test::Int::Bool::NaryConst, Test::Int::Circuit::CircuitFullCost, Test::Int::Count::VarInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModelArithmetic::MaxNary, Test::Int::Element::MatrixIntIntVarXY, Test::Int::Rel::IntSeq, Test::Int::Arithmetic::Mod, Test::Int::Extensional::RegSharedD, Test::Int::GCC::VarSome, Test::Int::MiniModelArithmetic::MinNary, Test::Int::Count::VarVar, Test::Int::Bool::NaryShared, Test::Int::Extensional::RegSharedC, Test::Int::Arithmetic::Div, Test::Int::Element::VarBoolInt, Test::Int::MiniModelArithmetic::Max, Test::Int::MiniModelCount::IntArrayVar, Test::Int::Count::IntVarShared, Test::Int::Rel::BoolInt, Test::Int::MiniModelSet::SetExprExpr, Test::Int::Extensional::RegSharedB, Test::Int::Arithmetic::DivMod, Test::Int::Cumulative::OptFixPCumulative, Test::Int::Unary::OptFlexUnary, Test::Int::Bool::Nary, Test::Int::Circuit::PathCost, Test::Int::MiniModelArithmetic::Min, Test::Int::Element::VarBoolVar, Test::Int::Linear::BoolVar, Test::Int::Cumulatives::Cumulatives, Test::Int::Arithmetic::SqrtXX, Test::Int::Count::IntArrayVar, Test::Int::MiniModelArithmetic::Abs, Test::Int::MiniModelCount::IntArrayInt, Test::Int::Extensional::RegSharedA, Test::Int::GCC::VarAll, Test::Int::Element::VarIntShared, Test::Int::Bool::BinConstXX, Test::Int::Rel::IntInt, Test::Int::Arithmetic::SqrtXY, Test::Int::MiniModelLin::LinRelInt, Test::Int::NValues::BoolVar, Test::Int::NoOverlap::VarOpt2, Test::Int::Channel::ChannelLinkMulti, Test::Int::Count::IntArrayInt, Test::Int::Extensional::RegRoland, Test::Int::MiniModelArithmetic::Sqrt, Test::Int::Element::VarIntInt, Test::Int::Bool::BinConstXY, Test::Int::Arithmetic::SqrXX, Test::Int::BinPacking::BPT, Test::Int::Rel::BoolVarXX, Test::Int::MiniModelCount::VarInt, Test::Int::Circuit::CircuitCost, Test::Int::Linear::BoolInt, Test::Int::Unary::ManFlexUnary, Test::Int::MiniModelArithmetic::Sqr, Test::Int::MiniModelLin::LinExprMixed, Test::Int::Element::VarIntVar, Test::Int::Arithmetic::SqrXY, Test::Int::Count::SetVar, Test::Int::GCC::IntSome< hole >, Test::Int::Bool::BinXXX, Test::Int::NValues::BoolInt, Test::Int::Channel::ChannelLinkSingle, Test::Int::NoOverlap::Var2, Test::Int::MiniModelBoolean::BoolExprVar, Test::Int::MiniModelSet::SetExprConst, Test::Int::MiniModelArithmetic::Minus, Test::Int::Element::IntBoolInt, Test::Int::Extensional::RegDistinct, Test::Int::Arithmetic::MultXXX, Test::Int::Dom::DomDom, Test::Int::MiniModelCount::VarVar, Test::Int::Sorted::PermVar, Test::Int::Bool::BinXYY, Test::Int::Channel::ChannelShared, Test::Int::Count::IntVar, Test::Int::MiniModelLin::LinExprBool, Test::Int::Rel::BoolVarXY, Test::Int::GCC::IntAllMax, Test::Int::Distinct::Random, Test::Int::Cumulative::ManFixPCumulative, Test::Int::Element::IntBoolVar, Test::Int::MiniModelArithmetic::Plus, Test::Int::Unary::OptFixPUnary, Test::Int::Arithmetic::MultXYY, Test::Int::Circuit::Path, Test::Int::Extensional::RegSimpleC, Test::Int::MiniModelBoolean::BoolExprInt, Test::Int::Exec::When, Test::Int::Linear::IntVar, Test::Int::NValues::IntVar, Test::Int::Bool::BinXYX, Test::Int::NoOverlap::IntOpt2, Test::Int::Sequence::SequenceIntTest, Test::Int::Count::IntIntDup, Test::Int::Dom::DomRangeEmpty, Test::Int::MiniModelLin::LinExprInt, Test::Int::Channel::ChannelHalf, Test::Int::MiniModelCount::IntVar, Test::Int::Element::IntIntShared, Test::Int::Rel::IntVarXX, Test::Int::GCC::IntAllMinMaxDef, Test::Int::Arithmetic::MultXYX, Test::Int::Distinct::Offset, Test::Int::MiniModelArithmetic::Mod, Test::Int::MiniModel::BoolLex, Test::Int::Bool::BinXXY, Test::Int::Member::Bool, Test::Int::Precede::Multi, Test::Int::Exec::BoolWait, Test::Int::Sequence::SequenceBoolTest, Test::Int::Sorted::NoVar, Test::Int::Count::SetInt, Test::Int::Dom::DomRange, Test::Int::Element::IntIntInt, Test::Int::NValues::IntInt, Test::Int::Arithmetic::MultXXY, Test::Int::Extensional::RegSimpleB, Test::Int::Unshare::Bool, Test::Int::Linear::IntInt, Test::Int::MiniModelArithmetic::Div, Test::Int::Unary::ManFixPUnary, Test::Int::MiniModelCount::IntInt, Test::Int::NoOverlap::Int2, Test::Int::Circuit::Circuit, Test::Int::Bool::BinXYZ, Test::Int::Distinct::Distinct< useCount >, Test::Int::GCC::IntAllMinMax, Test::Int::Channel::ChannelFull, Test::Int::MiniModel::IntLex, Test::Int::Rel::IntVarXY, Test::Int::Precede::Single, Test::Int::Element::IntIntVar, Test::Int::Arithmetic::MultXYZ, Test::Int::Count::IntInt, Test::Int::Extensional::RegSimpleA, Test::Int::MiniModelArithmetic::Mult, Test::Int::Exec::IntWait, Test::Int::Basic::Basic, Test::Int::Member::Int, Test::Int::Unshare::Int, and Test::Int::Dom::DomInt.

bool Test::Int::Test::run ( void  )
virtual

Perform test.

Implements Test::Base.

Definition at line 360 of file int.cpp.

std::string Test::Int::Test::str ( Gecode::ExtensionalPropKind  epk)
inlinestatic

Map extensional propagation kind to string.

Definition at line 171 of file int.hpp.

std::string Test::Int::Test::str ( Gecode::IntConLevel  icl)
inlinestatic

Map integer consistency level to string.

Definition at line 182 of file int.hpp.

std::string Test::Int::Test::str ( Gecode::IntRelType  irl)
inlinestatic

Map integer relation to string.

Definition at line 194 of file int.hpp.

std::string Test::Int::Test::str ( Gecode::BoolOpType  bot)
inlinestatic

Map Boolean operation to string.

Definition at line 210 of file int.hpp.

std::string Test::Int::Test::str ( int  i)
inlinestatic

Map integer to string.

Definition at line 226 of file int.hpp.

std::string Test::Int::Test::str ( const Gecode::IntArgs i)
inlinestatic

Map integer array to string.

Definition at line 234 of file int.hpp.

template<class T >
bool Test::Int::Test::cmp ( x,
Gecode::IntRelType  r,
y 
)
inlinestatic

Compare x and y with respect to r.

Definition at line 243 of file int.hpp.

Member Data Documentation

int Test::Int::Test::arity
protected

Number of variables.

Definition at line 212 of file int.hh.

Gecode::IntSet Test::Int::Test::dom
protected

Domain of variables.

Definition at line 214 of file int.hh.

bool Test::Int::Test::reified
protected

Does the constraint also exist as reified constraint.

Definition at line 216 of file int.hh.

Gecode::IntConLevel Test::Int::Test::icl
protected

Consistency level.

Definition at line 218 of file int.hh.

ConTestLevel Test::Int::Test::contest
protected

Whether to test for certain consistency.

Definition at line 220 of file int.hh.

bool Test::Int::Test::testsearch
protected

Whether to perform search test.

Definition at line 222 of file int.hh.

bool Test::Int::Test::testfix
protected

Whether to perform fixpoint test.

Definition at line 224 of file int.hh.


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