Skip to main content

LinearGenerator

Trait LinearGenerator 

Source
pub trait LinearGenerator<const N: usize>: Copy {
    // Required methods
    fn step(&mut self);
    fn to_vector(&self) -> [u64; N];
    fn set_vector(&mut self, v: [u64; N]);
}
Expand description

A linear generator whose state is represented by N words.

Required Methods§

Source

fn step(&mut self)

Advances the state by one step.

Source

fn to_vector(&self) -> [u64; N]

Returns the state.

The representation must be canonical: generators using a rotating index into an array must rotate the array so that the index is zero.

Source

fn set_vector(&mut self, v: [u64; N])

Sets the state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§