BWAPI
Public Member Functions
MinHeap< _Tp, _Val > Class Template Reference

#include <MinHeap.h>

List of all members.

Public Member Functions

 MinHeap ()
 MinHeap (std::pair< _Tp, _Val > x)
 ~MinHeap ()
void push (std::pair< _Tp, _Val > x)
void pop ()
const std::pair< _Tp, _Val > & top () const
bool set (_Tp &x, _Val &v)
bool empty () const
int size () const

template<class _Tp, class _Val>
class MinHeap< _Tp, _Val >


Constructor & Destructor Documentation

template<class _Tp , class _Val >
MinHeap< _Tp, _Val >::MinHeap ( ) [inline]
template<class _Tp , class _Val >
MinHeap< _Tp, _Val >::MinHeap ( std::pair< _Tp, _Val >  x)
template<class _Tp , class _Val >
MinHeap< _Tp, _Val >::~MinHeap ( ) [inline]

Member Function Documentation

template<class _Tp , class _Val >
bool MinHeap< _Tp, _Val >::empty ( ) const

Return the given object's value

Parameters:
object
Returns:
value
template<class _Tp , class _Val >
void MinHeap< _Tp, _Val >::pop ( )
template<class _Tp , class _Val >
void MinHeap< _Tp, _Val >::push ( std::pair< _Tp, _Val >  x)

Pushes an (object, value) onto the heap

Parameters:
theobject-value pair to push onto the heap
template<class _Tp , class _Val >
bool MinHeap< _Tp, _Val >::set ( _Tp &  x,
_Val &  v 
)

Update the given object with the given value and moves the object Pushes the object if it doesn't exist

Parameters:
anobject that exists in the heap
thenew value for that object
Returns:
boolean success
template<class _Tp , class _Val >
int MinHeap< _Tp, _Val >::size ( ) const
template<class _Tp , class _Val >
const std::pair< _Tp, _Val > & MinHeap< _Tp, _Val >::top ( ) const

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines