
Base class for tests with float constraints More...
#include <float.hh>
Public Member Functions | |
| Test (const std::string &s, int a, const Gecode::FloatVal &d, Gecode::FloatNum st, AssignmentType at, bool r) | |
| Constructor. More... | |
| Test (const std::string &s, int a, Gecode::FloatNum min, Gecode::FloatNum max, Gecode::FloatNum st, AssignmentType at, bool r) | |
| Constructor. More... | |
| virtual Assignment * | assignment (void) const |
| Create assignment. More... | |
| virtual bool | extendAssignement (Assignment &a) const |
| Complete the current assignment to get a feasible one (which satisfies all constraint). If such an assignment is computed, it returns true, false otherwise. More... | |
| virtual MaybeType | solution (const Assignment &) const =0 |
| Check for solution. More... | |
| bool | subsumed (const TestSpace &ts) const |
| Test if ts is subsumed or not (i.e. if there is no more propagator unless the assignment is an extended assigment. More... | |
| virtual bool | ignore (const Assignment &a) const |
| Whether to ignore assignment for reification. More... | |
| virtual void | post (Gecode::Space &home, Gecode::FloatVarArray &x)=0 |
| Post constraint. More... | |
| virtual void | post (Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r) |
| Post reified constraint. More... | |
| virtual bool | run (void) |
| Perform test. More... | |
Public Member Functions inherited from Test::Base | |
| Base (const std::string &s) | |
| Create and register test with name s. More... | |
| const std::string & | name (void) const |
| Return name of test. More... | |
| Base * | next (void) const |
| Return next test. More... | |
| void | next (Base *n) |
| Set next test. More... | |
| virtual | ~Base (void) |
| Destructor. More... | |
Protected Attributes | |
| int | arity |
| Number of variables. More... | |
| Gecode::FloatVal | dom |
| Domain of variables. More... | |
| Gecode::FloatNum | step |
| Step for going to next solution. More... | |
| AssignmentType | assigmentType |
| Gives the type of assignment to use. More... | |
| bool | reified |
| Does the constraint also exist as reified constraint. More... | |
| int | rms |
| Which reification modes are supported. More... | |
| bool | testsearch |
| Whether to perform search test. More... | |
| bool | testfix |
| Whether to perform fixpoint test. More... | |
| bool | testsubsumed |
| Whether to test for subsumption. More... | |
Test for reification modes | |
| bool | eqv (void) const |
| Test whether equivalence as reification mode is supported. More... | |
| bool | imp (void) const |
| Test whether implication as reification mode is supported. More... | |
| bool | pmi (void) const |
| Test whether reverse implication as reification mode is supported. More... | |
Mapping scalar values to strings | |
| static std::string | str (Gecode::FloatRelType frt) |
| Map float relation to string. More... | |
| static std::string | str (Gecode::FloatNum f) |
| Map floatNum to string. More... | |
| static std::string | str (Gecode::FloatVal f) |
| Map floatVal to string. More... | |
| static std::string | str (const Gecode::FloatValArgs &f) |
| Map float array to string. More... | |
General support | |
| bool | flip (void) |
| Flip a coin and return true or false randomly. More... | |
| static MaybeType | cmp (Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y) |
| Compare x and y with respect to r. More... | |
| static MaybeType | eq (Gecode::FloatVal x, Gecode::FloatVal y) |
| Whether x and y are equal. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Test::Base | |
| static void | sort (void) |
| Sort tests alphabetically. More... | |
| static Base * | tests (void) |
| Return all tests. More... | |
| static bool | fixpoint (void) |
| Throw a coin whether to compute a fixpoint. More... | |
Static Public Attributes inherited from Test::Base | |
| static Gecode::Support::RandomGenerator | rand = Gecode::Support::RandomGenerator() |
| Random number generator. More... | |
Related Functions inherited from Test::Base | |
| int | main (int argc, char *argv[]) |
| Main function. More... | |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
virtual |
|
virtual |
Complete the current assignment to get a feasible one (which satisfies all constraint). If such an assignment is computed, it returns true, false otherwise.
Reimplemented in Test::Float::Arithmetic::NRootXYSol, Test::Float::Arithmetic::PowXYSol, Test::Float::Trigonometric::ATanXYSol, Test::Float::Trigonometric::ACosXYSol, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Transcendental::PowXYSol, Test::Float::Trigonometric::ASinXYSol, Test::Float::Arithmetic::SqrXYSol, Test::Float::Arithmetic::DivSol, Test::Float::Transcendental::LogNXYSol, Test::Float::Trigonometric::TanXYSol, Test::Float::Transcendental::LogXYSol, Test::Float::Trigonometric::CosXYSol, Test::Float::Arithmetic::MultXXYSol, Test::Float::Arithmetic::MultXYZSol, Test::Float::Transcendental::ExpXYSol, and Test::Float::Trigonometric::SinXYSol.
|
pure virtual |
Check for solution.
Implemented in Test::Float::Arithmetic::MaxNaryShared, Test::Float::Arithmetic::MaxNary, Test::Float::Arithmetic::MinNaryShared, Test::Float::Arithmetic::MinNary, Test::Float::Arithmetic::MaxXXX, Test::Float::Arithmetic::MaxXYY, Test::Float::Arithmetic::MaxXYX, Test::Float::Arithmetic::MaxXXY, Test::Float::Arithmetic::MaxXYZ, Test::Float::Arithmetic::MinXXX, Test::Float::Arithmetic::MinXYY, Test::Float::Arithmetic::MinXYX, Test::Float::Arithmetic::MinXXY, Test::Float::Arithmetic::MinXYZ, Test::Float::Arithmetic::AbsXX, Test::Float::Arithmetic::AbsXY, Test::Float::Arithmetic::NRootXX, Test::Float::Arithmetic::NRootXYSol, Test::Float::Arithmetic::NRootXY, Test::Float::Arithmetic::PowXX, Test::Float::Trigonometric::ATanXX, Test::Float::Arithmetic::PowXYSol, Test::Float::Trigonometric::ATanXYSol, Test::Float::Arithmetic::PowXY, Test::Float::Trigonometric::ATanXY, Test::Float::Trigonometric::ACosXX, Test::Float::Arithmetic::SqrtXX, Test::Float::Trigonometric::ACosXYSol, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Trigonometric::ACosXY, Test::Float::Transcendental::PowXX, Test::Float::Arithmetic::SqrtXY, Test::Float::Trigonometric::ASinXX, Test::Float::Arithmetic::SqrXX, Test::Float::Transcendental::PowXYSol, Test::Float::Trigonometric::ASinXYSol, Test::Float::Arithmetic::SqrXYSol, Test::Float::Transcendental::PowXY, Test::Float::Arithmetic::SqrXY, Test::Float::Trigonometric::ASinXY, Test::Float::Transcendental::LogNXX, Test::Float::Trigonometric::TanXX, Test::Float::Arithmetic::DivSol, Test::Float::Transcendental::LogNXYSol, Test::Float::Trigonometric::TanXYSol, Test::Float::Arithmetic::Div, Test::Float::Transcendental::LogNXY, Test::Float::Arithmetic::MultXXX, Test::Float::Trigonometric::TanXY, Test::Float::Transcendental::LogXX, Test::Float::Arithmetic::MultXYY, Test::Float::Trigonometric::CosXX, Test::Float::Arithmetic::MultXYX, Test::Float::Linear::FloatVar, Test::Float::Rel::FloatFloat, Test::Float::Transcendental::LogXYSol, Test::Float::Trigonometric::CosXYSol, Test::Float::Arithmetic::MultXXYSol, Test::Float::Transcendental::LogXY, Test::Float::Trigonometric::CosXY, Test::Float::Rel::FloatVarXX, Test::Float::Arithmetic::MultXXY, Test::Float::Transcendental::ExpXX, Test::Float::Trigonometric::SinXX, Test::Float::Dom::Num, Test::Float::Linear::FloatFloat, Test::Float::Arithmetic::MultXYZSol, Test::Float::Transcendental::ExpXYSol, Test::Float::Trigonometric::SinXYSol, Test::Float::Rel::FloatVarXY, Test::Float::Dom::Val, Test::Float::Arithmetic::MultXYZ, Test::Float::Basic::Basic, Test::Float::Transcendental::ExpXY, Test::Float::Trigonometric::SinXY, and Test::Float::Channel::ChannelLinkSingle.
| bool Test::Float::Test::subsumed | ( | const TestSpace & | ts | ) | const |
|
virtual |
|
pure virtual |
Post constraint.
Implemented in Test::Float::Arithmetic::MaxNaryShared, Test::Float::Arithmetic::MaxNary, Test::Float::Arithmetic::MinNaryShared, Test::Float::Arithmetic::MinNary, Test::Float::Arithmetic::MaxXXX, Test::Float::Arithmetic::MaxXYY, Test::Float::Arithmetic::MaxXYX, Test::Float::Arithmetic::MaxXXY, Test::Float::Arithmetic::MaxXYZ, Test::Float::Arithmetic::MinXXX, Test::Float::Arithmetic::MinXYY, Test::Float::Arithmetic::MinXYX, Test::Float::Arithmetic::MinXXY, Test::Float::Arithmetic::MinXYZ, Test::Float::Arithmetic::AbsXX, Test::Float::Arithmetic::AbsXY, Test::Float::Arithmetic::NRootXX, Test::Float::Arithmetic::NRootXYSol, Test::Float::Arithmetic::NRootXY, Test::Float::Arithmetic::PowXX, Test::Float::Trigonometric::ATanXX, Test::Float::Arithmetic::PowXYSol, Test::Float::Trigonometric::ATanXYSol, Test::Float::Arithmetic::PowXY, Test::Float::Trigonometric::ATanXY, Test::Float::Arithmetic::SqrtXX, Test::Float::Trigonometric::ACosXX, Test::Float::Trigonometric::ACosXYSol, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Trigonometric::ACosXY, Test::Float::Arithmetic::SqrtXY, Test::Float::Transcendental::PowXX, Test::Float::Trigonometric::ASinXX, Test::Float::Transcendental::PowXYSol, Test::Float::Arithmetic::SqrXX, Test::Float::Trigonometric::ASinXYSol, Test::Float::Arithmetic::SqrXYSol, Test::Float::Transcendental::PowXY, Test::Float::Trigonometric::ASinXY, Test::Float::Arithmetic::SqrXY, Test::Float::Transcendental::LogNXX, Test::Float::Arithmetic::DivSol, Test::Float::Trigonometric::TanXX, Test::Float::Transcendental::LogNXYSol, Test::Float::Trigonometric::TanXYSol, Test::Float::Arithmetic::Div, Test::Float::Transcendental::LogNXY, Test::Float::Arithmetic::MultXXX, Test::Float::Trigonometric::TanXY, Test::Float::Transcendental::LogXX, Test::Float::Arithmetic::MultXYY, Test::Float::Linear::FloatVar, Test::Float::Trigonometric::CosXX, Test::Float::Transcendental::LogXYSol, Test::Float::Arithmetic::MultXYX, Test::Float::Trigonometric::CosXYSol, Test::Float::Rel::FloatFloat, Test::Float::Arithmetic::MultXXYSol, Test::Float::Transcendental::LogXY, Test::Float::Trigonometric::CosXY, Test::Float::Rel::FloatVarXX, Test::Float::Arithmetic::MultXXY, Test::Float::Dom::Num, Test::Float::Linear::FloatFloat, Test::Float::Transcendental::ExpXX, Test::Float::Trigonometric::SinXX, Test::Float::Arithmetic::MultXYZSol, Test::Float::Transcendental::ExpXYSol, Test::Float::Trigonometric::SinXYSol, Test::Float::Rel::FloatVarXY, Test::Float::Dom::Val, Test::Float::Arithmetic::MultXYZ, Test::Float::Basic::Basic, Test::Float::Transcendental::ExpXY, Test::Float::Trigonometric::SinXY, and Test::Float::Channel::ChannelLinkSingle.
|
virtual |
Post reified constraint.
Reimplemented in Test::Float::Linear::FloatVar, Test::Float::Rel::FloatFloat, Test::Float::Dom::Num, Test::Float::Rel::FloatVarXX, Test::Float::Linear::FloatFloat, Test::Float::Rel::FloatVarXY, Test::Float::Dom::Val, and Test::Float::Basic::Basic.
|
virtual |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |