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

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

# AlpsPriorityQueue< T > Class Template Reference

`#include <AlpsPriorityQueue.h>`

List of all members.

## Public Member Functions
| AlpsPriorityQueue ()
| AlpsPriorityQueue (AlpsSearchStrategy< T > &compare)
const std::vector< T > & | getContainer () const
| Return a const reference to the container.
void | setComparison (AlpsSearchStrategy< T > &c)
| Set comparison function and resort heap.
T | top () const
| Return the top element of the heap.
void | push (T x)
| Add a element to the heap.
void | pop ()
| Remove the top element from the heap.
bool | empty () const
| Return true for an empty vector.
size_t | size () const
| Return the size of the vector.
void | clear ()
| Remove all elements from the vector.
const Container & | getContainer () const
| Return a const reference to the container.
## Private Member Functions
| AlpsPriorityQueue (const AlpsPriorityQueue &)
AlpsPriorityQueue & | operator= (const AlpsPriorityQueue &)
## Private Attributes
std::vector< T > | vec_
AlpsCompare< T > | comparison_

## Detailed Description

### template<class T>
class AlpsPriorityQueue< T >

Definition at line 34 of file AlpsPriorityQueue.h.

## Constructor & Destructor Documentation

template<class T>

AlpsPriorityQueue< T >::AlpsPriorityQueue | ( | const AlpsPriorityQueue< T > & |  | ) | `[private]`

template<class T>

AlpsPriorityQueue< T >::AlpsPriorityQueue | ( |  | ) | `[inline]`

Definition at line 44 of file AlpsPriorityQueue.h.

template<class T>

AlpsPriorityQueue< T >::AlpsPriorityQueue | ( | AlpsSearchStrategy< T > & | compare | ) | `[inline]`

Definition at line 45 of file AlpsPriorityQueue.h.

## Member Function Documentation

template<class T>

AlpsPriorityQueue& AlpsPriorityQueue< T >::operator= | ( | const AlpsPriorityQueue< T > & |  | ) | `[private]`

template<class T>

const std::vector<T>& AlpsPriorityQueue< T >::getContainer | ( |  | ) | const`[inline]`

Return a const reference to the container.

Definition at line 50 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::deleteGuts(), AlpsNodePool::deleteGuts(), AlpsNodePool::getBestKnowledgeValue(), AlpsNodePool::getBestNode(), and AlpsSubTreePool::getBestQuality().

template<class T>

void AlpsPriorityQueue< T >::setComparison | ( | AlpsSearchStrategy< T > & | c | ) | `[inline]`

Set comparison function and resort heap.

Definition at line 53 of file AlpsPriorityQueue.h.

Referenced by AlpsPriorityQueue< AlpsSubTree * >::AlpsPriorityQueue(), AlpsSubTreePool::setComparison(), and AlpsNodePool::setNodeSelection().

template<class T>

T AlpsPriorityQueue< T >::top | ( |  | ) | const`[inline]`

Return the top element of the heap.

Definition at line 59 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::getKnowledge(), and AlpsNodePool::getKnowledge().

template<class T>

void AlpsPriorityQueue< T >::push | ( | T | x | ) | `[inline]`

Add a element to the heap.

Definition at line 62 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::addKnowledge(), and AlpsNodePool::addKnowledge().

template<class T>

void AlpsPriorityQueue< T >::pop | ( |  | ) | `[inline]`

Remove the top element from the heap.

Definition at line 68 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::popKnowledge(), and AlpsNodePool::popKnowledge().

template<class T>

bool AlpsPriorityQueue< T >::empty | ( |  | ) | const`[inline]`

Return true for an empty vector.

Definition at line 74 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::hasKnowledge(), AlpsNodePool::hasKnowledge(), AlpsNodePool::~AlpsNodePool(), and AlpsSubTreePool::~AlpsSubTreePool().

template<class T>

size_t AlpsPriorityQueue< T >::size | ( |  | ) | const`[inline]`

Return the size of the vector.

Definition at line 79 of file AlpsPriorityQueue.h.

Referenced by AlpsSubTreePool::deleteGuts(), AlpsNodePool::deleteGuts(), AlpsSubTreePool::getNumKnowledges(), and AlpsNodePool::getNumKnowledges().

template<class T>

void AlpsPriorityQueue< T >::clear | ( |  | ) | `[inline]`

Remove all elements from the vector.

But not delete them.

Definition at line 84 of file AlpsPriorityQueue.h.

Referenced by AlpsNodePool::clear(), AlpsSubTreePool::deleteGuts(), and AlpsNodePool::deleteGuts().

template<class T>

const Container& AlpsPriorityQueue< T >::getContainer | ( |  | ) | const`[inline]`

Return a const reference to the container.

Definition at line 96 of file AlpsPriorityQueue.h.

## Member Data Documentation

template<class T>

std::vector<T> AlpsPriorityQueue< T >::vec_`[private]`

Definition at line 40 of file AlpsPriorityQueue.h.

Referenced by AlpsPriorityQueue< AlpsSubTree * >::clear(), AlpsPriorityQueue< AlpsSubTree * >::empty(), AlpsPriorityQueue< AlpsSubTree * >::getContainer(), AlpsPriorityQueue< AlpsSubTree * >::pop(), AlpsPriorityQueue< AlpsSubTree * >::push(), AlpsPriorityQueue< AlpsSubTree * >::setComparison(), AlpsPriorityQueue< AlpsSubTree * >::size(), and AlpsPriorityQueue< AlpsSubTree * >::top().

template<class T>

AlpsCompare<T> AlpsPriorityQueue< T >::comparison_`[private]`

Definition at line 41 of file AlpsPriorityQueue.h.

Referenced by AlpsPriorityQueue< AlpsSubTree * >::pop(), AlpsPriorityQueue< AlpsSubTree * >::push(), and AlpsPriorityQueue< AlpsSubTree * >::setComparison().

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

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