Skip to content

Tavenem/Randomize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build NuGet downloads

Tavenem.Randomize

Tavenem.Randomize provides pseudo-random number generation in various distributions.

For example, to print a single value from a normal distribution:

Console.WriteLine(Randomizer.Instance.NormalDistributionSample());

To print 10,000 values:

foreach (var value in Randomizer.Instance.NormalDistributionSamples(10000))
{
    Console.WriteLine(value);
}

Supported distributions:

Tavenem.Randomize utilizes a Mersenne Twister by default, but also provides a mechanism for replacing the underlying generator with your own, provided it implements the library's IGenerator interface.

The library also provides a serializable RandomParameters struct, which can be used to persist or transport the parameters used to obtain a random value.

Tavenem.Randomize also provides a Rehydrator class that allows a deterministic set of random values to be recreated from the same seed, even if those values are requested out of order.

Installation

Tavenem.Randomize is available as a NuGet package.

Roadmap

Tavenem.Randomize is a relatively stable library. Although additions and bugfixes are possible at any time, release should generally be expected to folow the .NET release cycle, with one or more preview releases during a framework preview, and a new stable release coinciding with the release of a new .NET framework major version.

Contributing

Contributions are always welcome. Please carefully read the contributing document to learn more before submitting issues or pull requests.

Code of conduct

Please read the code of conduct before engaging with our community, including but not limited to submitting or replying to an issue or pull request.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages