pub fn phase_2_equatorial_edge_permutation_index(&self) -> u16 {
        let mut result = 0;
        for i in 0..3 {
            // Get index in set of remaining options by checking how many of the entries
            // are greater than this one (which is the index in the sorted list of
            // remaining options)
            let mut cur = 0;
            for j in i + 1..4 {
                if self.edges[i + Edge3x3x3::FR as u8 as usize].piece as u8
                    > self.edges[j + Edge3x3x3::FR as u8 as usize].piece as u8
                {
                    cur += 1;
                }
            }
            result = (result + cur) * (3 - i as u16);
        }
        result
    }
/// This index is only valid for phase 2 (equatorial edge pieces are already in the slice
/// but not necessarily in the proper places). Index for the edge permutations is the
/// representation of the state in the factorial number system (each digit in the number
/// decreases in base, with the digits representing the index of the choice in the
/// remaining possible choices).
This index is only valid for phase 2 (equatorial edge pieces are already in the slice
but not necessarily in the proper places). Index for the edge permutations is the
representation of the state in the factorial number system (each digit in the number
decreases in base, with the digits representing the index of the choice in the
remaining possible choices).
This index is only valid for phase 2 ( equatorial edge pieces are already in the slice but not necessarily in the proper places ) . Index for the edge permutations is the representation of the state in the factorial number system ( each digit in the number decreases in base with the digits representing the index of the choice in the remaining possible choices ) .
pub fn phase_2_equatorial_edge_permutation_index(&self) -> u16 {
        let mut result = 0;
        for i in 0..3 {
            // Get index in set of remaining options by checking how many of the entries
            // are greater than this one (which is the index in the sorted list of
            // remaining options)
            let mut cur = 0;
            for j in i + 1..4 {
                if self.edges[i + Edge3x3x3::FR as u8 as usize].piece as u8
                    > self.edges[j + Edge3x3x3::FR as u8 as usize].piece as u8
                {
                    cur += 1;
                }
            }
            result = (result + cur) * (3 - i as u16);
        }
        result
    }
pub fn phase_2_equatorial_edge_permutation_index ( & self ) -> u16 { let mut result = 0 ; for i in 0 .. 3 { // Get index in set of remaining options by checking how many of the entries // are greater than this one (which is the index in the sorted list of // remaining options) let mut cur = 0 ; for j in i + 1 .. 4 { if self . edges [ i + Edge3x3x3 :: FR as u8 as usize ] . piece as u8 > self . edges [ j + Edge3x3x3 :: FR as u8 as usize ] . piece as u8 { cur += 1 ; } } result = ( result + cur ) * ( 3 - i as u16 ) ; } result }
This index is only valid for phase 2 (equatorial edge pieces are already in the slice
but not necessarily in the proper places).
This index is only valid for phase 2 ( equatorial edge pieces are already in the slice but not necessarily in the proper places ) .
&self
&self