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

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

# AlpsSubTreePool Class Reference

The subtree pool is used to store subtrees. More...

`#include <AlpsSubTreePool.h>`

Inheritance diagram for AlpsSubTreePool:

[legend]
Collaboration diagram for AlpsSubTreePool:

[legend]
List of all members.

## Public Member Functions
| AlpsSubTreePool ()
virtual | ~AlpsSubTreePool ()
int | getNumKnowledges () const
| Query the number of subtrees in the pool.
bool | hasKnowledge () const
| Check whether there is a subtree in the subtree pool.
std::pair< AlpsKnowledge *, double > | getKnowledge () const
| Get a subtree from subtree pool, doesn't remove it from the pool.
void | popKnowledge ()
| Remove a subtree from the pool.
void | addKnowledge (AlpsKnowledge *subTree, double priority)
| Add a subtree to the subtree pool.
const AlpsPriorityQueue< AlpsSubTree * > & | getSubTreeList () const
| Return the container of subtrees.
void | setComparison (AlpsSearchStrategy< AlpsSubTree * > &compare)
| Set comparison function and resort heap.
void | deleteGuts ()
| Delete the subtrees in the pool.
double | getBestQuality ()
| Get the quality of the best subtree.
## Private Member Functions
| AlpsSubTreePool (const AlpsSubTreePool &)
AlpsSubTreePool & | operator= (const AlpsSubTreePool &)
## Private Attributes
AlpsPriorityQueue< AlpsSubTree * > | subTreeList_

## Detailed Description

The subtree pool is used to store subtrees.

Definition at line 32 of file AlpsSubTreePool.h.

## Constructor & Destructor Documentation

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

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

Definition at line 41 of file AlpsSubTreePool.h.

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

Definition at line 42 of file AlpsSubTreePool.h.

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

## Member Function Documentation

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

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

Query the number of subtrees in the pool.

Implements AlpsKnowledgePool.

Definition at line 49 of file AlpsSubTreePool.h.

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

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

Check whether there is a subtree in the subtree pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 52 of file AlpsSubTreePool.h.

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

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

Get a subtree from subtree pool, doesn't remove it from the pool.

Implements AlpsKnowledgePool.

Definition at line 55 of file AlpsSubTreePool.h.

References AlpsSubTree::getQuality(), subTreeList_, and AlpsPriorityQueue< T >::top().

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

Remove a subtree from the pool.

Reimplemented from AlpsKnowledgePool.

Definition at line 62 of file AlpsSubTreePool.h.

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

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

Add a subtree to the subtree pool.

Implements AlpsKnowledgePool.

Definition at line 67 of file AlpsSubTreePool.h.

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

const AlpsPriorityQueue< AlpsSubTree*>& AlpsSubTreePool::getSubTreeList | ( |  | ) | const`[inline]`

Return the container of subtrees.

Definition at line 74 of file AlpsSubTreePool.h.

References subTreeList_.

void AlpsSubTreePool::setComparison | ( | AlpsSearchStrategy< AlpsSubTree * > & | compare | ) | `[inline]`

Set comparison function and resort heap.

Definition at line 77 of file AlpsSubTreePool.h.

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

Referenced by AlpsKnowledgeBroker::setSubTreeSelection().

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

Delete the subtrees in the pool.

Definition at line 82 of file AlpsSubTreePool.h.

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

Referenced by ~AlpsSubTreePool().

double AlpsSubTreePool::getBestQuality | ( |  | ) | `[inline]`

Get the quality of the best subtree.

Definition at line 90 of file AlpsSubTreePool.h.

References ALPS_OBJ_MAX, AlpsPriorityQueue< T >::getContainer(), and subTreeList_.

## Member Data Documentation

AlpsPriorityQueue<AlpsSubTree*> AlpsSubTreePool::subTreeList_`[private]`

Definition at line 38 of file AlpsSubTreePool.h.

Referenced by addKnowledge(), deleteGuts(), getBestQuality(), getKnowledge(), getNumKnowledges(), getSubTreeList(), hasKnowledge(), popKnowledge(), setComparison(), and ~AlpsSubTreePool().

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

- /home/coin/SVN-release/Alps-1.2.1/Alps/src/AlpsSubTreePool.h