Torque2D Reference
Loading...
Searching...
No Matches
Heap< T > Class Template Reference

#include <vectorHeap.h>

Inheritance diagram for Heap< T >:

Public Member Functions

 Heap (U32 size, S32(*p_compare)(T, T))
void enqueue (T element)
void dequeue ()
T & item ()
void walk_up (U32 index)
void walk_down (U32 index)
Public Member Functions inherited from Vector< T >
 Vector (const U32 initialSize=0)
 Vector (const U32 initialSize, const char *fileName, const U32 lineNum)
 Vector (const char *fileName, const U32 lineNum)
 Vector (const Vector &)
 ~Vector ()
void setFileAssociation (const char *file, const U32 line)
Vector< T > & operator= (const Vector< T > &p)
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
S32 size () const
bool empty () const
bool contains (const T &) const
void insert (iterator, const T &)
void erase (iterator)
T & front ()
const T & front () const
T & back ()
const T & back () const
void push_front (const T &)
void push_back (const T &)
U32 push_front_unique (const T &)
U32 push_back_unique (const T &)
S32 find_next (const T &, U32 start=0) const
void pop_front ()
void pop_back ()
T & operator[] (U32)
const T & operator[] (U32) const
T & operator[] (S32 i)
const T & operator[] (S32 i) const
T & at (U32)
const T & at (U32) const
void reserve (U32)
U32 capacity () const
U32 memSize () const
T * address () const
U32 setSize (U32)
void increment (U32=1)
void increment (const T *array, U32=1)
void decrement (U32=1)
void insert (U32)
void erase (U32)
void erase_fast (U32)
void erase_fast (iterator)
void clear ()
void compact ()
void sort (compare_func f)
T & first ()
T & last ()
const T & first () const
const T & last () const
void set (void *addr, U32 sz)
void merge (const Vector &p)

Public Attributes

S32(* m_compare )(T, T)

Additional Inherited Members

typedef T value_type
typedef T & reference
typedef const T & const_reference
typedef T * iterator
typedef const T * const_iterator
typedef S32 difference_type
typedef U32 size_type
typedef difference_type(QSORT_CALLBACK * compare_func) (const T *a, const T *b)
Protected Member Functions inherited from Vector< T >
bool resize (U32)
void destroy (U32 start, U32 end)
 Destructs elements from start to end-1.
void construct (U32 start, U32 end)
 Constructs elements from start to end-1.
void construct (U32 start, U32 end, const T *array)
Protected Attributes inherited from Vector< T >
U32 mElementCount
U32 mArraySize
T * mArray
const char * mFileAssociation
U32 mLineAssociation

Constructor & Destructor Documentation

◆ Heap()

template<class T>
Heap ( U32 size,
S32(* p_compare )(T, T) )
inline

Member Function Documentation

◆ dequeue()

template<class T>
void dequeue ( )
inline

◆ enqueue()

template<class T>
void enqueue ( T element)
inline

◆ item()

template<class T>
T & item ( )
inline

◆ walk_down()

template<class T>
void walk_down ( U32 index)
inline

◆ walk_up()

template<class T>
void walk_up ( U32 index)
inline

Member Data Documentation

◆ m_compare

template<class T>
S32(* m_compare) (T, T)

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