Alps  2.0.2
Private Attributes | List of all members
AlpsNodePool Class Reference

AlpsNodePool is used to store the nodes to be processed. More...

#include <AlpsNodePool.h>

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

Public Member Functions

Constructor and destructor.
 AlpsNodePool ()
 Default constructor. More...
 
 AlpsNodePool (AlpsSearchType type)
 Default constructor. More...
 
virtual ~AlpsNodePool ()
 Destructor. More...
 
Querry methods
virtual int getNumKnowledges () const
 Query the number of nodes in the node pool. More...
 
virtual std::pair< AlpsKnowledge *, double > getKnowledge () const
 Get the node with highest priority. Doesn't remove it from the pool. More...
 
virtual bool hasKnowledge () const
 Check whether there are still nodes in the node 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...
 
Knowledge manipulation
virtual void addKnowledge (AlpsKnowledge *node, double priority)
 Add a node to node pool. More...
 
virtual void popKnowledge ()
 Remove the node with highest priority from the pool. More...
 
- Public Member Functions inherited from AlpsKnowledgePool
 AlpsKnowledgePool (AlpsKnowledgePoolType type)
 Default constructor. More...
 
virtual ~AlpsKnowledgePool ()
 Destructor. More...
 

Private Attributes

AlpsPriorityQueue< AlpsTreeNode * > candidateList_
 Candidate list. More...
 
AlpsSearchType searchStrategy_
 

Other functions

virtual void setMaxNumKnowledges (int num)
 Set the quantity limit of knowledges that can be stored in the 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...
 
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...
 
 AlpsNodePool (AlpsNodePool const &)
 Disable copy contructor. More...
 
AlpsNodePooloperator= (AlpsNodePool const &)
 Disable copy assignment operator. More...
 

Detailed Description

AlpsNodePool is used to store the nodes to be processed.

Definition at line 43 of file AlpsNodePool.h.

Constructor & Destructor Documentation

◆ AlpsNodePool() [1/3]

AlpsNodePool::AlpsNodePool ( )

Default constructor.

◆ AlpsNodePool() [2/3]

AlpsNodePool::AlpsNodePool ( AlpsSearchType  type)

Default constructor.

◆ ~AlpsNodePool()

virtual AlpsNodePool::~AlpsNodePool ( )
virtual

Destructor.

◆ AlpsNodePool() [3/3]

AlpsNodePool::AlpsNodePool ( AlpsNodePool const &  )
private

Disable copy contructor.

Member Function Documentation

◆ getNumKnowledges()

virtual int AlpsNodePool::getNumKnowledges ( ) const
virtual

Query the number of nodes in the node pool.

Implements AlpsKnowledgePool.

◆ getKnowledge()

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

Get the node with highest priority. Doesn't remove it from the pool.

Implements AlpsKnowledgePool.

◆ hasKnowledge()

virtual bool AlpsNodePool::hasKnowledge ( ) const
inlinevirtual

Check whether there are still nodes in the node pool.

Implements AlpsKnowledgePool.

Definition at line 67 of file AlpsNodePool.h.

◆ getMaxNumKnowledges()

virtual int AlpsNodePool::getMaxNumKnowledges ( ) const
inlinevirtual

Query the quantity limit of knowledges.

Implements AlpsKnowledgePool.

Definition at line 69 of file AlpsNodePool.h.

◆ getBestKnowledge()

virtual std::pair<AlpsKnowledge*, double> AlpsNodePool::getBestKnowledge ( ) const
virtual

Query the best knowledge in the pool.

Implements AlpsKnowledgePool.

◆ getAllKnowledges()

virtual void AlpsNodePool::getAllKnowledges ( std::vector< std::pair< AlpsKnowledge *, double > > &  kls) const
virtual

Get a reference to all the knowledges in the pool.*‍/.

Implements AlpsKnowledgePool.

◆ addKnowledge()

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

Add a node to node pool.

Implements AlpsKnowledgePool.

◆ popKnowledge()

virtual void AlpsNodePool::popKnowledge ( )
inlinevirtual

Remove the node with highest priority from the pool.

Implements AlpsKnowledgePool.

Definition at line 82 of file AlpsNodePool.h.

◆ setMaxNumKnowledges()

virtual void AlpsNodePool::setMaxNumKnowledges ( int  num)
virtual

Set the quantity limit of knowledges that can be stored in the pool.

Implements AlpsKnowledgePool.

◆ getBestKnowledgeValue()

double AlpsNodePool::getBestKnowledgeValue ( ) const

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

◆ getBestNode()

AlpsTreeNode* AlpsNodePool::getBestNode ( ) const

Get the "best" nodes in node pool.

◆ getCandidateList()

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

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

◆ setNodeSelection()

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

Set strategy and resort heap.

◆ deleteGuts()

void AlpsNodePool::deleteGuts ( )

Delete all the nodes in the pool and free memory.

◆ clear()

void AlpsNodePool::clear ( )
inline

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

Definition at line 101 of file AlpsNodePool.h.

◆ operator=()

AlpsNodePool& AlpsNodePool::operator= ( AlpsNodePool const &  )
private

Disable copy assignment operator.

Member Data Documentation

◆ candidateList_

AlpsPriorityQueue<AlpsTreeNode*> AlpsNodePool::candidateList_
private

Candidate list.

Definition at line 45 of file AlpsNodePool.h.

◆ searchStrategy_

AlpsSearchType AlpsNodePool::searchStrategy_
private

Definition at line 47 of file AlpsNodePool.h.


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