Skip to main content

create_sparse_from_triplets

Function create_sparse_from_triplets 

Source
pub fn create_sparse_from_triplets(
    triplets: &[(u64, u64, f32)],
    mtx_shape: (usize, usize, usize),
    backend_file: Option<&str>,
    backend: Option<&SparseIoBackend>,
) -> Result<Box<dyn SparseIo<IndexIter = Vec<usize>>>>
Expand description

Create a sparse backend from a borrowed triplet slice.

Clones the slice internally — prefer create_sparse_from_triplets_owned when you already own the Vec, since that avoids the extra copy.