ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 


Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Heap Class Reference

#include <heap.h>

List of all members.

Public Member Functions

 Heap (int size=HEAP_DEFAULT_SIZE)
 ~Heap ()
int heap_member (void *elem)
int heap_delete (void *elem)
void * heap_iter_init ()
void * heap_iter ()
void heap_insert (heap_key_t key, void *elem)
void * heap_min ()
void * heap_extract_min ()

Private Member Functions

unsigned int parent (unsigned int i)
unsigned int left (unsigned int i)
unsigned int right (unsigned int i)
void swap (unsigned int i, unsigned int j)
unsigned int KEY_LESS_THAN (heap_key_t k1, heap_secondary_key_t ks1, heap_key_t k2, heap_secondary_key_t ks2)
unsigned int KEY_LESS_OR_EQUAL_THAN (heap_key_t k1, heap_key_t k2)

Private Attributes

Heap::Heap_elemh_elems
unsigned int h_s_key
unsigned int h_size
unsigned int h_maxsize
unsigned int h_iter


Constructor & Destructor Documentation

Heap::Heap int    size = HEAP_DEFAULT_SIZE
 

Heap::~Heap  
 


Member Function Documentation

int Heap::heap_delete void *    elem
 

void * Heap::heap_extract_min  
 

void Heap::heap_insert heap_key_t    key,
void *    elem
 

void* Heap::heap_iter   [inline]
 

void* Heap::heap_iter_init   [inline]
 

int Heap::heap_member void *    elem
 

void* Heap::heap_min   [inline]
 

unsigned int Heap::KEY_LESS_OR_EQUAL_THAN heap_key_t    k1,
heap_key_t    k2
[inline, private]
 

unsigned int Heap::KEY_LESS_THAN heap_key_t    k1,
heap_secondary_key_t    ks1,
heap_key_t    k2,
heap_secondary_key_t    ks2
[inline, private]
 

unsigned int Heap::left unsigned int    i [inline, private]
 

unsigned int Heap::parent unsigned int    i [inline, private]
 

unsigned int Heap::right unsigned int    i [inline, private]
 

void Heap::swap unsigned int    i,
unsigned int    j
[inline, private]
 


Member Data Documentation

struct Heap::Heap_elem * Heap::h_elems [private]
 

unsigned int Heap::h_iter [private]
 

unsigned int Heap::h_maxsize [private]
 

unsigned int Heap::h_s_key [private]
 

unsigned int Heap::h_size [private]
 


The documentation for this class was generated from the following files:
This document is generated by doxygen.