ReconArt.PriorityQueue
1.0.3
Prefix Reserved
dotnet add package ReconArt.PriorityQueue --version 1.0.3
NuGet\Install-Package ReconArt.PriorityQueue -Version 1.0.3
<PackageReference Include="ReconArt.PriorityQueue" Version="1.0.3" />
paket add ReconArt.PriorityQueue --version 1.0.3
#r "nuget: ReconArt.PriorityQueue, 1.0.3"
// Install ReconArt.PriorityQueue as a Cake Addin #addin nuget:?package=ReconArt.PriorityQueue&version=1.0.3 // Install ReconArt.PriorityQueue as a Cake Tool #tool nuget:?package=ReconArt.PriorityQueue&version=1.0.3
ReconArt.PriorityQueue
Overview
ReconArt.PriorityQueue
is a .NET library that provides a fast and efficient implementation of a priority queue with constant time complexity for all operations. It supports only 6 priorities, making it suitable for scenarios where a limited number of priority levels are sufficient.
Features
- Constant time complexity for all operations
- Supports 6 priority levels
- Simple API for enqueueing, dequeueing, and removing elements
- Designed for scenarios where a limited number of priority levels are sufficient
- Supports .NET 8.0 and .NET 9.0
Installation
To install the ReconArt.PriorityQueue
package, use the NuGet Package Manager or the Package Manager Console with the following command:
Install-Package ReconArt.PriorityQueue
Usage
Creating a Priority Queue
You can create a priority queue and add elements with specified priorities:
var priorityQueue = new PriorityQueue<string>();
// Enqueue elements with priorities (0 to 5, where 0 is the highest priority)
priorityQueue.Enqueue("High Priority Task", 0);
priorityQueue.Enqueue("Medium Priority Task", 2);
priorityQueue.Enqueue("Low Priority Task", 5);
Dequeueing Elements
Dequeue elements from the priority queue, which removes and returns the element with the highest priority:
var task = priorityQueue.Dequeue();
// task will be "High Priority Task"
Peeking at the Next Element
Peek at the next element without removing it:
var nextTask = priorityQueue.Peek();
Removing Specific Elements
Remove a specific element by its node and priority:
var node = priorityQueue.Enqueue("Specific Task", 3);
bool removed = priorityQueue.TryRemove(node, 3);
Limitations
- The priority queue is not thread-safe.
- Supports only 6 priority levels (0 to 5).
Contributing
If you'd like to contribute to the project, please reach out to the ReconArt/priority-queue team.
Support
If you encounter any issues or require assistance, please file an issue in the GitHub Issues section of the repository.
License
Copyright © ReconArt, Inc. 2008-2024. All rights reserved.
Authors and Acknowledgments
Developed by ReconArt, Inc..
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ReconArt.PriorityQueue:
Package | Downloads |
---|---|
ReconArt.Synchronization.UnitDistributorSlim
Allows multi-threaded access to a shared resource with a limited supply by distributing that supply fairly. Supports priority-based distribution. |
GitHub repositories
This package is not used by any popular GitHub repositories.