Alps
2.0.2
|
AlpsNodePool is used to store the nodes to be processed. More...
#include <AlpsNodePool.h>
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... | |
AlpsTreeNode * | getBestNode () 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... | |
AlpsNodePool & | operator= (AlpsNodePool const &) |
Disable copy assignment operator. More... | |
AlpsNodePool is used to store the nodes to be processed.
Definition at line 43 of file AlpsNodePool.h.
AlpsNodePool::AlpsNodePool | ( | ) |
Default constructor.
AlpsNodePool::AlpsNodePool | ( | AlpsSearchType | type | ) |
Default constructor.
|
virtual |
Destructor.
|
private |
Disable copy contructor.
|
virtual |
Query the number of nodes in the node pool.
Implements AlpsKnowledgePool.
|
virtual |
Get the node with highest priority. Doesn't remove it from the pool.
Implements AlpsKnowledgePool.
|
inlinevirtual |
Check whether there are still nodes in the node pool.
Implements AlpsKnowledgePool.
Definition at line 67 of file AlpsNodePool.h.
|
inlinevirtual |
Query the quantity limit of knowledges.
Implements AlpsKnowledgePool.
Definition at line 69 of file AlpsNodePool.h.
|
virtual |
Query the best knowledge in the pool.
Implements AlpsKnowledgePool.
|
virtual |
Get a reference to all the knowledges in the pool.*/.
Implements AlpsKnowledgePool.
|
virtual |
Add a node to node pool.
Implements AlpsKnowledgePool.
|
inlinevirtual |
Remove the node with highest priority from the pool.
Implements AlpsKnowledgePool.
Definition at line 82 of file AlpsNodePool.h.
|
virtual |
Set the quantity limit of knowledges that can be stored in the pool.
Implements AlpsKnowledgePool.
double AlpsNodePool::getBestKnowledgeValue | ( | ) | const |
Get the "best value" of the nodes in node pool.
AlpsTreeNode* AlpsNodePool::getBestNode | ( | ) | const |
Get the "best" nodes in node pool.
const AlpsPriorityQueue<AlpsTreeNode*>& AlpsNodePool::getCandidateList | ( | ) | const |
Get a constant reference to the priority queue that stores nodes.
void AlpsNodePool::setNodeSelection | ( | AlpsSearchStrategy< AlpsTreeNode * > & | compare | ) |
Set strategy and resort heap.
void AlpsNodePool::deleteGuts | ( | ) |
Delete all the nodes in the pool and free memory.
|
inline |
Remove all the nodes in the pool (does not free memory).
Definition at line 101 of file AlpsNodePool.h.
|
private |
Disable copy assignment operator.
|
private |
Candidate list.
Definition at line 45 of file AlpsNodePool.h.
|
private |
Definition at line 47 of file AlpsNodePool.h.