CounterpointCollective.UniquePriorityQueue
10.1.124
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package CounterpointCollective.UniquePriorityQueue --version 10.1.124
NuGet\Install-Package CounterpointCollective.UniquePriorityQueue -Version 10.1.124
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CounterpointCollective.UniquePriorityQueue" Version="10.1.124" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CounterpointCollective.UniquePriorityQueue" Version="10.1.124" />
<PackageReference Include="CounterpointCollective.UniquePriorityQueue" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CounterpointCollective.UniquePriorityQueue --version 10.1.124
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CounterpointCollective.UniquePriorityQueue, 10.1.124"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CounterpointCollective.UniquePriorityQueue@10.1.124
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CounterpointCollective.UniquePriorityQueue&version=10.1.124
#tool nuget:?package=CounterpointCollective.UniquePriorityQueue&version=10.1.124
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CounterpointCollective.UniquePriorityQueue
A high-performance priority queue for .NET 10 that guarantees key uniqueness.
- Like a dictionary, you can quickly look up items by key.
- Like a priority queue, you can efficiently retrieve the item with the lowest priority value (min-priority queue).
Features
- Unique keys: Each key can exist only once. Subsequent
Enqueuecalls update the existing entry. - Fast operations: Efficient enqueue, dequeue, priority updates, and lookups.
- Min-priority queue: Lower priority values are returned first.
Getting Started
Prerequisites
Installation
Add the NuGet package to your project:
dotnet add package CounterpointCollective.UniquePriorityQueue
Usage Example:
var queue = new UniquePriorityQueue<string, string, int>();
// Add items (lower priority numbers dequeue first)
queue.Enqueue("a", "First task", 5);
queue.Enqueue("b", "Urgent task", 1);
// Update an existing key
queue.Enqueue("a", "Updated task", 0);
// Peek lowest-priority item
var (key, value, p) = queue.Peek();
// key = "a", p = 0
// Dequeue in ascending priority order
while (queue.TryDequeue(out key, out value, out p))
{
Console.WriteLine($"{key}: {value} (priority {p})");
}
API Highlights
UniquePriorityQueue<TKey, TValue, TPriority>: Main queue type.
Project Structure
UniquePriorityQueue.cs: Core implementation.
License
MIT
Repository
Maintained by CounterpointCollective.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CounterpointCollective.UniquePriorityQueue:
| Package | Downloads |
|---|---|
|
CounterpointCollective.ComposableDataflowBlocks
Composable dataflow blocks for building robust, reusable data processing pipelines in .NET. |
|
|
CounterpointCollective.Dataflow.Composable
Composable dataflow blocks for building robust, reusable data processing pipelines in .NET. |
GitHub repositories
This package is not used by any popular GitHub repositories.