pub trait PermuteInPlace {
// Required method
fn permute_in_place(&mut self, indices: &[usize], seen: &mut [bool]);
}Required Methods§
fn permute_in_place(&mut self, indices: &[usize], seen: &mut [bool])
Implementations on Foreign Types§
Source§impl<T> PermuteInPlace for &mut [T]
impl<T> PermuteInPlace for &mut [T]
Source§fn permute_in_place(&mut self, permutation: &[usize], seen: &mut [bool])
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>
impl<T> PermuteInPlace for Vec<T>
Source§fn permute_in_place(&mut self, permutation: &[usize], seen: &mut [bool])
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§
impl<S: Dummy, N: Unsigned + Default> PermuteInPlace for UniChunked<S, U<N>>where
ChunkedN<S>: PermuteInPlace,
impl<S: PermuteInPlace, T, I: PermuteInPlace> PermuteInPlace for Sparse<S, T, I>
impl<S: Set + SwapChunks> PermuteInPlace for ChunkedN<S>
This is a more general implementation of permute in place that is also used for slices.