RandomFileStream

Reads randomness from an infinite filestream. In practice this will typically be used to read from system sources of randomness such as (on Posix) /dev/random or /dev/urandom.

The random numbers generated will be unsigned integers of type T in the range [T.min, T.max]. A good source of randomness should ensure these are uniformly distributed.

It is the responsibility of the user to ensure that the specified source of randomness indeed contains sufficient data to serve the requirements of their program.

final
class RandomFileStream (
string filename
T
) if (
isIntegral!T &&
isUnsigned!T
) {}

Constructors

this
this()
Undocumented in source.

Members

Aliases

source
alias source = filename
Undocumented in source.

Functions

front
T front()
popFront
void popFront()

Range primitives

Variables

empty
enum bool empty;

Range primitives

isUniformRandom
enum bool isUniformRandom;
Undocumented in source.
max
enum T max;
Undocumented in source.
min
enum T min;
Undocumented in source.

Meta