pub fn apply_slice<T: Clone, D>(&self, vec: D) -> Vec<T>
    where
        D: Deref<Target = [T]>,
    {
        assert!(vec.len() == self.len());
        match self.inv {
            false => self.apply_slice_fwd(vec),
            true => self.apply_slice_bkwd(vec),
        }
    }
/// Apply a permutation to a slice of elements
///
/// Given a slice of elements, this will permute the elements in place according
/// to this permutation.
///
/// # Examples
///
/// ```
/// # use permutation::Permutation;
/// let permutation = Permutation::from_vec(vec![0,3,1,2]);
/// let vec = vec!['a','b','c','d'];
/// assert!(permutation.apply_slice(&vec[..]) == vec!['a', 'd', 'b', 'c']);
/// ```
Apply a permutation to a slice of elements
Given a slice of elements, this will permute the elements in place according
to this permutation.
Apply a permutation to a slice of elements Given a slice of elements this will permute the elements in place according to this permutation .
pub fn apply_slice<T: Clone, D>(&self, vec: D) -> Vec<T>
    where
        D: Deref<Target = [T]>,
    {
        assert!(vec.len() == self.len());
        match self.inv {
            false => self.apply_slice_fwd(vec),
            true => self.apply_slice_bkwd(vec),
        }
    }
pub fn apply_slice < T : Clone , D > ( & self , vec : D ) -> Vec < T > where D : Deref < Target = [ T ] > , { assert ! ( vec len ( ) self len ( ) ) ; match self . inv { false => self . apply_slice_fwd ( vec ) , true => self . apply_slice_bkwd ( vec ) , } }
Apply a permutation to a slice of elements
Given a slice of elements, this will permute the elements in place according
to this permutation.
Apply a permutation to a slice of elements Given a slice of elements this will permute the elements in place according to this permutation .
&self
vec
D
&self
vec
D
examples
None
use permutation::permutation;
None