Trait ApplyPermutationToVector

Source
pub trait ApplyPermutationToVector {
    type A;

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

Required Associated Types§

Source

type A

Required Methods§

Source

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 is INV, apply the inverse permutation, otherwise the forward permutation.

Implementations on Foreign Types§

Source§

impl<A, S> ApplyPermutationToVector for ArrayBase<S, Ix1>
where A: Scalar, S: Data<Elem = A>,

Source§

type A = A

Source§

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

Implementors§