Test::Float::Test Class Reference
[General test support]
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. | |
Test (const std::string &s, int a, Gecode::FloatNum min, Gecode::FloatNum max, Gecode::FloatNum st, AssignmentType at, bool r) | |
Constructor. | |
virtual Assignment * | assignment (void) const |
Create assignment. | |
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. | |
virtual MaybeType | solution (const Assignment &) const =0 |
Check for solution. | |
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. | |
virtual bool | ignore (const Assignment &a) const |
Whether to ignore assignment for reification. | |
virtual void | post (Gecode::Space &home, Gecode::FloatVarArray &x)=0 |
Post constraint. | |
virtual void | post (Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r) |
Post reified constraint. | |
virtual bool | run (void) |
Perform test. | |
Protected Attributes | |
int | arity |
Number of variables. | |
Gecode::FloatVal | dom |
Domain of variables. | |
Gecode::FloatNum | step |
Step for going to next solution. | |
AssignmentType | assigmentType |
Gives the type of assignment to use. | |
bool | reified |
Does the constraint also exist as reified constraint. | |
int | rms |
Which reification modes are supported. | |
bool | testsearch |
Whether to perform search test. | |
bool | testfix |
Whether to perform fixpoint test. | |
bool | testsubsumed |
Whether to test for subsumption. | |
Test for reification modes | |
| |
bool | eqv (void) const |
Test whether equivalence as reification mode is supported. | |
bool | imp (void) const |
Test whether implication as reification mode is supported. | |
bool | pmi (void) const |
Test whether reverse implication as reification mode is supported. | |
General support | |
| |
bool | flip (void) |
Flip a coin and return true or false randomly. | |
static MaybeType | cmp (Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y) |
Compare x and y with respect to r. | |
static MaybeType | eq (Gecode::FloatVal x, Gecode::FloatVal y) |
Whether x and y are equal. | |
Mapping scalar values to strings | |
| |
static std::string | str (Gecode::FloatRelType frt) |
Map float relation to string. | |
static std::string | str (Gecode::FloatNum f) |
Map floatNum to string. | |
static std::string | str (Gecode::FloatVal f) |
Map floatVal to string. | |
static std::string | str (const Gecode::FloatValArgs &f) |
Map float array to string. |
Detailed Description
Base class for tests with float constraints
Definition at line 244 of file float.hh.
Constructor & Destructor Documentation
Test::Float::Test::Test | ( | const std::string & | s, | |
int | a, | |||
const Gecode::FloatVal & | d, | |||
Gecode::FloatNum | st, | |||
AssignmentType | at, | |||
bool | r | |||
) | [inline] |
Test::Float::Test::Test | ( | const std::string & | s, | |
int | a, | |||
Gecode::FloatNum | min, | |||
Gecode::FloatNum | max, | |||
Gecode::FloatNum | st, | |||
AssignmentType | at, | |||
bool | r | |||
) | [inline] |
Member Function Documentation
bool Test::Float::Test::eqv | ( | void | ) | const [inline, protected] |
bool Test::Float::Test::imp | ( | void | ) | const [inline, protected] |
bool Test::Float::Test::pmi | ( | void | ) | const [inline, protected] |
Assignment * Test::Float::Test::assignment | ( | void | ) | const [virtual] |
bool Test::Float::Test::extendAssignement | ( | Assignment & | a | ) | const [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::MultXYZSol, Test::Float::Arithmetic::MultXXYSol, Test::Float::Arithmetic::DivSol, Test::Float::Arithmetic::SqrXYSol, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Arithmetic::PowXYSol, Test::Float::Arithmetic::NRootXYSol, Test::Float::Transcendental::ExpXYSol, Test::Float::Transcendental::LogXYSol, Test::Float::Transcendental::LogNXYSol, Test::Float::Transcendental::PowXYSol, Test::Float::Trigonometric::SinXYSol, Test::Float::Trigonometric::CosXYSol, Test::Float::Trigonometric::TanXYSol, Test::Float::Trigonometric::ASinXYSol, Test::Float::Trigonometric::ACosXYSol, and Test::Float::Trigonometric::ATanXYSol.
virtual MaybeType Test::Float::Test::solution | ( | const Assignment & | ) | const [pure virtual] |
Check for solution.
Implemented in Test::Float::Arithmetic::MultXYZ, Test::Float::Arithmetic::MultXYZSol, Test::Float::Arithmetic::MultXXY, Test::Float::Arithmetic::MultXXYSol, Test::Float::Arithmetic::MultXYX, Test::Float::Arithmetic::MultXYY, Test::Float::Arithmetic::MultXXX, Test::Float::Arithmetic::Div, Test::Float::Arithmetic::DivSol, Test::Float::Arithmetic::SqrXY, Test::Float::Arithmetic::SqrXYSol, Test::Float::Arithmetic::SqrXX, Test::Float::Arithmetic::SqrtXY, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Arithmetic::SqrtXX, Test::Float::Arithmetic::PowXY, Test::Float::Arithmetic::PowXYSol, Test::Float::Arithmetic::PowXX, Test::Float::Arithmetic::NRootXY, Test::Float::Arithmetic::NRootXYSol, Test::Float::Arithmetic::NRootXX, Test::Float::Arithmetic::AbsXY, Test::Float::Arithmetic::AbsXX, Test::Float::Arithmetic::MinXYZ, Test::Float::Arithmetic::MinXXY, Test::Float::Arithmetic::MinXYX, Test::Float::Arithmetic::MinXYY, Test::Float::Arithmetic::MinXXX, Test::Float::Arithmetic::MaxXYZ, Test::Float::Arithmetic::MaxXXY, Test::Float::Arithmetic::MaxXYX, Test::Float::Arithmetic::MaxXYY, Test::Float::Arithmetic::MaxXXX, Test::Float::Arithmetic::MinNary, Test::Float::Arithmetic::MinNaryShared, Test::Float::Arithmetic::MaxNary, Test::Float::Arithmetic::MaxNaryShared, Test::Float::Basic::Basic, Test::Float::Channel::Int, Test::Float::Channel::Bool, Test::Float::Dom::Val, Test::Float::Dom::Num, Test::Float::Linear::FloatFloat, Test::Float::Linear::FloatVar, Test::Float::Rel::FloatVarXY, Test::Float::Rel::FloatVarXX, Test::Float::Rel::FloatFloat, Test::Float::Transcendental::ExpXY, Test::Float::Transcendental::ExpXYSol, Test::Float::Transcendental::ExpXX, Test::Float::Transcendental::LogXY, Test::Float::Transcendental::LogXYSol, Test::Float::Transcendental::LogXX, Test::Float::Transcendental::LogNXY, Test::Float::Transcendental::LogNXYSol, Test::Float::Transcendental::LogNXX, Test::Float::Transcendental::PowXY, Test::Float::Transcendental::PowXYSol, Test::Float::Transcendental::PowXX, Test::Float::Trigonometric::SinXY, Test::Float::Trigonometric::SinXYSol, Test::Float::Trigonometric::SinXX, Test::Float::Trigonometric::CosXY, Test::Float::Trigonometric::CosXYSol, Test::Float::Trigonometric::CosXX, Test::Float::Trigonometric::TanXY, Test::Float::Trigonometric::TanXYSol, Test::Float::Trigonometric::TanXX, Test::Float::Trigonometric::ASinXY, Test::Float::Trigonometric::ASinXYSol, Test::Float::Trigonometric::ASinXX, Test::Float::Trigonometric::ACosXY, Test::Float::Trigonometric::ACosXYSol, Test::Float::Trigonometric::ACosXX, Test::Float::Trigonometric::ATanXY, Test::Float::Trigonometric::ATanXYSol, and Test::Float::Trigonometric::ATanXX.
bool Test::Float::Test::subsumed | ( | const TestSpace & | ts | ) | const |
bool Test::Float::Test::ignore | ( | const Assignment & | a | ) | const [virtual] |
virtual void Test::Float::Test::post | ( | Gecode::Space & | home, | |
Gecode::FloatVarArray & | x | |||
) | [pure virtual] |
Post constraint.
Implemented in Test::Float::Arithmetic::MultXYZ, Test::Float::Arithmetic::MultXYZSol, Test::Float::Arithmetic::MultXXY, Test::Float::Arithmetic::MultXXYSol, Test::Float::Arithmetic::MultXYX, Test::Float::Arithmetic::MultXYY, Test::Float::Arithmetic::MultXXX, Test::Float::Arithmetic::Div, Test::Float::Arithmetic::DivSol, Test::Float::Arithmetic::SqrXY, Test::Float::Arithmetic::SqrXYSol, Test::Float::Arithmetic::SqrXX, Test::Float::Arithmetic::SqrtXY, Test::Float::Arithmetic::SqrtXYSol, Test::Float::Arithmetic::SqrtXX, Test::Float::Arithmetic::PowXY, Test::Float::Arithmetic::PowXYSol, Test::Float::Arithmetic::PowXX, Test::Float::Arithmetic::NRootXY, Test::Float::Arithmetic::NRootXYSol, Test::Float::Arithmetic::NRootXX, Test::Float::Arithmetic::AbsXY, Test::Float::Arithmetic::AbsXX, Test::Float::Arithmetic::MinXYZ, Test::Float::Arithmetic::MinXXY, Test::Float::Arithmetic::MinXYX, Test::Float::Arithmetic::MinXYY, Test::Float::Arithmetic::MinXXX, Test::Float::Arithmetic::MaxXYZ, Test::Float::Arithmetic::MaxXXY, Test::Float::Arithmetic::MaxXYX, Test::Float::Arithmetic::MaxXYY, Test::Float::Arithmetic::MaxXXX, Test::Float::Arithmetic::MinNary, Test::Float::Arithmetic::MinNaryShared, Test::Float::Arithmetic::MaxNary, Test::Float::Arithmetic::MaxNaryShared, Test::Float::Basic::Basic, Test::Float::Channel::Int, Test::Float::Channel::Bool, Test::Float::Dom::Val, Test::Float::Dom::Num, Test::Float::Linear::FloatFloat, Test::Float::Linear::FloatVar, Test::Float::Rel::FloatVarXY, Test::Float::Rel::FloatVarXX, Test::Float::Rel::FloatFloat, Test::Float::Transcendental::ExpXY, Test::Float::Transcendental::ExpXYSol, Test::Float::Transcendental::ExpXX, Test::Float::Transcendental::LogXY, Test::Float::Transcendental::LogXYSol, Test::Float::Transcendental::LogXX, Test::Float::Transcendental::LogNXY, Test::Float::Transcendental::LogNXYSol, Test::Float::Transcendental::LogNXX, Test::Float::Transcendental::PowXY, Test::Float::Transcendental::PowXYSol, Test::Float::Transcendental::PowXX, Test::Float::Trigonometric::SinXY, Test::Float::Trigonometric::SinXYSol, Test::Float::Trigonometric::SinXX, Test::Float::Trigonometric::CosXY, Test::Float::Trigonometric::CosXYSol, Test::Float::Trigonometric::CosXX, Test::Float::Trigonometric::TanXY, Test::Float::Trigonometric::TanXYSol, Test::Float::Trigonometric::TanXX, Test::Float::Trigonometric::ASinXY, Test::Float::Trigonometric::ASinXYSol, Test::Float::Trigonometric::ASinXX, Test::Float::Trigonometric::ACosXY, Test::Float::Trigonometric::ACosXYSol, Test::Float::Trigonometric::ACosXX, Test::Float::Trigonometric::ATanXY, Test::Float::Trigonometric::ATanXYSol, and Test::Float::Trigonometric::ATanXX.
void Test::Float::Test::post | ( | Gecode::Space & | home, | |
Gecode::FloatVarArray & | x, | |||
Gecode::Reify | r | |||
) | [virtual] |
Post reified constraint.
Reimplemented in Test::Float::Basic::Basic, Test::Float::Dom::Val, Test::Float::Dom::Num, Test::Float::Linear::FloatFloat, Test::Float::Linear::FloatVar, Test::Float::Rel::FloatVarXY, Test::Float::Rel::FloatVarXX, and Test::Float::Rel::FloatFloat.
bool Test::Float::Test::run | ( | void | ) | [virtual] |
std::string Test::Float::Test::str | ( | Gecode::FloatRelType | frt | ) | [inline, static] |
std::string Test::Float::Test::str | ( | Gecode::FloatNum | f | ) | [inline, static] |
std::string Test::Float::Test::str | ( | Gecode::FloatVal | f | ) | [inline, static] |
std::string Test::Float::Test::str | ( | const Gecode::FloatValArgs & | f | ) | [inline, static] |
MaybeType Test::Float::Test::cmp | ( | Gecode::FloatVal | x, | |
Gecode::FloatRelType | r, | |||
Gecode::FloatVal | y | |||
) | [inline, static] |
MaybeType Test::Float::Test::eq | ( | Gecode::FloatVal | x, | |
Gecode::FloatVal | y | |||
) | [inline, static] |
bool Test::Float::Test::flip | ( | void | ) | [inline] |
Member Data Documentation
int Test::Float::Test::arity [protected] |
Gecode::FloatVal Test::Float::Test::dom [protected] |
Gecode::FloatNum Test::Float::Test::step [protected] |
AssignmentType Test::Float::Test::assigmentType [protected] |
bool Test::Float::Test::reified [protected] |
int Test::Float::Test::rms [protected] |
bool Test::Float::Test::testsearch [protected] |
bool Test::Float::Test::testfix [protected] |
bool Test::Float::Test::testsubsumed [protected] |
The documentation for this class was generated from the following files: