extendr_api::prelude::sparse::utils

Function sort_dedup_indices

pub fn sort_dedup_indices<I, E>(
    col_ptrs: &[I],
    nnz_per_col: &mut [I],
    row_indices: &mut [I],
    values: <<E as Entity>::Group as ForType>::FaerOf<&mut [<E as Entity>::Unit]>,
)
where I: Index, E: ComplexField,
Expand description

Sorts and deduplicates row_indices and values simultaneously so that row_indices is nonincreasing and contains no duplicate indices.