Generated on for Gecode by doxygen 1.17.0

Explicit finite tree with prefix costs, admissible bounds, and ranks. More...

Classes

struct  Node
 Tree node. More...
class  Decisions
 Brancher choosing a child of the current node. More...

Public Types

typedef std::vector< Node > Graph

Public Member Functions

 TreeSpace (std::shared_ptr< const Graph > g, bool max)
 TreeSpace (TreeSpace &s)
Space * copy (void) override
 Copying member function.
bool master (const MetaInfo &) override
 Master configuration function for meta search engines.
const Node & node (void) const
void constrain (const Space &s) override
 Constrain function for best solution search.
 Space (void)
 Default constructor.
 Space (Space &s)
 Constructor for cloning.
Space & operator= (const Space &s)=default
 Assignment operator.
virtual ~Space (void)
 Destructor.
virtual bool slave (const MetaInfo &mi)
 Slave configuration function for meta search engines.
SpaceStatus status (StatusStatistics &stat)
 Query space status.
SpaceStatus status (void)
 Query space status without collecting statistics.
const Choice * choice (void)
 Create new choice for current brancher.
const Choice * choice (Archive &e) const
 Create new choice from e.
Space * clone (void) const
 Clone space.
Space * clone (CloneStatistics &stat) const
 Clone space.
void commit (const Choice &c, unsigned int a)
 Commit choice c for alternative a.
void commit (const Choice &c, unsigned int a, CommitStatistics &stat)
 Commit choice c for alternative a.
void trycommit (const Choice &c, unsigned int a)
 If possible, commit choice c for alternative a.
void trycommit (const Choice &c, unsigned int a, CommitStatistics &stat)
 If possible, commit choice c for alternative a.
NGL * ngl (const Choice &c, unsigned int a)
 Create no-good literal for choice c and alternative a.
void print (const Choice &c, unsigned int a, std::ostream &o) const
 Print branch for choice c and alternative a.
void notice (Actor &a, ActorProperty p, bool duplicate=false)
 Notice actor property.
void ignore (Actor &a, ActorProperty p, bool duplicate=false)
 Ignore actor property.
ExecStatus ES_SUBSUMED (Propagator &p)
 Propagator p is subsumed
ExecStatus ES_SUBSUMED_DISPOSED (Propagator &p, size_t s)
 Propagator p is subsumed
ExecStatus ES_FIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has computed partial fixpoint
ExecStatus ES_NOFIX_PARTIAL (Propagator &p, const ModEventDelta &med)
 Propagator p has not computed partial fixpoint
template<class A>
ExecStatus ES_FIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed
template<class A>
ExecStatus ES_NOFIX_DISPOSE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be run
template<class A>
ExecStatus ES_NOFIX_DISPOSE_FORCE (Council< A > &c, A &a)
 Advisor a must be disposed and its propagator must be forcefully rescheduled
void fail (void)
 Fail space.
bool failed (void) const
 Check whether space is failed.
bool stable (void) const
 Return if space is stable (at fixpoint or failed).
Home operator() (Propagator &p)
 Return a home for this space with the information that p is being rewritten.
Home operator() (PropagatorGroup pg)
 Return a home for this space with propagator group information pg.
Home operator() (BrancherGroup bg)
 Return a home for this space with brancher group information bg.
template<class T>
T * alloc (long unsigned int n)
 Allocate block of n objects of type T from space heap.
template<class T>
T * alloc (long int n)
 Allocate block of n objects of type T from space heap.
template<class T>
T * alloc (unsigned int n)
 Allocate block of n objects of type T from space heap.
template<class T>
T * alloc (int n)
 Allocate block of n objects of type T from space heap.
template<class T>
void free (T *b, long unsigned int n)
 Delete n objects allocated from space heap starting at b.
template<class T>
void free (T *b, long int n)
 Delete n objects allocated from space heap starting at b.
template<class T>
void free (T *b, unsigned int n)
 Delete n objects allocated from space heap starting at b.
template<class T>
void free (T *b, int n)
 Delete n objects allocated from space heap starting at b.
