Skip to content

Commit

Permalink
replace use left(), right() getters instead of public fields
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Apr 16, 2024
1 parent 8095fd6 commit e8cebe1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/java/net/imglib2/algorithm/kdtree/VolumetricSearch.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ public List< I > find( final RealLocalizable pt )
// which still could be lower.
// Otherwise (coordinate is smaller/equal position, take the
// right branch as well
if ( node.left != null )
toDo.push( node.left );
if ( node.right != null && node.getSplitCoordinate() <= position[ k ] )
toDo.push( node.right );
if ( node.left() != null )
toDo.push( node.left() );
if ( node.right() != null && node.getSplitCoordinate() <= position[ k ] )
toDo.push( node.right() );
}
else
{
Expand All @@ -198,10 +198,10 @@ public List< I > find( final RealLocalizable pt )
// which still could be higher.
// Otherwise (coordinate is larger/equal position, take the left
// branch as well
if ( node.right != null )
toDo.push( node.right );
if ( node.left != null && node.getSplitCoordinate() >= position[ k - numDimensions ] )
toDo.push( node.left );
if ( node.right() != null )
toDo.push( node.right() );
if ( node.left() != null && node.getSplitCoordinate() >= position[ k - numDimensions ] )
toDo.push( node.left() );
}
}

Expand Down

0 comments on commit e8cebe1

Please sign in to comment.