extendr_api::prelude::perm

Function permute_cols

pub fn permute_cols<I, E>(
    dst: MatMut<'_, E>,
    src: MatRef<'_, E>,
    perm_indices: PermRef<'_, I>,
)
where I: Index, E: ComplexField,
Expand description

Computes a permutation of the columns of the source matrix using the given permutation, and stores the result in the destination matrix.

§Panics

  • Panics if the matrices do not have the same shape.
  • Panics if the size of the permutation doesn’t match the number of columns of the matrices.