Skip to content

Commit

Permalink
AssociatedTripleIndex
Browse files Browse the repository at this point in the history
- Added reset()
- Initial value is now -1 instead of 0
  • Loading branch information
lessthanoptimal committed Jun 1, 2024
1 parent dbaf99e commit 0faca35
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
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 @@ -41,18 +41,24 @@ public AssociatedTripleIndex( int a, int b, int c ) {
this.c = c;
}

public AssociatedTripleIndex() {}
public AssociatedTripleIndex() {reset();}

public void setTo( int a, int b, int c ) {
public AssociatedTripleIndex setTo( int a, int b, int c ) {
this.a = a;
this.b = b;
this.c = c;
return this;
}

public void setTo( AssociatedTripleIndex original ) {
public AssociatedTripleIndex setTo( AssociatedTripleIndex original ) {
this.a = original.a;
this.b = original.b;
this.c = original.c;
return this;
}

public void reset() {
a = b = c = -1;
}

public AssociatedTripleIndex copy() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2024, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package boofcv.struct.feature;

import boofcv.struct.StandardStructChecks;

public class TestAssociatedTripleIndex extends StandardStructChecks {
}

0 comments on commit 0faca35

Please sign in to comment.