ns3::rapidnet::HeapRelation Class Reference
[RapidNet Library]

A special type of relation that is similar to a min-heap or a max-heap. More...

#include <heap-relation.h>

Inheritance diagram for ns3::rapidnet::HeapRelation:

Inheritance graph
[legend]
Collaboration diagram for ns3::rapidnet::HeapRelation:

Collaboration graph
[legend]

List of all members.

Public Types

enum  Type
 Type of the heap relation.

Public Member Functions

void SetType (Type type)
 Sets the.
void SetHeapAttribute (string attr)
 Sets the name of the heap attribute.
void SetHeapSize (uint32_t size)
 Sets the heap size.
virtual int Insert (Ptr< Tuple > tuple)
 Inserts a tuple in the relation.

Static Public Member Functions

static Ptr< HeapRelationNew (string name, string heapAttr, Type type, uint32_t size)
 Factory method to create a new heap relation.


Detailed Description

A special type of relation that is similar to a min-heap or a max-heap.

A heap attribute is specified that value of which is compared across all tuples inserted in the relation. And a maximum size is defined and a

See also:
Type, either MIN or MAX is defined. In case of MIN, for example, the relation keeps utmost the maximum size number of tuples with lowest values for the heap Attribute. If more tuples are added, the ones with the highest values are removed before inserting the new one. Similarly, for the MAX type.

Member Function Documentation

static Ptr<HeapRelation> ns3::rapidnet::HeapRelation::New ( string  name,
string  heapAttr,
Type  type,
uint32_t  size 
) [static]

Factory method to create a new heap relation.

Parameters:
name Name of the relation
heapAttr Name of the heap attribute
type Type of the heap, MIN or MAX
size Size of the heap

void ns3::rapidnet::HeapRelation::SetType ( Type  type  ) 

Sets the.

See also:
Type.


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

Generated on Fri Apr 9 15:01:11 2010 for NS-3 by  doxygen 1.5.8