BruSoftware.SlidingWindowRanker
1.0.0
See the version list below for details.
dotnet add package BruSoftware.SlidingWindowRanker --version 1.0.0
NuGet\Install-Package BruSoftware.SlidingWindowRanker -Version 1.0.0
<PackageReference Include="BruSoftware.SlidingWindowRanker" Version="1.0.0" />
paket add BruSoftware.SlidingWindowRanker --version 1.0.0
#r "nuget: BruSoftware.SlidingWindowRanker, 1.0.0"
// Install BruSoftware.SlidingWindowRanker as a Cake Addin #addin nuget:?package=BruSoftware.SlidingWindowRanker&version=1.0.0 // Install BruSoftware.SlidingWindowRanker as a Cake Tool #tool nuget:?package=BruSoftware.SlidingWindowRanker&version=1.0.0
Sliding Window Ranker
Sliding Window Ranker is a C# library that provides efficient algorithms for ranking elements within a sliding window over a sequence of data. This can be useful for various applications such as real-time data analysis, signal processing, and more.
Features
- Support high-performance ranking of a generic List of values in a window of size N where a new value is added to the right side of the window and the oldest one is removed from the left side of the window.
- The window size defaults to the count of the initial values provided to the constructor, but can be smaller, even zero, if fewer values are available.
- The number of partitions K defaults to the square root of the window size (which is usually close to optimal) but can be specified if desired.
- By removing earlier data, ranking is no longer against "stale" data. But specifying a window size of int.MaxValue causes earlier values to never drop off.
- The fraction returned is the Cumulative Distribution Function (CDF) value for the specified value except that CDF is normally defined as LESS THAN OR EQUAL rather than LESS THAN. So, the values returned will be in the range ([0, 1] NOT inclusive of 1) rather than [0, 1] inclusive.
- The fraction returned can be multiplied by 10 to get a decile rank or by 100 to get a percentile rank.
Usage
Here's a simple example of how to use Sliding Window Ranker:
var ranker = new SlidingWindowRanker<double>(initialValues); var rank = ranker.GetRank(value);
Contributing
We welcome contributions to Sliding Window Ranker! If you have an idea for a new feature or have found a bug, please open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
For any questions or inquiries, please contact us at brubaker.dale@gmail.com.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.