CGAL 4.4 - Kinetic Framework
|
The concept for priority queues used by the Simulator
. The concept basically defines a priority queue which supports deletions and changes of items in the queue (but not their priorities). Items in the queue must implement the Event
concept.
CGAL::Kinetic::Two_list_pointer_event_queue<FunctionKernel>
CGAL::Kinetic::Heap_pointer_event_queue<FunctionKernel>
Types | |
typedef unspecified_type | Key |
The type used to access items in the queue in order to change or delete them. More... | |
typedef unspecified_type | Priority |
The priority type for items in the queue. More... | |
Creation | |
EventQueue (Priority start, Priority end, int size_hint) | |
Construct a queue which will start at time start and run until time end. More... | |
Operations | |
template<class Event > | |
Key | insert (Priority, Event) |
Insert an event into the event queue. More... | |
void | erase (Key) |
Erase an event from the queue. More... | |
template<class Event > | |
void | set (Key, Event) |
Change the data in the event referred to by the key. More... | |
template<class Event > | |
Event & | get (Key) const |
Access the event referred to by the passed key. More... | |
Priority | priority (Key) const |
Return the priority of the event. More... | |
bool | empty () |
Return true if the queue is empty. More... | |
Priority | next_priority () const |
Return the priority of the next event in the queue. More... | |
void | process_next () |
Process the next Event by calling its process method with its Priority . More... | |
void | set_end_priority () |
Set the priority beyond which to ignore events. More... | |
bool | contains (Key) const |
Return true if the queue contains the event and false if it does not. More... | |
The type used to access items in the queue in order to change or delete them.
The priority type for items in the queue.
This is typically the same as Kinetic::Simulator::Time
Construct a queue which will start at time start and run until time end.
bool Kinetic::EventQueue::contains | ( | Key | ) | const |
Return true if the queue contains the event and false if it does not.
This is used for auditing events and can be slow if needed.
bool Kinetic::EventQueue::empty | ( | ) |
Return true if the queue is empty.
void Kinetic::EventQueue::erase | ( | Key | ) |
Erase an event from the queue.
Event& Kinetic::EventQueue::get | ( | Key | ) | const |
Access the event referred to by the passed key.
Insert an event into the event queue.
A Key
which can be used to manipulated the event is returned.
Priority Kinetic::EventQueue::next_priority | ( | ) | const |
Return the priority of the next event in the queue.
void Kinetic::EventQueue::process_next | ( | ) |
Process the next Event
by calling its process method with its Priority
.
void Kinetic::EventQueue::set | ( | Key | , |
Event | |||
) |
Change the data in the event referred to by the key.
void Kinetic::EventQueue::set_end_priority | ( | ) |
Set the priority beyond which to ignore events.