RogueSharp
Show / Hide Table of Contents

Namespace RogueSharp.Random

Classes

DotNetRandom

A class implementing IRandom which used for generating pseudo-random numbers using the System.Random class from the .Net framework

GaussianRandom

A class implementing IRandom which uses the Box-Muller transformation to help generate Gaussian pseudo-random numbers

KnownSeriesRandom

A class implementing IRandom which cycles through a specified series of integers each time the Next random number is asked for.

MaxRandom

A class implementing IRandom which always returns the highest possible result

MinRandom

A class implementing IRandom which always returns the lowest possible result

RandomState

A class representing the state of a pseudo-random number generation algorithm at a point in time. This POCO (Plain Old C# Object) can be easily serialized and deserialized

Singleton

The Singleton class is a public static class that holds the DefaultRandom generator.

WeightedPool<T>

A weighted collection from which items of type T can be chosen at random. Although the item is picked at random, weights will be considered. Items with higher weights will be more likely to be picked than items with lower weights.

Interfaces

IRandom

An Interface for pseudo-random number generators to implement. Useful when mocking out systems for tests, as the the random number generator can be swapped for a mock implementation that returns known and expected values

IWeightedPool<T>

An Interface for weighted collections from which items of type T can be chosen at random. Although the item is picked at random, weights will be considered. Items with higher weights will be more likely to be picked than items with lower weights.

RogueSharp © 2014-2020 Faron Bracy
Back to top