pub trait ApplyPermutationToVector {
type A;
// Required method
fn apply_permutation(
&self,
index_array: ArrayView1<'_, usize>,
mode: VectorPermutationMode,
) -> Array1<Self::A>;
}
Required Associated Types§
Required Methods§
Sourcefn apply_permutation(
&self,
index_array: ArrayView1<'_, usize>,
mode: VectorPermutationMode,
) -> Array1<Self::A>
fn apply_permutation( &self, index_array: ArrayView1<'_, usize>, mode: VectorPermutationMode, ) -> Array1<Self::A>
Apply a permutation to a vector
§Arguments
index_array
: A permutation array. If index_array[i] = j then after permutation the ith element of the permuted vector will contain the jth element of the original vector.mode
: The permutation mode. If the permutation mode isINV
, apply the inverse permutation, otherwise the forward permutation.