Alps  1.5.7
Public Member Functions | List of all members
AlpsNodePool Class Reference

Node pool is used to store the nodes to be processed. More...

#include <AlpsNodePool.h>

+ Inheritance diagram for AlpsNodePool:
+ Collaboration diagram for AlpsNodePool:

Public Member Functions

 AlpsNodePool ()
 
 AlpsNodePool (AlpsSearchType type)
 
virtual ~AlpsNodePool ()
 
int getNumKnowledges () const
 Query the number of nodes in the node pool. More...
 
double getBestKnowledgeValue () const
 Get the "best value" of the nodes in node pool. More...
 
AlpsTreeNodegetBestNode () const
 Get the "best" nodes in node pool. More...
 
bool hasKnowledge () const
 Check whether there are still nodes in the node pool. More...
 
std::pair< AlpsKnowledge *, double > getKnowledge () const
 Get the node with highest priority. More...
 
void popKnowledge ()
 Remove the node with highest priority from the pool. More...
 
void addKnowledge (AlpsKnowledge *node, double priority)
 Remove the node with highest priority from the pool and the elite list. More...
 
const AlpsPriorityQueue< AlpsTreeNode * > & getCandidateList () const
 Get a constant reference to the priority queue that stores nodes. More...
 
void setNodeSelection (AlpsSearchStrategy< AlpsTreeNode * > &compare)
 Set strategy and resort heap. More...
 
void deleteGuts ()
 Delete all the nodes in the pool and free memory. More...
 
void clear ()
 Remove all the nodes in the pool (does not free memory). More...
 
- Public Member Functions inherited from AlpsKnowledgePool
 AlpsKnowledgePool ()
 
virtual ~AlpsKnowledgePool ()
 
virtual void setMaxNumKnowledges (int num)
 Set the quantity limit of knowledges that can be stored in the pool. More...
 
virtual int getMaxNumKnowledges () const
 Query the quantity limit of knowledges. More...
 
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge () const
 Query the best knowledge in the pool. More...
 
virtual void getAllKnowledges (std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
 Get a reference to all the knowledges in the pool. More...
 

Detailed Description

Node pool is used to store the nodes to be processed.

Definition at line 37 of file AlpsNodePool.h.

Constructor & Destructor Documentation

◆ AlpsNodePool() [1/2]

AlpsNodePool::AlpsNodePool ( )
inline

Definition at line 48 of file AlpsNodePool.h.

◆ AlpsNodePool() [2/2]

AlpsNodePool::AlpsNodePool ( AlpsSearchType  type)
inline

Definition at line 50 of file AlpsNodePool.h.

◆ ~AlpsNodePool()

virtual AlpsNodePool::~AlpsNodePool ( )
inlinevirtual

Definition at line 52 of file AlpsNodePool.h.

Member Function Documentation

◆ getNumKnowledges()

int AlpsNodePool::getNumKnowledges ( ) const
inlinevirtual

Query the number of nodes in the node pool.

Implements AlpsKnowledgePool.

Definition at line 60 of file AlpsNodePool.h.

◆ getBestKnowledgeValue()

double AlpsNodePool::getBestKnowledgeValue ( ) const
inline

Get the "best value" of the nodes in node pool.

Definition at line 64 of file AlpsNodePool.h.

◆ getBestNode()

AlpsTreeNode* AlpsNodePool::getBestNode ( ) const
inline

Get the "best" nodes in node pool.

Definition at line 80 of file AlpsNodePool.h.

◆ hasKnowledge()

bool AlpsNodePool::hasKnowledge ( ) const
inlinevirtual

Check whether there are still nodes in the node pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 109 of file AlpsNodePool.h.

◆ getKnowledge()

std::pair<AlpsKnowledge*, double> AlpsNodePool::getKnowledge ( ) const
inlinevirtual

Get the node with highest priority.

Doesn't remove it from the pool

Implements AlpsKnowledgePool.

Definition at line 112 of file AlpsNodePool.h.

◆ popKnowledge()

void AlpsNodePool::popKnowledge ( )
inlinevirtual

Remove the node with highest priority from the pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 119 of file AlpsNodePool.h.

◆ addKnowledge()

void AlpsNodePool::addKnowledge ( AlpsKnowledge node,
double  priority 
)
inlinevirtual

Remove the node with highest priority from the pool and the elite list.

Add a node to node pool.

Implements AlpsKnowledgePool.

Definition at line 126 of file AlpsNodePool.h.

◆ getCandidateList()

const AlpsPriorityQueue<AlpsTreeNode*>& AlpsNodePool::getCandidateList ( ) const
inline

Get a constant reference to the priority queue that stores nodes.

Definition at line 140 of file AlpsNodePool.h.

◆ setNodeSelection()

void AlpsNodePool::setNodeSelection ( AlpsSearchStrategy< AlpsTreeNode * > &  compare)
inline

Set strategy and resort heap.

Definition at line 143 of file AlpsNodePool.h.

◆ deleteGuts()

void AlpsNodePool::deleteGuts ( )
inline

Delete all the nodes in the pool and free memory.

Definition at line 148 of file AlpsNodePool.h.

◆ clear()

void AlpsNodePool::clear ( )
inline

Remove all the nodes in the pool (does not free memory).

Definition at line 158 of file AlpsNodePool.h.


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