Node pool is used to store the nodes to be processed. More...
#include <AlpsNodePool.h>
Public Member Functions | |
AlpsNodePool () | |
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... | |
AlpsTreeNode * | getBestNode () 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... | |
![]() | |
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... | |
Private Member Functions | |
AlpsNodePool (const AlpsNodePool &) | |
AlpsNodePool & | operator= (const AlpsNodePool &) |
Private Attributes | |
AlpsPriorityQueue< AlpsTreeNode * > | candidateList_ |
Node pool is used to store the nodes to be processed.
Definition at line 37 of file AlpsNodePool.h.
|
private |
|
inline |
Definition at line 46 of file AlpsNodePool.h.
|
inlinevirtual |
Definition at line 47 of file AlpsNodePool.h.
|
private |
|
inlinevirtual |
Query the number of nodes in the node pool.
Implements AlpsKnowledgePool.
Definition at line 55 of file AlpsNodePool.h.
|
inline |
Get the "best value" of the nodes in node pool.
Definition at line 58 of file AlpsNodePool.h.
|
inline |
Get the "best" nodes in node pool.
Definition at line 74 of file AlpsNodePool.h.
|
inlinevirtual |
Check whether there are still nodes in the node pool.
Reimplemented from AlpsKnowledgePool.
Definition at line 93 of file AlpsNodePool.h.
|
inlinevirtual |
Get the node with highest priority.
Doesn't remove it from the pool
Implements AlpsKnowledgePool.
Definition at line 96 of file AlpsNodePool.h.
|
inlinevirtual |
Remove the node with highest priority from the pool.
Reimplemented from AlpsKnowledgePool.
Definition at line 103 of file AlpsNodePool.h.
|
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 110 of file AlpsNodePool.h.
|
inline |
Get a constant reference to the priority queue that stores nodes.
Definition at line 124 of file AlpsNodePool.h.
|
inline |
Set strategy and resort heap.
Definition at line 127 of file AlpsNodePool.h.
|
inline |
Delete all the nodes in the pool and free memory.
Definition at line 132 of file AlpsNodePool.h.
|
inline |
Remove all the nodes in the pool (does not free memory).
Definition at line 142 of file AlpsNodePool.h.
|
private |
Definition at line 43 of file AlpsNodePool.h.