pub fn phase_2_edge_permutation_index(&self) -> u16 {
        let mut result = 0;
        for i in 0..7 {
            // 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..8 {
                if self.edges[i].piece as u8 > self.edges[j].piece as u8 {
                    cur += 1;
                }
            }
            result = (result + cur) * (7 - i as u16);
        }
        result
    }
/// 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 is the phase 2 edge permutation index, which does not include the edges
/// in the equatorial slice (significantly reducing the count).
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 is the phase 2 edge permutation index, which does not include the edges
in the equatorial slice (significantly reducing the count).
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 is the phase 2 edge permutation index which does not include the edges in the equatorial slice ( significantly reducing the count ) .
pub fn phase_2_edge_permutation_index(&self) -> u16 {
        let mut result = 0;
        for i in 0..7 {
            // 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..8 {
                if self.edges[i].piece as u8 > self.edges[j].piece as u8 {
                    cur += 1;
                }
            }
            result = (result + cur) * (7 - i as u16);
        }
        result
    }
pub fn phase_2_edge_permutation_index ( & self ) -> u16 { let mut result = 0 ; for i in 0 .. 7 { // 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 .. 8 { if self . edges [ i ] . piece as u8 > self . edges [ j ] . piece as u8 { cur += 1 ; } } result = ( result + cur ) * ( 7 - i as u16 ) ; } result }
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).
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 ) .
&self
&self