Struct metaheuristics_nature::utility::Rng[][src]

pub struct Rng { /* fields omitted */ }
Expand description

An uniformed random number generator.

This generator doesn’t require mutability, because the state is saved as atomic values.

Implementations

Create generator by a given seed. If none, create the seed from CPU random function.

Seed of this generator.

Generate a random values between 0..1 (exclusive).

Generate a random boolean by positive (true) factor.

Generate a random floating point value by range.

Generate a random integer value by range.

Generate (fill) a random vector.

The start position of the vector can be set.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.