Test::Int::Test Class Reference
[General test support]
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 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. | |
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. |
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] |
Test::Int::Test::Test | ( | const std::string & | s, | |
int | a, | |||
int | min, | |||
int | max, | |||
bool | r = false , |
|||
Gecode::IntConLevel | i = Gecode::ICL_DEF | |||
) | [inline] |
Member Function Documentation
Assignment * Test::Int::Test::assignment | ( | void | ) | const [virtual] |
Create assignment.
Reimplemented in Test::Int::BinPacking::BPT, Test::Int::Cumulative::ManFixPCumulative, Test::Int::Cumulative::OptFixPCumulative, Test::Int::Cumulative::ManFlexCumulative, Test::Int::Cumulative::OptFlexCumulative, Test::Int::Cumulatives::Cumulatives, Test::Int::Distinct::Random, Test::Int::GCC::VarSome, Test::Int::NValues::IntInt, Test::Int::Unary::ManFixPUnary, Test::Int::Unary::OptFixPUnary, Test::Int::Unary::ManFlexUnary, and Test::Int::Unary::OptFlexUnary.
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::BinPacking::BPT, 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::Bool::ClauseXYZ, Test::Int::Bool::ClauseXXYYX, Test::Int::Bool::ClauseXXY, Test::Int::Bool::ClauseConst, 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::Circuit::Path, Test::Int::Circuit::CircuitCost, Test::Int::Circuit::PathCost, Test::Int::Circuit::CircuitFullCost, Test::Int::Count::IntInt, Test::Int::Count::SetInt, Test::Int::Count::IntIntDup, Test::Int::Count::IntVar, Test::Int::Count::SetVar, 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::Cumulative::ManFixPCumulative, Test::Int::Cumulative::OptFixPCumulative, Test::Int::Cumulative::ManFlexCumulative, Test::Int::Cumulative::OptFlexCumulative, Test::Int::Cumulatives::Cumulatives, Test::Int::Distinct::Distinct< useCount >, Test::Int::Distinct::Offset, Test::Int::Distinct::Random, Test::Int::Dom::DomInt, Test::Int::Dom::DomRange, Test::Int::Dom::DomRangeEmpty, 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::Element::MatrixIntIntVarXY, Test::Int::Element::MatrixIntIntVarXX, Test::Int::Element::MatrixIntBoolVarXY, Test::Int::Element::MatrixIntBoolVarXX, Test::Int::Element::MatrixIntVarIntVarXY, Test::Int::Element::MatrixIntVarIntVarXX, Test::Int::Element::MatrixBoolVarBoolVarXY, Test::Int::Element::MatrixBoolVarBoolVarXX, Test::Int::Exec::IntWait, Test::Int::Exec::BoolWait, Test::Int::Exec::When, Test::Int::Extensional::RegSimpleA, Test::Int::Extensional::RegSimpleB, Test::Int::Extensional::RegSimpleC, Test::Int::Extensional::RegDistinct, Test::Int::Extensional::RegRoland, 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::RegOpt, 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::Member::Int, Test::Int::Member::Bool, Test::Int::MiniModelArithmetic::Mult, Test::Int::MiniModelArithmetic::Div, Test::Int::MiniModelArithmetic::Mod, 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::LinExprBool, Test::Int::MiniModelLin::LinExprMixed, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModelLin::LinRelMixed, Test::Int::MiniModel::IntLex, Test::Int::MiniModel::BoolLex, Test::Int::NoOverlap::Int2, Test::Int::NoOverlap::IntOpt2, Test::Int::NoOverlap::Var2, Test::Int::NoOverlap::VarOpt2, Test::Int::NValues::IntInt, Test::Int::NValues::IntVar, Test::Int::NValues::BoolInt, Test::Int::NValues::BoolVar, Test::Int::Precede::Single, Test::Int::Precede::Multi, 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::IntSeq, Test::Int::Rel::IntSharedSeq, Test::Int::Rel::BoolSeq, Test::Int::Rel::BoolSharedSeq, Test::Int::Rel::IntArray, Test::Int::Rel::IntArrayDiff, Test::Int::Rel::BoolArray, Test::Int::Sequence::SequenceTest, Test::Int::Sorted::NoVar, Test::Int::Sorted::PermVar, Test::Int::Unary::ManFixPUnary, Test::Int::Unary::OptFixPUnary, Test::Int::Unary::ManFlexUnary, Test::Int::Unary::OptFlexUnary, Test::Int::Unshare::Int, Test::Int::Unshare::Bool, Test::Int::MiniModelSet::SetExprConst, and Test::Int::MiniModelSet::SetExprExpr.
bool Test::Int::Test::ignore | ( | const Assignment & | ) | const [virtual] |
Whether to ignore assignment for reification.
Reimplemented in Test::Int::Linear::BoolVar.
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::BinPacking::BPT, 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::Bool::ClauseXYZ, Test::Int::Bool::ClauseXXYYX, Test::Int::Bool::ClauseXXY, Test::Int::Bool::ClauseConst, 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::Circuit::Path, Test::Int::Circuit::CircuitCost, Test::Int::Circuit::PathCost, Test::Int::Circuit::CircuitFullCost, Test::Int::Count::IntInt, Test::Int::Count::SetInt, Test::Int::Count::IntIntDup, Test::Int::Count::IntVar, Test::Int::Count::SetVar, 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::Cumulative::ManFixPCumulative, Test::Int::Cumulative::OptFixPCumulative, Test::Int::Cumulative::ManFlexCumulative, Test::Int::Cumulative::OptFlexCumulative, Test::Int::Cumulatives::Cumulatives, Test::Int::Distinct::Distinct< useCount >, Test::Int::Distinct::Offset, Test::Int::Distinct::Random, Test::Int::Dom::DomInt, Test::Int::Dom::DomRange, Test::Int::Dom::DomRangeEmpty, 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::Element::MatrixIntIntVarXY, Test::Int::Element::MatrixIntIntVarXX, Test::Int::Element::MatrixIntBoolVarXY, Test::Int::Element::MatrixIntBoolVarXX, Test::Int::Element::MatrixIntVarIntVarXY, Test::Int::Element::MatrixIntVarIntVarXX, Test::Int::Element::MatrixBoolVarBoolVarXY, Test::Int::Element::MatrixBoolVarBoolVarXX, Test::Int::Exec::IntWait, Test::Int::Exec::BoolWait, Test::Int::Exec::When, Test::Int::Extensional::RegSimpleA, Test::Int::Extensional::RegSimpleB, Test::Int::Extensional::RegSimpleC, Test::Int::Extensional::RegDistinct, Test::Int::Extensional::RegRoland, 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::RegOpt, 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::Member::Int, Test::Int::Member::Bool, Test::Int::MiniModelArithmetic::Mult, Test::Int::MiniModelArithmetic::Div, Test::Int::MiniModelArithmetic::Mod, 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::LinExprBool, Test::Int::MiniModelLin::LinExprMixed, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModelLin::LinRelMixed, Test::Int::MiniModel::IntLex, Test::Int::MiniModel::BoolLex, Test::Int::NoOverlap::Int2, Test::Int::NoOverlap::IntOpt2, Test::Int::NoOverlap::Var2, Test::Int::NoOverlap::VarOpt2, Test::Int::NValues::IntInt, Test::Int::NValues::IntVar, Test::Int::NValues::BoolInt, Test::Int::NValues::BoolVar, Test::Int::Precede::Single, Test::Int::Precede::Multi, 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::IntSeq, Test::Int::Rel::IntSharedSeq, Test::Int::Rel::BoolSeq, Test::Int::Rel::BoolSharedSeq, Test::Int::Rel::IntArray, Test::Int::Rel::IntArrayDiff, Test::Int::Rel::BoolArray, Test::Int::Sequence::SequenceBoolTest, Test::Int::Sequence::SequenceIntTest, Test::Int::Sorted::NoVar, Test::Int::Sorted::PermVar, Test::Int::Unary::ManFixPUnary, Test::Int::Unary::OptFixPUnary, Test::Int::Unary::ManFlexUnary, Test::Int::Unary::OptFlexUnary, Test::Int::Unshare::Int, Test::Int::Unshare::Bool, Test::Int::MiniModelSet::SetExprConst, and Test::Int::MiniModelSet::SetExprExpr.
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::DomInt, Test::Int::Dom::DomRange, Test::Int::Dom::DomRangeEmpty, Test::Int::Dom::DomDom, Test::Int::Linear::IntInt, Test::Int::Linear::IntVar, Test::Int::Linear::BoolInt, Test::Int::Linear::BoolVar, Test::Int::Member::Int, Test::Int::Member::Bool, Test::Int::MiniModelLin::LinRelInt, Test::Int::MiniModelLin::LinRelBool, Test::Int::MiniModelLin::LinRelMixed, Test::Int::Rel::IntVarXY, Test::Int::Rel::IntVarXX, Test::Int::Rel::BoolVarXY, Test::Int::Rel::IntInt, Test::Int::Rel::BoolInt, Test::Int::MiniModelSet::SetExprConst, and Test::Int::MiniModelSet::SetExprExpr.
bool Test::Int::Test::run | ( | void | ) | [virtual] |
std::string Test::Int::Test::str | ( | Gecode::ExtensionalPropKind | epk | ) | [inline, static] |
std::string Test::Int::Test::str | ( | Gecode::IntConLevel | icl | ) | [inline, static] |
std::string Test::Int::Test::str | ( | Gecode::IntRelType | irl | ) | [inline, static] |
std::string Test::Int::Test::str | ( | Gecode::BoolOpType | bot | ) | [inline, static] |
std::string Test::Int::Test::str | ( | int | i | ) | [inline, static] |
std::string Test::Int::Test::str | ( | const Gecode::IntArgs & | i | ) | [inline, static] |
bool Test::Int::Test::cmp | ( | T | x, | |
Gecode::IntRelType | r, | |||
T | y | |||
) | [inline, static] |
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] |
ConTestLevel Test::Int::Test::contest [protected] |
bool Test::Int::Test::testsearch [protected] |
bool Test::Int::Test::testfix [protected] |
The documentation for this class was generated from the following files: