Function random
Source pub fn random(
shape: (usize, usize),
density: f64,
) -> SparseResult<CsrMatrix<f64>>
Expand description
Generate a random sparse matrix with given density
§Arguments
shape
- Matrix shape (rows, cols)
density
- Desired density (0.0 to 1.0)
§Returns
- Random sparse matrix in CSR format