pub fn count_patterns(&self) -> i32 {
        let rh = &self.run_history;
        let n = rh[1];
        debug_assert!(n <= self.qr_size * 3);
        let core = n > 0 && rh[2] == n && rh[3] == n * 3 && rh[4] == n && rh[5] == n;
        i32::from(core && rh[0] >= n * 4 && rh[6] >= n)
            + i32::from(core && rh[6] >= n * 4 && rh[0] >= n)
    }
// Can only be called immediately after a light run is added, and returns either 0, 1, or 2.
Can only be called immediately after a light run is added, and returns either 0, 1, or 2.
Can only be called immediately after a light run is added and returns either 0 1 or 2 .
pub fn count_patterns(&self) -> i32 {
        let rh = &self.run_history;
        let n = rh[1];
        debug_assert!(n <= self.qr_size * 3);
        let core = n > 0 && rh[2] == n && rh[3] == n * 3 && rh[4] == n && rh[5] == n;
        i32::from(core && rh[0] >= n * 4 && rh[6] >= n)
            + i32::from(core && rh[6] >= n * 4 && rh[0] >= n)
    }
pub fn count_patterns ( & self ) -> i32 { let rh = & self . run_history ; let n = rh [ 1 ] ; debug_assert ! ( n self qr_size 3 ) ; let core = n > 0 && rh [ 2 ] == n && rh [ 3 ] == n * 3 && rh [ 4 ] == n && rh [ 5 ] == n ; i32 :: from ( core && rh [ 0 ] >= n * 4 && rh [ 6 ] >= n ) + i32 :: from ( core && rh [ 6 ] >= n * 4 && rh [ 0 ] >= n ) }
Can only be called immediately after a light run is added, and returns either 0, 1, or 2.
Can only be called immediately after a light run is added and returns either 0 1 or 2 .
&self