pub fn valid(&self) -> bool {
        // sufficient to verify that all indices 0..N are found
        let mut found = vec![false; self.len()];
        for i in self.indices.iter().copied() {
            if i > self.len() {
                return false;
            }
            found[i] = true;
        }
        found.into_iter().all(identity)
    }
/// Check whether a permutation is valid.
///
/// A permutation can be invalid if it was constructed with an
/// incorrect vector using ``::from_vec()``.  Debug assertions will
/// catch this on construction, so it should never return true.
///
Check whether a permutation is valid.
A permutation can be invalid if it was constructed with an
incorrect vector using ``::from_vec()``.  Debug assertions will
catch this on construction, so it should never return true.
Check whether a permutation is valid . A permutation can be invalid if it was constructed with an incorrect vector using ` ` :: from_vec () ` ` . Debug assertions will catch this on construction so it should never return true .
pub fn valid(&self) -> bool {
        // sufficient to verify that all indices 0..N are found
        let mut found = vec![false; self.len()];
        for i in self.indices.iter().copied() {
            if i > self.len() {
                return false;
            }
            found[i] = true;
        }
        found.into_iter().all(identity)
    }
pub fn valid ( & self ) -> bool { // sufficient to verify that all indices 0..N are found let mut found = vec ! [ false self len ( ) ] ; for i in self . indices . iter ( ) . copied ( ) { if i > self . len ( ) { return false ; } found [ i ] = true ; } found . into_iter ( ) . all ( identity ) }
Check whether a permutation is valid.
Check whether a permutation is valid .
&self
&self