Skip to main content

permute_matrix

Function permute_matrix 

Source
pub fn permute_matrix<F>(
    a: &CsrMatrix<F>,
    perm: &[usize],
    inv_perm: &[usize],
) -> SparseResult<CsrMatrix<F>>
where F: Float + NumAssign + Sum + SparseElement + Debug + 'static,
Expand description

Apply a permutation to a sparse matrix: P * A * P^T.

This reorders both rows and columns using the given permutation vector where perm[new_i] = old_i.