PermuteInPlace

Trait PermuteInPlace 

Source
pub trait PermuteInPlace {
    // Required method
    fn permute_in_place(&mut self, indices: &[usize], seen: &mut [bool]);
}

Required Methods§

Source

fn permute_in_place(&mut self, indices: &[usize], seen: &mut [bool])

Implementations on Foreign Types§

Source§

impl<T> PermuteInPlace for &mut [T]

Source§

fn permute_in_place(&mut self, permutation: &[usize], seen: &mut [bool])

Permute this slice according to the given permutation. The given permutation must have length equal to this slice. The slice seen is provided to keep track of which elements have already been seen. seen is assumed to be initialized to false and have length equal or larger than this slice.

Source§

impl<T> PermuteInPlace for Vec<T>

Source§

fn permute_in_place(&mut self, permutation: &[usize], seen: &mut [bool])

Permute this collection according to the given permutation. The given permutation must have length equal to this collection. The slice seen is provided to keep track of which elements have already been seen. seen is assumed to be initialized to false and have length equal or larger than this collection.

Implementors§

Source§

impl<S: Dummy, N: Unsigned + Default> PermuteInPlace for UniChunked<S, U<N>>

Source§

impl<S: PermuteInPlace, T, I: PermuteInPlace> PermuteInPlace for Sparse<S, T, I>

Source§

impl<S: Set + SwapChunks> PermuteInPlace for ChunkedN<S>

This is a more general implementation of permute in place that is also used for slices.