23#ifndef AlpsNodePool_h_
24#define AlpsNodePool_h_
65 const std::vector<AlpsTreeNode *>& pool=
candidateList_.getContainer();
67 int size =
static_cast<int> (pool.size());
70 for (k = 0; k < size; ++k) {
81 const std::vector<AlpsTreeNode *>& pool=
candidateList_.getContainer();
83 int size =
static_cast<int> (pool.size());
95 for (k = 0; k < size; ++k) {
149 std::vector<AlpsTreeNode* > nodeVec =
candidateList_.getContainer();
AlpsSearchType
Search Strategies.
@ AlpsSearchTypeBestFirst
@ AlpsSearchTypeBreadthFirst
AlpsKnowledgePool(const AlpsKnowledgePool &)
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
const AlpsPriorityQueue< AlpsTreeNode * > & getCandidateList() const
Get a constant reference to the priority queue that stores nodes.
void setNodeSelection(AlpsSearchStrategy< AlpsTreeNode * > &compare)
Set strategy and resort heap.
void popKnowledge()
Remove the node with highest priority from the pool.
AlpsSearchType searchStrategy_
AlpsPriorityQueue< AlpsTreeNode * > candidateList_
AlpsNodePool(AlpsSearchType type)
AlpsNodePool & operator=(const AlpsNodePool &)
int getNumKnowledges() const
Query the number of nodes in the node pool.
double getBestKnowledgeValue() const
Get the "best value" of the nodes in node pool.
void deleteGuts()
Delete all the nodes in the pool and free memory.
AlpsTreeNode * getBestNode() const
Get the "best" nodes in node pool.
void addKnowledge(AlpsKnowledge *node, double priority)
Remove the node with highest priority from the pool and the elite list.
void clear()
Remove all the nodes in the pool (does not free memory).
bool hasKnowledge() const
Check whether there are still nodes in the node pool.
AlpsNodePool(const AlpsNodePool &)
std::pair< AlpsKnowledge *, double > getKnowledge() const
Get the node with highest priority.
This class holds one node of the search tree.
double getQuality() const
Query/set the quality of the node.