Trait rten_tensor::RandomSource

source ·
pub trait RandomSource<T> {
    // Required method
    fn next(&mut self) -> T;
}
Expand description

Trait for sources of random data for tensors, for use with Tensor::rand.

Required Methods§

source

fn next(&mut self) -> T

Generate the next random value.

Implementors§