A scheduler for atomic models.
Public Methods
-
adevs_sched(int capacity = SCHED_DEFAULT_CAP)
-
Creates a scheduler with the default or specified initial capacity
-
void schedule(atomic* model, ADEVS_TIME_TYPE tN)
-
Add a model to the schedule or change to position of a model already in
the schedule.
-
atomic* getMinimum() const
-
Get the model at the front of the queue.
-
void removeMinimum()
-
Remove the model at the front of the queue
-
ADEVS_TIME_TYPE minPriority() const
-
Returns the smallest time of next event, or ADEVS_INFINITY if
the queue is empty
-
int getSize() const
- Returns the number of items in the queue
-
bool isEmpty() const
- Returns true if the queue is empty, and false otherwise
-
void clear()
- Removes all items from the queue
-
~adevs_sched()
- Destructor
Documentation
A scheduler for atomic models. The scheduler is implemented as a binary
heap. The scheduler requires that the time types be able to support all
of the comparison operations, assignment operators, and copy constructors.
adevs_sched(int capacity = SCHED_DEFAULT_CAP)
-
Creates a scheduler with the default or specified initial capacity
void schedule(atomic* model, ADEVS_TIME_TYPE tN)
-
Add a model to the schedule or change to position of a model already in
the schedule. If the tN is ADEVS_INFINITY, the the item or removed
(if it is already in the queue) or not inserted. Because this method
uses the model's q_index field, it is imperative that a model be
entered into one, and only one, schedule at any time.
atomic* getMinimum() const
-
Get the model at the front of the queue.
Returns NULL if the queue is empty.
void removeMinimum()
-
Remove the model at the front of the queue
ADEVS_TIME_TYPE minPriority() const
-
Returns the smallest time of next event, or ADEVS_INFINITY if
the queue is empty
int getSize() const
- Returns the number of items in the queue
bool isEmpty() const
- Returns true if the queue is empty, and false otherwise
void clear()
- Removes all items from the queue
~adevs_sched()
- Destructor
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.