\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.8.1 - Kinetic Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Kinetic::EventQueue Concept Reference

Definition

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.

Has Models:

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.
 
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.
 

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.
 
template<class Event >
void set (Key, Event)
 Change the data in the event referred to by the key.
 
template<class Event >
Event & get (Key) const
 Access the event referred to by the passed key.
 
Priority priority (Key) const
 Return the priority of the event.
 
bool empty ()
 Return true if the queue is empty.
 
Priority next_priority () const
 Return the priority of the next event in the queue.
 
void process_next ()
 Process the next Event by calling its process method with its Priority.
 
void set_end_priority ()
 Set the priority beyond which to ignore events.
 
bool contains (Key) const
 Return true if the queue contains the event and false if it does not. More...
 

Member Typedef Documentation

The priority type for items in the queue.

This is typically the same as Kinetic::Simulator::Time

Member Function Documentation

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.

template<class Event >
Key Kinetic::EventQueue::insert ( Priority  ,
Event   
)

Insert an event into the event queue.

A Key which can be used to manipulated the event is returned.