PriorityQueueT Class |
Namespace: Accord.Collections
The PriorityQueueT type exposes the following members.
Name | Description | |
---|---|---|
PriorityQueueT |
Initializes a new instance of the PriorityQueueT class.
|
Name | Description | |
---|---|---|
Capacity |
Gets the current capacity of this queue.
| |
Count |
Gets the number of nodes in the queue. This is an O(1) operation.
| |
First |
Returns the head of the queue, without removing it (use Dequeue() for that).
If the queue is empty, behavior is undefined. This is an O(1) operation.
| |
IsReadOnly |
Gets a value indicating whether this instance is read only (returns false).
| |
Order |
Gets or sets the ordering of this priority queue.
|
Name | Description | |
---|---|---|
Clear |
Removes every node from the queue. This is an O(1) operation.
| |
Contains |
Returns whether the given node is in the queue. This is an O(1) operation.
| |
Dequeue |
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.
| |
Enqueue |
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.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetEnumerator |
Returns an enumerator that iterates through the collection.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsValidQueue |
Checks to make sure the queue is still in a valid state.
| |
Remove |
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.
| |
Resize |
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.
| |
ToArray |
Returns an array containing the items in this list,
optionally in in priority order.
| |
ToString |
Returns a String that represents this instance.
(Overrides ObjectToString.) | |
UpdatePriority |
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.
|
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
SetEqualsPriorityQueueNodeT |
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.) | |
To(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.) | |
ToT | 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.) |
The MIT License (MIT) Copyright (c) 2013 Daniel "BlueRaja" Pflughoeft https://github.com/BlueRaja/High-Speed-Priority-Queue-for-C-Sharp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.