Test::Int::Test Class Reference
[General test support]
#include <int.hh>
Inherits Test::Base.
Inherited by Test::Int::Arithmetic::AbsXX, Test::Int::Arithmetic::AbsXY, Test::Int::Arithmetic::Div, Test::Int::Arithmetic::DivMod, Test::Int::Arithmetic::MaxNary, Test::Int::Arithmetic::MaxNaryShared, Test::Int::Arithmetic::MaxXXX, Test::Int::Arithmetic::MaxXXY, Test::Int::Arithmetic::MaxXYX, Test::Int::Arithmetic::MaxXYY, Test::Int::Arithmetic::MaxXYZ, Test::Int::Arithmetic::MinNary, Test::Int::Arithmetic::MinNaryShared, Test::Int::Arithmetic::MinXXX, Test::Int::Arithmetic::MinXXY, Test::Int::Arithmetic::MinXYX, Test::Int::Arithmetic::MinXYY, Test::Int::Arithmetic::MinXYZ, Test::Int::Arithmetic::Mod, Test::Int::Arithmetic::MultXXX, Test::Int::Arithmetic::MultXXY, Test::Int::Arithmetic::MultXYX, Test::Int::Arithmetic::MultXYY, Test::Int::Arithmetic::MultXYZ, Test::Int::Arithmetic::SqrtXX, Test::Int::Arithmetic::SqrtXY, Test::Int::Arithmetic::SqrXX, Test::Int::Arithmetic::SqrXY, Test::Int::Basic::Basic, Test::Int::Bool::BinConstXX, Test::Int::Bool::BinConstXY, Test::Int::Bool::BinXXX, Test::Int::Bool::BinXXY, Test::Int::Bool::BinXYX, Test::Int::Bool::BinXYY, Test::Int::Bool::BinXYZ, Test::Int::Bool::Nary, Test::Int::Bool::NaryConst, Test::Int::Bool::NaryShared, Test::Int::Channel::ChannelFull, Test::Int::Channel::ChannelHalf, Test::Int::Channel::ChannelLinkMulti, Test::Int::Channel::ChannelLinkSingle, Test::Int::Channel::ChannelShared, Test::Int::Circuit::Circuit, Test::Int::Count::IntArrayInt, Test::Int::Count::IntArrayVar, Test::Int::Count::IntInt, Test::Int::Count::IntIntDup, Test::Int::Count::IntVar, Test::Int::Count::IntVarShared, Test::Int::Count::VarInt, Test::Int::Count::VarVar, Test::Int::Count::VarVarSharedA, Test::Int::Count::VarVarSharedB, Test::Int::Count::VarVarSharedC, Test::Int::Distinct::Distinct< useCount >, Test::Int::Distinct::Offset, Test::Int::Distinct::Random, Test::Int::Dom::DomDom, Test::Int::Dom::DomRange, Test::Int::Element::IntBoolInt, Test::Int::Element::IntBoolVar, Test::Int::Element::IntIntInt, Test::Int::Element::IntIntShared, Test::Int::Element::IntIntVar, Test::Int::Element::VarBoolInt, Test::Int::Element::VarBoolVar, Test::Int::Element::VarIntInt, Test::Int::Element::VarIntShared, Test::Int::Element::VarIntVar, Test::Int::Extensional::RegDistinct, Test::Int::Extensional::RegEmptyDFA, Test::Int::Extensional::RegEmptyREG, Test::Int::Extensional::RegSharedA, Test::Int::Extensional::RegSharedB, Test::Int::Extensional::RegSharedC, Test::Int::Extensional::RegSharedD, Test::Int::Extensional::RegSimpleA, Test::Int::Extensional::RegSimpleB, Test::Int::Extensional::RegSimpleC, Test::Int::Extensional::TupleSetA, Test::Int::Extensional::TupleSetB, Test::Int::Extensional::TupleSetBool, Test::Int::GCC::IntAllMax, Test::Int::GCC::IntAllMinMax, Test::Int::GCC::IntAllMinMaxDef, Test::Int::GCC::IntSome< hole >, Test::Int::GCC::VarAll, Test::Int::GCC::VarSome, Test::Int::Linear::BoolInt, Test::Int::Linear::BoolVar, Test::Int::Linear::IntInt, Test::Int::Linear::IntVar, Test::Int::MiniModel::BoolLex, Test::Int::MiniModel::IntLex, Test::Int::MiniModelArithmetic::Abs, Test::Int::MiniModelArithmetic::Max, Test::Int::MiniModelArithmetic::MaxNary, Test::Int::MiniModelArithmetic::Min, Test::Int::MiniModelArithmetic::MinNary, Test::Int::MiniModelArithmetic::Minus, Test::Int::MiniModelArithmetic::Mult, Test::Int::MiniModelArithmetic::Plus, Test::Int::MiniModelArithmetic::Sqr, Test::Int::MiniModelArithmetic::Sqrt, Test::Int::MiniModelBoolean::BoolExprInt, Test::Int::MiniModelBoolean::BoolExprVar, Test::Int::MiniModelCount::IntArrayInt, Test::Int::MiniModelCount::IntArrayVar, Test::Int::MiniModelCount::IntInt, Test::Int::MiniModelCount::IntVar, Test::Int::MiniModelCount::VarInt, Test::Int::MiniModelCount::VarVar, Test::Int::MiniModelLin::LinExprBool, Test::Int::MiniModelLin::LinExprInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModelLin::LinRelInt, Test::Int::Rel::BoolArray, Test::Int::Rel::BoolInt, Test::Int::Rel::BoolPairwise, Test::Int::Rel::BoolVarXX, Test::Int::Rel::BoolVarXY, Test::Int::Rel::IntArray, Test::Int::Rel::IntInt, Test::Int::Rel::IntPairwise, Test::Int::Rel::IntVarXX, Test::Int::Rel::IntVarXY, Test::Int::Scheduling::Cumulatives, Test::Int::Sorted::NoVar, Test::Int::Sorted::PermVar, Test::Int::Unshare::Bool, and Test::Int::Unshare::Int.
Detailed Description
Base class for tests with integer constraints.Definition at line 123 of file int.hh.
Mapping scalar values to strings | |
static std::string | str (Gecode::PropKind pk) |
Map propagation kind to string. | |
static std::string | str (Gecode::IntConLevel icl) |
Map integer consistency level to string. | |
static std::string | str (Gecode::IntRelType pk) |
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. | |
General support | |
template<class T> | |
static bool | cmp (T x, Gecode::IntRelType r, T y) |
Compare x and y with respect to r. | |
Public Member Functions | |
Test (const std::string &s, int a, const Gecode::IntSet &d, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF, Gecode::PropKind p=Gecode::PK_DEF) | |
Constructor. | |
Test (const std::string &s, int a, int min, int max, bool r=false, Gecode::IntConLevel i=Gecode::ICL_DEF, Gecode::PropKind p=Gecode::PK_DEF) | |
Constructor. | |
virtual Assignment * | assignment (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. | |
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. | |
Gecode::PropKind | pk |
Propagation kind. | |
bool | testdomcon |
Whether to test for domain consistency. | |
bool | testsearch |
Whether to perform search test. |
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 , |
|||
Gecode::PropKind | p = Gecode::PK_DEF | |||
) |
Constructor.
Constructs a test with name s and arity a and variable domain d. Also tests for a reified constraint, if r is true. Consistency level and propagation kind are maintained for convenience.
Test::Int::Test::Test | ( | const std::string & | s, | |
int | a, | |||
int | min, | |||
int | max, | |||
bool | r = false , |
|||
Gecode::IntConLevel | i = Gecode::ICL_DEF , |
|||
Gecode::PropKind | p = Gecode::PK_DEF | |||
) |
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. Consistency level and propagation kind are maintained for convenience.
Member Function Documentation
virtual Assignment* Test::Int::Test::assignment | ( | void | ) | const [virtual] |
Create assignment.
Reimplemented in Test::Int::Distinct::Random, and Test::Int::Scheduling::Cumulatives.
virtual bool Test::Int::Test::solution | ( | const Assignment & | ) | const [pure virtual] |
Check for solution.
Implemented in Test::Int::Arithmetic::MultXYZ, Test::Int::Arithmetic::MultXXY, Test::Int::Arithmetic::MultXYX, Test::Int::Arithmetic::MultXYY, Test::Int::Arithmetic::MultXXX, Test::Int::Arithmetic::SqrXY, Test::Int::Arithmetic::SqrXX, Test::Int::Arithmetic::SqrtXY, Test::Int::Arithmetic::SqrtXX, Test::Int::Arithmetic::DivMod, Test::Int::Arithmetic::Div, Test::Int::Arithmetic::Mod, Test::Int::Arithmetic::AbsXY, Test::Int::Arithmetic::AbsXX, Test::Int::Arithmetic::MinXYZ, Test::Int::Arithmetic::MinXXY, Test::Int::Arithmetic::MinXYX, Test::Int::Arithmetic::MinXYY, Test::Int::Arithmetic::MinXXX, Test::Int::Arithmetic::MaxXYZ, Test::Int::Arithmetic::MaxXXY, Test::Int::Arithmetic::MaxXYX, Test::Int::Arithmetic::MaxXYY, Test::Int::Arithmetic::MaxXXX, Test::Int::Arithmetic::MinNary, Test::Int::Arithmetic::MinNaryShared, Test::Int::Arithmetic::MaxNary, Test::Int::Arithmetic::MaxNaryShared, Test::Int::Basic::Basic, Test::Int::Bool::BinXYZ, Test::Int::Bool::BinXXY, Test::Int::Bool::BinXYX, Test::Int::Bool::BinXYY, Test::Int::Bool::BinXXX, Test::Int::Bool::BinConstXY, Test::Int::Bool::BinConstXX, Test::Int::Bool::Nary, Test::Int::Bool::NaryShared, Test::Int::Bool::NaryConst, Test::Int::Channel::ChannelFull, Test::Int::Channel::ChannelHalf, Test::Int::Channel::ChannelShared, Test::Int::Channel::ChannelLinkSingle, Test::Int::Channel::ChannelLinkMulti, Test::Int::Circuit::Circuit, Test::Int::Count::IntInt, Test::Int::Count::IntIntDup, Test::Int::Count::IntVar, Test::Int::Count::IntArrayInt, Test::Int::Count::IntArrayVar, Test::Int::Count::IntVarShared, Test::Int::Count::VarVar, Test::Int::Count::VarInt, Test::Int::Count::VarVarSharedA, Test::Int::Count::VarVarSharedB, Test::Int::Count::VarVarSharedC, Test::Int::Distinct::Distinct< useCount >, Test::Int::Distinct::Offset, Test::Int::Distinct::Random, Test::Int::Dom::DomRange, Test::Int::Dom::DomDom, Test::Int::Element::IntIntVar, Test::Int::Element::IntIntInt, Test::Int::Element::IntIntShared, Test::Int::Element::IntBoolVar, Test::Int::Element::IntBoolInt, Test::Int::Element::VarIntVar, Test::Int::Element::VarIntInt, Test::Int::Element::VarIntShared, Test::Int::Element::VarBoolVar, Test::Int::Element::VarBoolInt, Test::Int::Extensional::RegSimpleA, Test::Int::Extensional::RegSimpleB, Test::Int::Extensional::RegSimpleC, Test::Int::Extensional::RegDistinct, Test::Int::Extensional::RegSharedA, Test::Int::Extensional::RegSharedB, Test::Int::Extensional::RegSharedC, Test::Int::Extensional::RegSharedD, Test::Int::Extensional::RegEmptyDFA, Test::Int::Extensional::RegEmptyREG, Test::Int::Extensional::TupleSetA, Test::Int::Extensional::TupleSetB, Test::Int::Extensional::TupleSetBool, Test::Int::GCC::IntAllMinMax, Test::Int::GCC::IntAllMinMaxDef, Test::Int::GCC::IntAllMax, Test::Int::GCC::IntSome< hole >, Test::Int::GCC::VarAll, Test::Int::GCC::VarSome, Test::Int::Linear::IntInt, Test::Int::Linear::IntVar, Test::Int::Linear::BoolInt, Test::Int::Linear::BoolVar, Test::Int::MiniModelArithmetic::Mult, Test::Int::MiniModelArithmetic::Plus, Test::Int::MiniModelArithmetic::Minus, Test::Int::MiniModelArithmetic::Sqr, Test::Int::MiniModelArithmetic::Sqrt, Test::Int::MiniModelArithmetic::Abs, Test::Int::MiniModelArithmetic::Min, Test::Int::MiniModelArithmetic::Max, Test::Int::MiniModelArithmetic::MinNary, Test::Int::MiniModelArithmetic::MaxNary, Test::Int::MiniModelBoolean::BoolExprInt, Test::Int::MiniModelBoolean::BoolExprVar, Test::Int::MiniModelCount::IntInt, Test::Int::MiniModelCount::IntVar, Test::Int::MiniModelCount::VarVar, Test::Int::MiniModelCount::VarInt, Test::Int::MiniModelCount::IntArrayInt, Test::Int::MiniModelCount::IntArrayVar, Test::Int::MiniModelLin::LinExprInt, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinExprBool, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModel::IntLex, Test::Int::MiniModel::BoolLex, Test::Int::Rel::IntVarXY, Test::Int::Rel::IntVarXX, Test::Int::Rel::BoolVarXY, Test::Int::Rel::BoolVarXX, Test::Int::Rel::IntInt, Test::Int::Rel::BoolInt, Test::Int::Rel::IntPairwise, Test::Int::Rel::BoolPairwise, Test::Int::Rel::IntArray, Test::Int::Rel::BoolArray, Test::Int::Scheduling::Cumulatives, Test::Int::Sorted::NoVar, Test::Int::Sorted::PermVar, Test::Int::Unshare::Int, and Test::Int::Unshare::Bool.
virtual bool Test::Int::Test::ignore | ( | const Assignment & | ) | const [virtual] |
virtual void Test::Int::Test::post | ( | Gecode::Space * | home, | |
Gecode::IntVarArray & | x | |||
) | [pure virtual] |
Post constraint.
Implemented in Test::Int::Arithmetic::MultXYZ, Test::Int::Arithmetic::MultXXY, Test::Int::Arithmetic::MultXYX, Test::Int::Arithmetic::MultXYY, Test::Int::Arithmetic::MultXXX, Test::Int::Arithmetic::SqrXY, Test::Int::Arithmetic::SqrXX, Test::Int::Arithmetic::SqrtXY, Test::Int::Arithmetic::SqrtXX, Test::Int::Arithmetic::DivMod, Test::Int::Arithmetic::Div, Test::Int::Arithmetic::Mod, Test::Int::Arithmetic::AbsXY, Test::Int::Arithmetic::AbsXX, Test::Int::Arithmetic::MinXYZ, Test::Int::Arithmetic::MinXXY, Test::Int::Arithmetic::MinXYX, Test::Int::Arithmetic::MinXYY, Test::Int::Arithmetic::MinXXX, Test::Int::Arithmetic::MaxXYZ, Test::Int::Arithmetic::MaxXXY, Test::Int::Arithmetic::MaxXYX, Test::Int::Arithmetic::MaxXYY, Test::Int::Arithmetic::MaxXXX, Test::Int::Arithmetic::MinNary, Test::Int::Arithmetic::MinNaryShared, Test::Int::Arithmetic::MaxNary, Test::Int::Arithmetic::MaxNaryShared, Test::Int::Basic::Basic, Test::Int::Bool::BinXYZ, Test::Int::Bool::BinXXY, Test::Int::Bool::BinXYX, Test::Int::Bool::BinXYY, Test::Int::Bool::BinXXX, Test::Int::Bool::BinConstXY, Test::Int::Bool::BinConstXX, Test::Int::Bool::Nary, Test::Int::Bool::NaryShared, Test::Int::Bool::NaryConst, Test::Int::Channel::ChannelFull, Test::Int::Channel::ChannelHalf, Test::Int::Channel::ChannelShared, Test::Int::Channel::ChannelLinkSingle, Test::Int::Channel::ChannelLinkMulti, Test::Int::Circuit::Circuit, Test::Int::Count::IntInt, Test::Int::Count::IntIntDup, Test::Int::Count::IntVar, Test::Int::Count::IntArrayInt, Test::Int::Count::IntArrayVar, Test::Int::Count::IntVarShared, Test::Int::Count::VarVar, Test::Int::Count::VarInt, Test::Int::Count::VarVarSharedA, Test::Int::Count::VarVarSharedB, Test::Int::Count::VarVarSharedC, Test::Int::Distinct::Distinct< useCount >, Test::Int::Distinct::Offset, Test::Int::Distinct::Random, Test::Int::Dom::DomRange, Test::Int::Dom::DomDom, Test::Int::Element::IntIntVar, Test::Int::Element::IntIntInt, Test::Int::Element::IntIntShared, Test::Int::Element::IntBoolVar, Test::Int::Element::IntBoolInt, Test::Int::Element::VarIntVar, Test::Int::Element::VarIntInt, Test::Int::Element::VarIntShared, Test::Int::Element::VarBoolVar, Test::Int::Element::VarBoolInt, Test::Int::Extensional::RegSimpleA, Test::Int::Extensional::RegSimpleB, Test::Int::Extensional::RegSimpleC, Test::Int::Extensional::RegDistinct, Test::Int::Extensional::RegSharedA, Test::Int::Extensional::RegSharedB, Test::Int::Extensional::RegSharedC, Test::Int::Extensional::RegSharedD, Test::Int::Extensional::RegEmptyDFA, Test::Int::Extensional::RegEmptyREG, Test::Int::Extensional::TupleSetA, Test::Int::Extensional::TupleSetB, Test::Int::Extensional::TupleSetBool, Test::Int::GCC::IntAllMinMax, Test::Int::GCC::IntAllMinMaxDef, Test::Int::GCC::IntAllMax, Test::Int::GCC::IntSome< hole >, Test::Int::GCC::VarAll, Test::Int::GCC::VarSome, Test::Int::Linear::IntInt, Test::Int::Linear::IntVar, Test::Int::Linear::BoolInt, Test::Int::Linear::BoolVar, Test::Int::MiniModelArithmetic::Mult, Test::Int::MiniModelArithmetic::Plus, Test::Int::MiniModelArithmetic::Minus, Test::Int::MiniModelArithmetic::Sqr, Test::Int::MiniModelArithmetic::Sqrt, Test::Int::MiniModelArithmetic::Abs, Test::Int::MiniModelArithmetic::Min, Test::Int::MiniModelArithmetic::Max, Test::Int::MiniModelArithmetic::MinNary, Test::Int::MiniModelArithmetic::MaxNary, Test::Int::MiniModelBoolean::BoolExprInt, Test::Int::MiniModelBoolean::BoolExprVar, Test::Int::MiniModelCount::IntInt, Test::Int::MiniModelCount::IntVar, Test::Int::MiniModelCount::VarVar, Test::Int::MiniModelCount::VarInt, Test::Int::MiniModelCount::IntArrayInt, Test::Int::MiniModelCount::IntArrayVar, Test::Int::MiniModelLin::LinExprInt, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinExprBool, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModel::IntLex, Test::Int::MiniModel::BoolLex, Test::Int::Rel::IntVarXY, Test::Int::Rel::IntVarXX, Test::Int::Rel::BoolVarXY, Test::Int::Rel::BoolVarXX, Test::Int::Rel::IntInt, Test::Int::Rel::BoolInt, Test::Int::Rel::IntPairwise, Test::Int::Rel::BoolPairwise, Test::Int::Rel::IntArray, Test::Int::Rel::BoolArray, Test::Int::Scheduling::Cumulatives, Test::Int::Sorted::NoVar, Test::Int::Sorted::PermVar, Test::Int::Unshare::Int, and Test::Int::Unshare::Bool.
virtual void Test::Int::Test::post | ( | Gecode::Space * | home, | |
Gecode::IntVarArray & | x, | |||
Gecode::BoolVar | b | |||
) | [virtual] |
Post reified constraint.
Reimplemented in Test::Int::Basic::Basic, Test::Int::Dom::DomRange, Test::Int::Dom::DomDom, Test::Int::Linear::IntInt, Test::Int::Linear::IntVar, Test::Int::Linear::BoolInt, Test::Int::Linear::BoolVar, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::Rel::IntVarXY, Test::Int::Rel::IntVarXX, Test::Int::Rel::BoolVarXY, Test::Int::Rel::IntInt, and Test::Int::Rel::BoolInt.
virtual bool Test::Int::Test::run | ( | void | ) | [virtual] |
static std::string Test::Int::Test::str | ( | Gecode::PropKind | pk | ) | [static] |
Map propagation kind to string.
static std::string Test::Int::Test::str | ( | Gecode::IntConLevel | icl | ) | [static] |
Map integer consistency level to string.
static std::string Test::Int::Test::str | ( | Gecode::IntRelType | pk | ) | [static] |
Map integer relation to string.
static std::string Test::Int::Test::str | ( | Gecode::BoolOpType | bot | ) | [static] |
Map Boolean operation to string.
static std::string Test::Int::Test::str | ( | int | i | ) | [static] |
Map integer to string.
static bool Test::Int::Test::cmp | ( | T | x, | |
Gecode::IntRelType | r, | |||
T | y | |||
) | [inline, static] |
Compare x and y with respect to r.
Member Data Documentation
int Test::Int::Test::arity [protected] |
Gecode::IntSet Test::Int::Test::dom [protected] |
bool Test::Int::Test::reified [protected] |
Gecode::IntConLevel Test::Int::Test::icl [protected] |
Gecode::PropKind Test::Int::Test::pk [protected] |
bool Test::Int::Test::testdomcon [protected] |
bool Test::Int::Test::testsearch [protected] |
The documentation for this class was generated from the following file: