Go to the documentation of this file.
27 #ifndef AlpsNodePool_h_
28 #define AlpsNodePool_h_
65 virtual std::pair<AlpsKnowledge*, double>
getKnowledge()
const;
74 double> >& kls)
const;
AlpsSearchType searchStrategy_
virtual int getNumKnowledges() const
Query the number of nodes in the node pool.
virtual void popKnowledge()
Remove the node with highest priority from the pool.
void clear()
Remove all the nodes in the pool (does not free memory).
AlpsSearchType
Search Strategies.
void pop()
Remove the top element from the heap.
virtual std::pair< AlpsKnowledge *, double > getKnowledge() const
Get the node with highest priority. Doesn't remove it from the pool.
AlpsNodePool & operator=(AlpsNodePool const &)
Disable copy assignment operator.
double getBestKnowledgeValue() const
Get the "best value" of the nodes in node pool.
This class holds one node of the search tree.
This is an abstract base class, fixing an API for pool types of Alps, AlpsNodePool,...
AlpsPriorityQueue< AlpsTreeNode * > candidateList_
Candidate list.
AlpsNodePool()
Default constructor.
virtual ~AlpsNodePool()
Destructor.
virtual std::pair< AlpsKnowledge *, double > getBestKnowledge() const
Query the best knowledge in the pool.
virtual void setMaxNumKnowledges(int num)
Set the quantity limit of knowledges that can be stored in the pool.
const AlpsPriorityQueue< AlpsTreeNode * > & getCandidateList() const
Get a constant reference to the priority queue that stores nodes.
The abstract base class of Alps knowledges generated during the search.
void clear()
Remove all elements from the vector.
void setNodeSelection(AlpsSearchStrategy< AlpsTreeNode * > &compare)
Set strategy and resort heap.
AlpsNodePool is used to store the nodes to be processed.
void deleteGuts()
Delete all the nodes in the pool and free memory.
virtual int getMaxNumKnowledges() const
Query the quantity limit of knowledges.
virtual bool hasKnowledge() const
Check whether there are still nodes in the node pool.
virtual void addKnowledge(AlpsKnowledge *node, double priority)
Add a node to node pool.
AlpsTreeNode * getBestNode() const
Get the "best" nodes in node pool.
bool empty() const
Return true for an empty vector.
virtual void getAllKnowledges(std::vector< std::pair< AlpsKnowledge *, double > > &kls) const
Get a reference to all the knowledges in the pool.*/.