/// COO provides the unique capability of mapping indices with an arbitrary function.
/// Remember, entries with duplicate indices in the output will be implicitly summed.
COO provides the unique capability of mapping indices with an arbitrary function.
Remember, entries with duplicate indices in the output will be implicitly summed.
COO provides the unique capability of mapping indices with an arbitrary function . Remember entries with duplicate indices in the output will be implicitly summed .
pub fn map_row_indices<F, R2: Idx>(self, new_dim: usize, f: F) -> RawCoo<T, R2, C>
    where F: FnMut(R) -> R2,
    {
        let RawCoo { dim, val, col, row } = self;
        let row = row.into_iter().map(f).collect();
        RawCoo { dim: (new_dim, dim.1), val, col, row }
    }
pub fn map_row_indices < F , R2 : Idx > ( self , new_dim : usize , f : F ) -> RawCoo < T , R2 , C > where F : FnMut ( R ) -> R2 , { let RawCoo { dim , val , col , row } = self ; let row = row . into_iter ( ) . map ( f ) . collect ( ) ; RawCoo { dim : ( new_dim , dim . 1 ) , val , col , row } }
COO provides the unique capability of mapping indices with an arbitrary function.
COO provides the unique capability of mapping indices with an arbitrary function .
self
new_dim
usize
f
F