Function sprs_rand::rand_csr [−][src]
pub fn rand_csr<R: ?Sized, N, D, I>(
rng: &mut R,
dist: D,
shape: (usize, usize),
density: f64
) -> CsMatI<N, I> where
R: Rng,
D: Distribution<N>,
N: Copy,
I: SpIndex,
Generate a random sparse matrix matching the given density and sampling the values of its non-zero elements from the provided distribution.