IntRandom

Trait IntRandom 

Source
pub trait IntRandom {
    // Required method
    fn random() -> Self;
}
Expand description

Trait for integer random number generation.

Generates a Vector, RowVector, or Matrix filled with random integers uniformly across all values of the integer type.

§Example

use ferrix::IntRandom;
use ferrix::Vector;

let a = Vector::<i32, 3>::random();

Required Methods§

Source

fn random() -> Self

Will generate random integers uniformly across all values of the type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: PrimInt, const N: usize> IntRandom for RowVector<T, N>

Source§

impl<T: PrimInt, const N: usize> IntRandom for Vector<T, N>

Source§

impl<T: PrimInt, const R: usize, const C: usize> IntRandom for Matrix<T, R, C>