PPL Logo

HeapNode Class Reference

Structure for storing events on a heap. More...

#include <eqheap.h>

Collaboration diagram for HeapNode:

Collaboration graph
[legend]

Public Member Functions

 HeapNode ()
 Basic Constructor.
 HeapNode (Event *ev, int sz, HeapNode *l, HeapNode *r)
 Initializing Constructor.
 ~HeapNode ()
 Destructor.
void insert (Event *e)
 Insert event in heap.
void insertDeterministic (Event *e)
 Insert event in heap deterministically.
HeapNodeconjoin (HeapNode *h)
 Join this heap with h.
int remove (eventID evID, POSE_TimeType timestamp)
 Remove heap node matching evID.
POSE_TimeType findMax ()
 Find maximum element.
void dump ()
 Dump all data fields.
char * dumpString ()
 Dump all data fields to a string.
void pup (PUP::er &p)
 Pack/unpack/sizing operator.
void sanitize ()
 Check validity of data fields.

Data Fields

int subheapsize
 Size of subheap topped by this node.
Evente
 The event stored here.
HeapNodeleft
 Left and right subheaps.
HeapNoderight

Detailed Description

Structure for storing events on a heap.

Definition at line 8 of file eqheap.h.


Constructor & Destructor Documentation

HeapNode::HeapNode (  )  [inline]

Basic Constructor.

Definition at line 18 of file eqheap.h.

Referenced by insert(), and insertDeterministic().

Here is the caller graph for this function:

HeapNode::HeapNode ( Event ev,
int  sz,
HeapNode l,
HeapNode r 
) [inline]

Initializing Constructor.

Definition at line 20 of file eqheap.h.

HeapNode::~HeapNode (  )  [inline]

Destructor.

Definition at line 24 of file eqheap.h.

References e, left, and right.


Member Function Documentation

void HeapNode::insert ( Event e  ) 

Insert event in heap.

Heap structure used for unexecuted portion of the eventQueue.

Insert event e in this subheap; designed to find insertion position quickly, at the cost of creating unbalanced or high & narrow heaps

Insert event in heap

Definition at line 7 of file eqheap.C.

References POSE_Config::deterministic, e, Event::evID, HeapNode(), insert(), insertDeterministic(), left, pose_config, right, sanitize(), subheapsize, and Event::timestamp.

Referenced by insert(), EqHeap::InsertDeterministic(), and EqHeap::InsertEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void HeapNode::insertDeterministic ( Event e  ) 

Insert event in heap deterministically.

Insert event e in this subheap; designed to find insertion position quickly, at the cost of creating unbalanced or high & narrow heaps

Definition at line 56 of file eqheap.C.

References e, Event::evID, HeapNode(), insertDeterministic(), left, right, sanitize(), subheapsize, and Event::timestamp.

Referenced by insert(), and insertDeterministic().

Here is the call graph for this function:

Here is the caller graph for this function:

HeapNode * HeapNode::conjoin ( HeapNode h  ) 

Join this heap with h.

Join this heap with h and return the new heap; uses quickest join method possible at expense of creating unbalanced tree

Definition at line 102 of file eqheap.C.

References conjoin(), POSE_Config::deterministic, e, Event::evID, left, pose_config, right, sanitize(), subheapsize, and Event::timestamp.

Referenced by conjoin(), EqHeap::DeleteEvent(), EqHeap::GetAndRemoveTopEvent(), and remove().

Here is the call graph for this function:

Here is the caller graph for this function:

int HeapNode::remove ( eventID  evID,
POSE_TimeType  timestamp 
)

Remove heap node matching evID.

Definition at line 137 of file eqheap.C.

References conjoin(), e, Event::evID, left, remove(), right, sanitize(), subheapsize, and Event::timestamp.

Referenced by EqHeap::DeleteEvent(), and remove().

Here is the call graph for this function:

Here is the caller graph for this function:

POSE_TimeType HeapNode::findMax (  )  [inline]

Find maximum element.

Definition at line 40 of file eqheap.h.

References e, findMax(), left, max(), POSE_UnsetTS, right, and Event::timestamp.

Referenced by EqHeap::FindMax(), and findMax().

Here is the call graph for this function:

Here is the caller graph for this function:

void HeapNode::dump (  ) 

Dump all data fields.

Dump all data fields in entire subheap.

Definition at line 190 of file eqheap.C.

References dump(), eventID::dump(), e, Event::evID, left, right, and subheapsize.

Referenced by EqHeap::dump(), and dump().

Here is the call graph for this function:

Here is the caller graph for this function:

char * HeapNode::dumpString (  ) 

Dump all data fields to a string.

Dump all data fields in entire subheap.

Definition at line 203 of file eqheap.C.

References dumpString(), e, Event::evID, eventID::getPE(), eventID::id, left, right, snprintf(), subheapsize, and Event::timestamp.

Referenced by dumpString().

Here is the call graph for this function:

Here is the caller graph for this function:

void HeapNode::pup ( PUP::er p  ) 

Pack/unpack/sizing operator.

Packs/sizes the entire heap, DOES NOT UNPACK HEAP!!!

Recursively packs/sizes entire subheap; DOES NOT UNPACK HEAP!!!

Definition at line 230 of file eqheap.C.

References e, PUP::er::isUnpacking(), left, pup(), Event::pup(), and right.

Referenced by EqHeap::pup(), and pup().

Here is the call graph for this function:

Here is the caller graph for this function:

void HeapNode::sanitize (  ) 

Check validity of data fields.

Definition at line 239 of file eqheap.C.

References e, left, right, sanitize(), Event::sanitize(), and subheapsize.

Referenced by conjoin(), insert(), insertDeterministic(), remove(), EqHeap::sanitize(), and sanitize().

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation


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

Generated on Mon Sep 21 08:25:36 2020 for Charm++ by  doxygen 1.5.5