Generated on for Gecode by doxygen 1.17.0
Test::Float::Transcendental::PowBaseConsistency Class Reference

Exact fixed-base powers, inverse logarithms, and shared variables. More...

Public Member Functions

 PowBaseConsistency (Gecode::FloatNum b, Gecode::FloatNum x, Gecode::FloatNum y, bool log, bool share, bool valid)
virtual Assignment * assignment (void) const
 Check one exact example through the standard posting/assignment tests.
virtual MaybeType solution (const Assignment &) const
 Use exact expected results instead of computing them with exp/log.
virtual void post (Gecode::Space &home, Gecode::FloatVarArray &x)
 Post constraint.
 Test (const std::string &s, int a, const Gecode::FloatVal &d, Gecode::FloatNum st, AssignmentType at, bool r)
 Constructor.
 Test (TestTags tags, const std::string &s, int a, const Gecode::FloatVal &d, Gecode::FloatNum st, AssignmentType at, bool r)
 Construct and register a test with explicitly assigned tags.
 Test (const std::string &s, int a, Gecode::FloatNum min, Gecode::FloatNum max, Gecode::FloatNum st, AssignmentType at, bool r)
 Constructor.
 Test (TestTags tags, const std::string &s, int a, Gecode::FloatNum min, Gecode::FloatNum max, Gecode::FloatNum st, AssignmentType at, bool r)
 Construct and register a test with explicitly assigned tags.
virtual bool extendAssignment (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.
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 assignment.
virtual bool ignore (const Assignment &a) const
 Whether to ignore assignment for reification.
virtual void post (Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
 Post reified constraint.
virtual bool run (void)
 Perform test.
bool flip (void)
 Flip a coin and return true or false randomly.
Public Member Functions inherited from Test::Base
 Base (std::string s)
 Create and register a standard test with name s.
 Base (std::string s, TestTags t)
 Create and register test with name s and tags t.
const std::string & name (void) const
 Return name of test.
TestTags tags (void) const
 Return tags for test.
Base * next (void) const
 Return next test.
void next (Base *n)
 Set next test.
bool fixpoint (void)
 Throw a coin whether to compute a fixpoint.
virtual ~Base (void)
 Destructor.

Protected Attributes

Gecode::FloatNum base
Gecode::FloatNum input
Gecode::FloatNum output
bool logarithm
bool shared
bool expected
Protected Attributes inherited from Test::Float::Test
int arity
 Number of variables.
Gecode::FloatVal dom
 Domain of variables.
Gecode::FloatNum step
 Step for going to next solution.
AssignmentType assignmentType
 Gives the type of assignment to use.
bool reified
 Does the constraint also exist as reified constraint.
int rms
 Supported reification modes, encoded as a bit mask of 1 << Gecode::RM_*.
bool testsearch
 Whether to perform search test.
bool testfix
 Whether to perform fixpoint test.
bool testsubsumed
 Whether to test for subsumption.

Additional Inherited Members

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.
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.
Static Public Member Functions inherited from Test::Base
static void sort (void)
 Sort tests alphabetically.
static Base * tests (void)
 Return all tests.
static bool fixpoint (Gecode::Support::RandomGenerator &rand)
 Throw a coin whether to compute a fixpoint.
static std::string str (bool b)
 Map bool 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.
Gecode::Support::RandomGenerator _rand
 Random number generator.
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.

Detailed Description

Exact fixed-base powers, inverse logarithms, and shared variables.

Definition at line 50 of file transcendental.cpp.

Constructor & Destructor Documentation

◆ PowBaseConsistency()

Test::Float::Transcendental::PowBaseConsistency::PowBaseConsistency ( Gecode::FloatNum b,
Gecode::FloatNum x,
Gecode::FloatNum y,
bool log,
bool share,
bool valid )
inline

Definition at line 59 of file transcendental.cpp.

Member Function Documentation

◆ assignment()

virtual Assignment * Test::Float::Transcendental::PowBaseConsistency::assignment ( void ) const
inlinevirtual

Check one exact example through the standard posting/assignment tests.

Reimplemented from Test::Float::Test.

Definition at line 70 of file transcendental.cpp.

◆ solution()

virtual MaybeType Test::Float::Transcendental::PowBaseConsistency::solution ( const Assignment & ) const
inlinevirtual

Use exact expected results instead of computing them with exp/log.

Implements Test::Float::Test.

Definition at line 78 of file transcendental.cpp.

◆ post()

virtual void Test::Float::Transcendental::PowBaseConsistency::post ( Gecode::Space & home,
Gecode::FloatVarArray & x )
inlinevirtual

Post constraint.

Implements Test::Float::Test.

Definition at line 81 of file transcendental.cpp.

Member Data Documentation

◆ base

Gecode::FloatNum Test::Float::Transcendental::PowBaseConsistency::base
protected

Definition at line 52 of file transcendental.cpp.

◆ input

Gecode::FloatNum Test::Float::Transcendental::PowBaseConsistency::input
protected

Definition at line 53 of file transcendental.cpp.

◆ output

Gecode::FloatNum Test::Float::Transcendental::PowBaseConsistency::output
protected

Definition at line 54 of file transcendental.cpp.

◆ logarithm

bool Test::Float::Transcendental::PowBaseConsistency::logarithm
protected

Definition at line 55 of file transcendental.cpp.

◆ shared

bool Test::Float::Transcendental::PowBaseConsistency::shared
protected

Definition at line 56 of file transcendental.cpp.

◆ expected

bool Test::Float::Transcendental::PowBaseConsistency::expected
protected

Definition at line 57 of file transcendental.cpp.


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