template<class T>
T * realloc (T *b, long unsigned int n, long unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T>
T * realloc (T *b, long int n, long int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T>
T * realloc (T *b, unsigned int n, unsigned int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T>
T * realloc (T *b, int n, int m)
 Reallocate block of n objects starting at b to m objects of type T from the space heap.
template<class T>
T ** realloc (T **b, long unsigned int n, long unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T>
T ** realloc (T **b, long int n, long int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T>
T ** realloc (T **b, unsigned int n, unsigned int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
template<class T>
T ** realloc (T **b, int n, int m)
 Reallocate block of n pointers starting at b to m objects of type T* from the space heap.
void * ralloc (size_t s)
 Allocate memory on space heap.
void rfree (void *p, size_t s)
 Free memory previously allocated with alloc (might be reused later).
void * rrealloc (void *b, size_t n, size_t m)
 Reallocate memory block starting at b from size n to size s.
template<size_t>
void * fl_alloc (void)
 Allocate from freelist-managed memory.
template<size_t>
void fl_dispose (FreeList *f, FreeList *l)
 Return freelist-managed memory to freelist.
template<class T>
T & construct (void)
 Construction routines.
template<class T, typename A1>
T & construct (A1 const &a1)
 Constructs a single object of type T from space heap using a unary constructor.
template<class T, typename A1, typename A2>
T & construct (A1 const &a1, A2 const &a2)
 Constructs a single object of type T from space heap using a binary constructor.
template<class T, typename A1, typename A2, typename A3>
T & construct (A1 const &a1, A2 const &a2, A3 const &a3)
 Constructs a single object of type T from space heap using a ternary constructor.
template<class T, typename A1, typename A2, typename A3, typename A4>
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4)
 Constructs a single object of type T from space heap using a quaternary constructor.
template<class T, typename A1, typename A2, typename A3, typename A4, typename A5>
T & construct (A1 const &a1, A2 const &a2, A3 const &a3, A4 const &a4, A5 const &a5)
 Constructs a single object of type T from space heap using a quinary constructor.
void afc_decay (double d)
 Set AFC decay factor to d
double afc_decay (void) const
 Return AFC decay factor.
void afc_unshare (void)
 Unshare AFC information for all propagators.

Static Public Member Functions

static Gecode::Search::HeuristicGuidance guidance (bool max, bool ranked, bool dominance, bool keyed)
 Guidance minimizing cost, or maximizing negated cost.
static std::shared_ptr< const Graph > random (Gecode::Support::RandomGenerator &r, int d=1)
 Return a random tree where all nodes above depth d branch.
Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
static void operator delete (void *p)
 Free memory allocated from heap.

Public Attributes

std::shared_ptr< const Graph > graph
bool maximize
int vertex
int ceiling

Detailed Description

Explicit finite tree with prefix costs, admissible bounds, and ranks.

Definition at line 90 of file search.cpp.

Member Typedef Documentation

◆ Graph

typedef std::vector<Node> Test::Search::TreeSpace::Graph

Definition at line 97 of file search.cpp.

Constructor & Destructor Documentation

◆ TreeSpace() [1/2]

Test::Search::TreeSpace::TreeSpace ( std::shared_ptr< const Graph > g,
bool max )
inline

Definition at line 140 of file search.cpp.

◆ TreeSpace() [2/2]

Test::Search::TreeSpace::TreeSpace ( TreeSpace & s)
inline

Definition at line 145 of file search.cpp.

Member Function Documentation

◆ copy()

Space * Test::Search::TreeSpace::copy ( void )
inlineoverridevirtual

Copying member function.

Must create a new object using the constructor for cloning.

Should not be used directly, use Space::clone to create a clone of a Space.

Implements Gecode::Space.

Definition at line 148 of file search.cpp.

◆ master()

bool Test::Search::TreeSpace::master ( const MetaInfo & mi)
inlineoverridevirtual

Master configuration function for meta search engines.

This configuration function is used by both restart and portfolio meta search engines.

  • A restart meta search engine calls this function on its master space whenever it finds a solution or exploration restarts. mi contains information about the current restart.

If a solution has been found, then search will continue with a restart id the function returns true, otherwise search will continue.

The default function posts no-goods obtained from mi.

  • A portfolio meta engine calls this function once on the master space. The return value is ignored.

The default function does nothing.

Reimplemented from Gecode::Space.

Definition at line 149 of file search.cpp.

◆ node()

const Node & Test::Search::TreeSpace::node ( void ) const
inline

Definition at line 150 of file search.cpp.

◆ constrain()

void Test::Search::TreeSpace::constrain ( const Space & best)
inlineoverridevirtual

Constrain function for best solution search.

Must constrain this space to be better than the so far best solution best.

The default function does nothing.

Reimplemented from Gecode::Space.

Definition at line 151 of file search.cpp.

◆ guidance()

Gecode::Search::HeuristicGuidance Test::Search::TreeSpace::guidance ( bool max,
bool ranked,
bool dominance,
bool keyed )
inlinestatic

Guidance minimizing cost, or maximizing negated cost.

Definition at line 157 of file search.cpp.

◆ random()

std::shared_ptr< const Graph > Test::Search::TreeSpace::random ( Gecode::Support::RandomGenerator & r,
int d = 1 )
inlinestatic

Return a random tree where all nodes above depth d branch.

Definition at line 183 of file search.cpp.

Member Data Documentation

◆ graph

std::shared_ptr<const Graph> Test::Search::TreeSpace::graph

Definition at line 98 of file search.cpp.

◆ maximize

bool Test::Search::TreeSpace::maximize

Definition at line 99 of file search.cpp.

◆ vertex

int Test::Search::TreeSpace::vertex

Definition at line 100 of file search.cpp.

◆ ceiling

int Test::Search::TreeSpace::ceiling

Definition at line 100 of file search.cpp.


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