Click or drag to resize
SD.Tools.Algorithmia.PriorityQueues Namespace
 
Classes
  ClassDescription
Public classBinaryHeapPriorityQueueTElement
Priority queue class based on a binary heap which is set as a max heap, as a priority queue always has the element with the highest value (key) as the first element
Public classPriorityQueueBaseTElement
Base class for all priority queues. A priority queue is a special queue: the elements added to the queue are stored in the order of the priority they have. Grabbing the first element from a queue is therefore grabbing the element with the highest priority. See: http://en.wikipedia.org/wiki/Priority_queue
Public classSimplePriorityQueueTElement
Simple priority queue which uses a simple list for storing the elements. Inserts are very fast, O(1), but lookups are done in linear time, O(n).
Public classSortedPriorityQueueTElement
Simple priority queue which uses a list for storing the elements which is always kept sorted. Inserts can be slow, as worst case inserts (insert at the front) requires a move of all elements, so the order is somewhere around the order of insertion sort, O((n^2)/4). Lookups and removals are very fast: O(1).