mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-27 04:42:35 +00:00
integration tests
This commit is contained in:
@@ -159,8 +159,12 @@ pub trait OneDReader: Reader {
|
||||
* @throws NotFoundException if counters cannot be filled entirely from row before running out
|
||||
* of pixels
|
||||
*/
|
||||
fn recordPattern(&self, row: &BitArray, start: usize, counters: &mut [u32]) -> Result<(), Exceptions>
|
||||
{
|
||||
fn recordPattern(
|
||||
&self,
|
||||
row: &BitArray,
|
||||
start: usize,
|
||||
counters: &mut [u32],
|
||||
) -> Result<(), Exceptions> {
|
||||
let numCounters = counters.len();
|
||||
// Arrays.fill(counters, 0, numCounters, 0);
|
||||
counters.fill(0);
|
||||
@@ -198,8 +202,7 @@ pub trait OneDReader: Reader {
|
||||
row: &BitArray,
|
||||
start: usize,
|
||||
counters: &mut [u32],
|
||||
) -> Result<(), Exceptions>
|
||||
{
|
||||
) -> Result<(), Exceptions> {
|
||||
let mut start = start;
|
||||
// This could be more efficient I guess
|
||||
let mut numTransitionsLeft = counters.len() as isize;
|
||||
@@ -229,8 +232,12 @@ pub trait OneDReader: Reader {
|
||||
* @param maxIndividualVariance The most any counter can differ before we give up
|
||||
* @return ratio of total variance between counters and pattern compared to total pattern size
|
||||
*/
|
||||
fn patternMatchVariance(&self, counters: &[u32], pattern: &[u32], maxIndividualVariance: f32) -> f32
|
||||
{
|
||||
fn patternMatchVariance(
|
||||
&self,
|
||||
counters: &[u32],
|
||||
pattern: &[u32],
|
||||
maxIndividualVariance: f32,
|
||||
) -> f32 {
|
||||
let mut maxIndividualVariance = maxIndividualVariance;
|
||||
let numCounters = counters.len();
|
||||
let mut total = 0.0;
|
||||
|
||||
Reference in New Issue
Block a user