#include <heap-scheduler.h>
Public Member Functions | |
virtual void | Insert (const Event &ev) |
virtual bool | IsEmpty (void) const |
virtual Event | PeekNext (void) const |
virtual Event | RemoveNext (void) |
virtual void | Remove (const Event &ev) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::HeapScheduler. |
This code started as a c++ translation of a java-based code written in 2005 to implement a heap sort. So, this binary heap is really a pretty straightforward implementation of the classic data structure. Not much to say about it.
What is smart about this code ?
static TypeId ns3::HeapScheduler::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::HeapScheduler.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Scheduler.
virtual void ns3::HeapScheduler::Insert | ( | const Event & | ev | ) | [virtual] |
virtual bool ns3::HeapScheduler::IsEmpty | ( | void | ) | const [virtual] |
virtual Event ns3::HeapScheduler::PeekNext | ( | void | ) | const [virtual] |
Implements ns3::Scheduler.
virtual void ns3::HeapScheduler::Remove | ( | const Event & | ev | ) | [virtual] |
ev | the event to remove |
Implements ns3::Scheduler.
virtual Event ns3::HeapScheduler::RemoveNext | ( | void | ) | [virtual] |
This method cannot be invoked if the list is empty. Remove the next earliest event from the event list.
Implements ns3::Scheduler.