Click or drag to resize
Accord.NET (logo)

PriorityQueueT Methods

The PriorityQueueT generic type exposes the following members.

Methods
  NameDescription
Public methodClear
Removes every node from the queue. This is an O(1) operation.
Public methodContains
Returns whether the given node is in the queue. This is an O(1) operation.
Public methodDequeue
Removes the head of the queue (node with minimum priority; ties are broken by order of insertion), and returns it. This is an O(log n) operation.
Public methodEnqueue
Enqueue a node to the priority queue. Lower values are placed in front. Ties are broken by first-in-first-out. This is an O(log n) operation.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the collection.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsValidQueue
Checks to make sure the queue is still in a valid state.
Public methodRemove
Removes a node from the queue. The node does not need to be the head of the queue. This is an O(log n) operation.
Public methodResize
Resize the queue so it can accept more nodes. All currently enqueued nodes are kept. Attempting to decrease the queue size to a size too small to hold the existing nodes results in undefined behavior. This is an O(n) operation.
Public methodToArray
Returns an array containing the items in this list, optionally in in priority order.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodUpdatePriority
This method must be called on a node every time its priority changes while it is in the queue. Forgetting to call this method will result in a corrupted queue!. This is an O(log n) operation.
Top
Extension Methods
  NameDescription
Public Extension MethodHasMethod
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.)
Public Extension MethodIsEqual
Compares two objects for equality, performing an elementwise comparison if the elements are vectors or matrices.
(Defined by Matrix.)
Public Extension MethodSetEqualsPriorityQueueNodeT
Compares two enumerables for set equality. Two enumerables are set equal if they contain the same elements, but not necessarily in the same order.
(Defined by Matrix.)
Public Extension MethodTo(Type)Overloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Public Extension MethodToTOverloaded.
Converts an object into another type, irrespective of whether the conversion can be done at compile time or not. This can be used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.)
Top
See Also