extendr_api::prelude::sparse::utils

Function permute_hermitian

pub fn permute_hermitian<'out, I, E>(
    new_values: <<E as Entity>::Group as ForType>::FaerOf<&'out mut [<E as Entity>::Unit]>,
    new_col_ptrs: &'out mut [I],
    new_row_indices: &'out mut [I],
    A: SparseColMatRef<'_, I, E>,
    perm: PermRef<'_, I>,
    in_side: Side,
    out_side: Side,
    stack: PodStack<'_>,
) -> SparseColMatMut<'out, I, E>
where I: Index, E: ComplexField,
Expand description

Computes the self-adjoint permutation $P A P^\top$ of the matrix A and returns a view over it.

The result is stored in new_col_ptrs, new_row_indices.

ยงNote

Allows unsorted matrices, producing a sorted output. Duplicate entries are kept, however.