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§
Sourcefn to_vector(&self) -> [u64; N]
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.
Sourcefn set_vector(&mut self, v: [u64; N])
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".