RangePermute 1.0.0
See the version list below for details.
dotnet add package RangePermute --version 1.0.0
NuGet\Install-Package RangePermute -Version 1.0.0
<PackageReference Include="RangePermute" Version="1.0.0" />
paket add RangePermute --version 1.0.0
#r "nuget: RangePermute, 1.0.0"
// Install RangePermute as a Cake Addin #addin nuget:?package=RangePermute&version=1.0.0 // Install RangePermute as a Cake Tool #tool nuget:?package=RangePermute&version=1.0.0
RangePermute
Memory efficient psuedo-randomly permuted enumerator for C#/.NET to enumerate gigantic ranges.
Say you want to generate a random permutation of numbers in range [0-2^50), without duplicates. Naive approach to get decent pseudo-random permutations would need prohibitively large amount of memory. This library can generate such enumerations using constant memory, and is suitable for Linq-style consumption.
With UInt64, currently we can support 2^64. Can easily be modified to support range up-to 2^128. Internals are 128-bit already.
using RangePermute;
...
foreach(var idx in RangeEnumerable.Range(100000000))
{
// do something with idx
// idx will be between 0 (inclusive) and 100000000 (exlusive)
...
}
Relevant reading:
- Luby, Michael, and Charles Rackoff. "How to Construct Pseudorandom Permutations from Pseudorandom Functions." SIAM Journal on Computing, vol. 17, no. 2, 1988, pp. 373–386.
- Black, John, and Phillip Rogaway. "Ciphers with Arbitrary Finite Domains." The Cryptographers Track at the Rsa Conference, 2002. [http://web.cs.ucdavis.edu/~rogaway/papers/subset.pdf]
Credits
Pretty much a C# port of https://pypi.python.org/pypi/shuffled/ .
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 was computed. 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. |
.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 was computed. |
.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.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
First release.