Skip to content

Commit

Permalink
Added missing implementation of isEquals()
Browse files Browse the repository at this point in the history
  • Loading branch information
lessthanoptimal committed Apr 20, 2024
1 parent b2e1f23 commit e1aba6d
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Peter Abeles. All Rights Reserved.
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
Expand Down Expand Up @@ -75,6 +75,24 @@ public void fill( double value ) {
return data[index];
}

@Override public boolean isEquals( NccFeature tuple ) {
if (size() != tuple.size()) {
return false;
}

if (mean != tuple.mean)
return false;

if (sigma != tuple.sigma)
return false;

for (int i = 0; i < size(); i++) {
if (data[i] != tuple.data[i])
return false;
}
return true;
}

@Override public int size() {
return data.length;
}
Expand Down

0 comments on commit e1aba6d

Please sign in to comment.