23 #ifndef AlpsNodePool_h_
24 #define AlpsNodePool_h_
61 int size =
static_cast<int> (pool.size());
64 for (k = 0; k < size; ++k) {
77 int size =
static_cast<int> (pool.size());
82 for (k = 0; k < size; ++k) {
97 return std::make_pair( static_cast<AlpsKnowledge *>
int getNumKnowledges() const
Query the number of nodes in the node pool.
void setNodeSelection(AlpsSearchStrategy< AlpsTreeNode * > &compare)
Set strategy and resort heap.
const std::vector< T > & getContainer() const
Return a const reference to the container.
std::pair< AlpsKnowledge *, double > getKnowledge() const
Get the node with highest priority.
void push(T x)
Add a element to the heap.
void setComparison(AlpsSearchStrategy< T > &c)
Set comparison function and resort heap.
AlpsNodePool & operator=(const AlpsNodePool &)
void pop()
Remove the top element from the heap.
bool empty() const
Return true for an empty vector.
void clear()
Remove all the nodes in the pool (does not free memory).
double getBestKnowledgeValue() const
Get the "best value" of the nodes in node pool.
void addKnowledge(AlpsKnowledge *node, double priority)
Remove the node with highest priority from the pool and the elite list
This class holds one node of the search tree.
size_t size() const
Return the size of the vector.
void popKnowledge()
Remove the node with highest priority from the pool.
AlpsTreeNode * getBestNode() const
Get the "best" nodes in node pool.
void deleteGuts()
Delete all the nodes in the pool and free memory.
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
AlpsPriorityQueue< AlpsTreeNode * > candidateList_
Node pool is used to store the nodes to be processed.
bool hasKnowledge() const
Check whether there are still nodes in the node pool.
void clear()
Remove all elements from the vector.
const AlpsPriorityQueue< AlpsTreeNode * > & getCandidateList() const
Get a constant reference to the priority queue that stores nodes.
T top() const
Return the top element of the heap.
double getQuality() const
Query/set the quality of the node.