- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# AlpsNodePool Class Reference

Node pool is used to store the nodes to be processed. More...

`#include <AlpsNodePool.h>`

Inheritance diagram for AlpsNodePool:

[legend]
Collaboration diagram for AlpsNodePool:

[legend]
List of all members.

## Public Member Functions
| AlpsNodePool ()
virtual | ~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.
AlpsTreeNode * | getBestNode () const
| Get the "best" nodes in node pool.
bool | hasKnowledge () const
| Check whether there are still nodes in the node pool.
std::pair< AlpsKnowledge *, double > | getKnowledge () const
| Get the node with highest priority.
void | popKnowledge ()
| Remove the node with highest priority from the pool.
void | addKnowledge (AlpsKnowledge *node, double priority)
| Add a node to node pool.
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 | deleteGuts ()
| Delete all the nodes in the pool and free memory.
void | clear ()
| Remove all the nodes in the pool (does not free memory).
## Private Member Functions
| AlpsNodePool (const AlpsNodePool &)
AlpsNodePool & | operator= (const AlpsNodePool &)
## Private Attributes
AlpsPriorityQueue< AlpsTreeNode * > | candidateList_

## Detailed Description

Node pool is used to store the nodes to be processed.

Definition at line 37 of file AlpsNodePool.h.

## Constructor & Destructor Documentation

AlpsNodePool::AlpsNodePool | ( | const AlpsNodePool & |  | ) | `[private]`

AlpsNodePool::AlpsNodePool | ( |  | ) | `[inline]`

Definition at line 46 of file AlpsNodePool.h.

virtual AlpsNodePool::~AlpsNodePool | ( |  | ) | `[inline, virtual]`

Definition at line 47 of file AlpsNodePool.h.

References candidateList_, deleteGuts(), and AlpsPriorityQueue< T >::empty().

## Member Function Documentation

AlpsNodePool& AlpsNodePool::operator= | ( | const AlpsNodePool & |  | ) | `[private]`

int AlpsNodePool::getNumKnowledges | ( |  | ) | const`[inline, virtual]`

Query the number of nodes in the node pool.

Implements AlpsKnowledgePool.

Definition at line 55 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::size().

Referenced by AlpsSubTree::getNumNodes(), and AlpsSubTree::reset().

double AlpsNodePool::getBestKnowledgeValue | ( |  | ) | const`[inline]`

Get the "best value" of the nodes in node pool.

Definition at line 58 of file AlpsNodePool.h.

References ALPS_OBJ_MAX, candidateList_, AlpsPriorityQueue< T >::getContainer(), and AlpsTreeNode::getQuality().

AlpsTreeNode* AlpsNodePool::getBestNode | ( |  | ) | const`[inline]`

Get the "best" nodes in node pool.

Definition at line 74 of file AlpsNodePool.h.

References ALPS_OBJ_MAX, candidateList_, AlpsPriorityQueue< T >::getContainer(), and AlpsTreeNode::getQuality().

bool AlpsNodePool::hasKnowledge | ( |  | ) | const`[inline, virtual]`

Check whether there are still nodes in the node pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 93 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::empty().

Referenced by AlpsSubTree::changeNodePool().

std::pair<AlpsKnowledge*, double> AlpsNodePool::getKnowledge | ( |  | ) | const`[inline, virtual]`

Get the node with highest priority.

Doesn't remove it from the pool

Implements AlpsKnowledgePool.

Definition at line 96 of file AlpsNodePool.h.

References candidateList_, AlpsTreeNode::getQuality(), and AlpsPriorityQueue< T >::top().

Referenced by AlpsSubTree::reset().

void AlpsNodePool::popKnowledge | ( |  | ) | `[inline, virtual]`

Remove the node with highest priority from the pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 103 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::pop().

Referenced by AlpsSubTree::reset().

void AlpsNodePool::addKnowledge | ( | AlpsKnowledge * | node,
|  | double | priority |
| ) |  |  | `[inline, virtual]`

Add a node to node pool.

Implements AlpsKnowledgePool.

Definition at line 110 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::push().

Referenced by AlpsSubTree::reset().

const AlpsPriorityQueue<AlpsTreeNode*>& AlpsNodePool::getCandidateList | ( |  | ) | const`[inline]`

Get a constant reference to the priority queue that stores nodes.

Definition at line 124 of file AlpsNodePool.h.

References candidateList_.

void AlpsNodePool::setNodeSelection | ( | AlpsSearchStrategy< AlpsTreeNode * > & | compare | ) | `[inline]`

Set strategy and resort heap.

Definition at line 127 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::setComparison().

Referenced by AlpsSubTree::setNodeSelection().

void AlpsNodePool::deleteGuts | ( |  | ) | `[inline]`

Delete all the nodes in the pool and free memory.

Definition at line 132 of file AlpsNodePool.h.

References candidateList_, AlpsPriorityQueue< T >::clear(), AlpsPriorityQueue< T >::getContainer(), and AlpsPriorityQueue< T >::size().

Referenced by ~AlpsNodePool().

void AlpsNodePool::clear | ( |  | ) | `[inline]`

Remove all the nodes in the pool (does not free memory).

Definition at line 142 of file AlpsNodePool.h.

References candidateList_, and AlpsPriorityQueue< T >::clear().

Referenced by AlpsSubTree::changeNodePool(), and AlpsSubTree::clearNodePools().

## Member Data Documentation

AlpsPriorityQueue<AlpsTreeNode*> AlpsNodePool::candidateList_`[private]`

Definition at line 43 of file AlpsNodePool.h.

Referenced by addKnowledge(), clear(), deleteGuts(), getBestKnowledgeValue(), getBestNode(), getCandidateList(), getKnowledge(), getNumKnowledges(), hasKnowledge(), popKnowledge(), setNodeSelection(), and ~AlpsNodePool().

The documentation for this class was generated from the following file:

- /home/coin/SVN-release/Blis-0.91.2/Alps/src/AlpsNodePool.h