Trait ApplyPermutationToMatrix

Source
pub trait ApplyPermutationToMatrix {
    type A;

    // Required method
    fn apply_permutation(
        &self,
        index_array: ArrayView1<'_, usize>,
        mode: MatrixPermutationMode,
    ) -> Array2<Self::A>;
}

Required Associated Types§

Source

type A

Required Methods§

Source

fn apply_permutation( &self, index_array: ArrayView1<'_, usize>, mode: MatrixPermutationMode, ) -> Array2<Self::A>

Apply a permutation to rows or columns of a matrix

§Arguments
  • index_array : A permutation array. If index_array[i] = j then after permutation the ith row/column of the permuted matrix will contain the jth row/column of the original matrix.
  • mode : The permutation mode. If the permutation mode is ROW or COL then permute the rows/columns of the matrix. If the permutation mode is ROWINV or COLINV then apply the inverse permutation to the rows/columns.

Implementations on Foreign Types§

Source§

impl<A, S> ApplyPermutationToMatrix for ArrayBase<S, Ix2>
where A: Scalar, S: Data<Elem = A>,

Source§

type A = A

Source§

fn apply_permutation( &self, index_array: ArrayView1<'_, usize>, mode: MatrixPermutationMode, ) -> Array2<Self::A>

Implementors§