Click or drag to resize

PriorityQueue<T> Class

Represents a queue of items to which priority can be assigned.
Inheritance Hierarchy
System.Object
  GSF.Collections.PriorityQueue<T>

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.230-beta+03417d7b5cff037b24e882d7adef82d359b34964
Syntax
public class PriorityQueue<T> : IList<T>, 
	ICollection<T>, IEnumerable<T>, IEnumerable
View Source

Type Parameters

T
The type of the items stored in the queue.

The PriorityQueue<T> type exposes the following members.

Constructors
 NameDescription
Public methodPriorityQueue<T>() Creates a new instance of the PriorityQueue<T> class.
Public methodPriorityQueue<T>(Int32) Creates a new instance of the PriorityQueue<T> class.
Top
Properties
 NameDescription
Public propertyCount Gets the number of elements contained in the PriorityQueue<T>.
Public propertyHead Gets the head of the queue. The value returned is the same as the Peek() method.
Public propertyIsReadOnly Gets a value indicating whether the PriorityQueue<T> is read-only.
Public propertyItem Gets or sets the element at the specified index.
Top
Methods
 NameDescription
Public methodAdjustPriority Adds the given value to the priority of all values in the priority queue.
Public methodClear Removes all items from the PriorityQueue<T>.
Public methodContains Determines whether the PriorityQueue<T> contains a specific value.
Public methodCopyTo Copies the elements of the PriorityQueue<T> to an Array, starting at a particular Array index.
Public methodDequeue Gets the item with the highest priority and removes it from the queue.
Public methodEnqueue Enqueues an item into the queue.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetEnumerator Returns an enumerator that iterates through the collection.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetPriority Gets the priority of the item at the given index.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIndexOf Determines the index of a specific item in the PriorityQueue<T>.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodPeek Gets the item with the highest priority.
Public methodRemove Removes the first occurrence of a specific object from the PriorityQueue<T>.
Public methodRemoveAt Removes the PriorityQueue<T> item at the specified index.
Public methodSetPriority Sets the priority of the item at the given index.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodAddRange<T> Adds the specified items to the collection.
(Defined by CollectionExtensions)
Public Extension MethodAllParallel<T> Determines whether all elements of a sequence satisfy a condition with each item being tested in parallel.
(Defined by CollectionExtensions)
Public Extension MethodDistinctBy<T, TKey> Returns only the elements whose keys are distinct.
(Defined by CollectionExtensions)
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefault<T> Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetRange<T> Returns elements in the specified range from the collection.
(Defined by CollectionExtensions)
Public Extension MethodIndexOf<T> Returns the index of the first element of the sequence that satisfies a condition or -1 if no such element is found.
(Defined by CollectionExtensions)
Public Extension MethodLoadDelimitedString<T>Appends items parsed from delimited string, created with ToDelimitedString, using the default delimiter ("|") into the given list.
(Defined by CollectionExtensions)
Public Extension MethodLoadDelimitedString<T>Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
(Defined by CollectionExtensions)
Public Extension MethodLoadDelimitedString<T>Appends items parsed from delimited string, created with ToDelimitedString, into the given list.
(Defined by CollectionExtensions)
Public Extension MethodMajority<T> Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajority<T> Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityBy<T, TKey> Returns the majority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMajorityBy<T, TKey> Returns the majority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMax<T>Returns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMax<T>Returns the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMaxBy<T, TKey>Selects the largest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMedian<T> Gets the median item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMiddle<T> Gets the middle item(s) from an enumeration, i.e., one return item for odd lengths, two for even lengths.
(Defined by CollectionExtensions)
Public Extension MethodMin<T>Returns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMin<T>Returns the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinBy<T, TKey>Selects the smallest item from the enumeration.
(Defined by CollectionExtensions)
Public Extension MethodMinority<T> Returns the minority value in the collection, or default type value if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinority<T> Returns the minority value in the collection, or defaultValue if no item represents the minority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityBy<T, TKey> Returns the minority value in the collection, or default type value if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodMinorityBy<T, TKey> Returns the minority value in the collection, or defaultValue if no item represents the majority.
(Defined by CollectionExtensions)
Public Extension MethodScramble<T> Rearranges all the elements in the list into a highly-random order.
(Defined by CollectionExtensions)
Public Extension MethodScramble<T> Rearranges all the elements in the list into a repeatable pseudo-random order.
(Defined by CollectionExtensions)
Public Extension MethodStandardDeviation<T> Computes the standard deviation over a sequence of Double values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviation<T> Computes the standard deviation over a sequence of Decimal values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodStandardDeviation<T> Computes the standard deviation over a sequence of Single values.
(Defined by NumericalAnalysisExtensions)
Public Extension MethodToDelimitedString<T>Converts an enumeration to a string, using the default delimiter ("|") that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedString<T>Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToDelimitedString<T>Converts an enumeration to a string that can later be converted back to a list using LoadDelimitedString.
(Defined by CollectionExtensions)
Public Extension MethodToPagedList<T> Gets a PagedList<T> to paginate source enumeration for a given page and specified pageSize.
(Defined by CollectionExtensions)
Public Extension MethodUnscramble<T> Rearranges all the elements in the list previously scrambled with Scramble<TSource> (IList<TSource> , Int32) back into their original order.
(Defined by CollectionExtensions)
Public Extension MethodUpdateRange<T> Updates collection starting at the index with the specified items.
(Defined by CollectionExtensions)
Top
See Also