Module genevo::random[][src]

Expand description

The random module defines functions that are used to generate random values for specific purposes.

Structs

A distribution to sample floating point numbers uniformly in the open interval (0, 1), i.e. not including either endpoint.

The WeightedDistribution is used to select values proportional to their weighted values.

Traits

An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.

Helper trait for creating objects using the correct implementation of UniformSampler for the sampling type.

A random number generator that can be explicitly seeded.

Extension trait on slices, providing random mutation and sampling methods.

Functions

Returns a new Prng initialized with the given seed.

Generates two cut points for a slice of given length using the given Prng. The first of the two returned cut points is always smaller than the second one.

Generates two cut points within the given range using the given Prng. The first of the two returned cut points is always smaller than the second one.

Generates a random index into a slice of given length using the given Prng.

Generates a random index in the given range using the given Prng.

Generates n cut points for a slice of given length using the given Prng. The returned cut points are ordered in ascending order.

Generates a random probability between 0 and 1 using the given Prng.

Generates a random seed to initialize the Prng.

Type Definitions

The Prng is the pseudo random number generator used through out this library.

The Seed as used through out this library to seed the Prng.