Skip to content

Commit

Permalink
indent
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Barry <msb5014@gmail.com>
  • Loading branch information
msbarry committed Nov 5, 2023
1 parent 45a64fb commit 7f99fb3
Showing 1 changed file with 14 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,27 +91,21 @@ public void computeNodes(Collection inputSegStrings)
private void intersectChains()
{
MonotoneChainOverlapAction overlapAction = new SegmentOverlapAction(segInt);

/**
* following test makes sure we only compare each pair of chains once
* and that we don't compare a chain to itself
*/
for (MonotoneChain queryChain : monoChains) {
Envelope queryEnv = queryChain.getEnvelope(overlapTolerance);
for (MonotoneChain testChain : index.query(queryEnv)) {
/**
* following test makes sure we only compare each pair of chains once
* and that we don't compare a chain to itself
*/
if (testChain.getId() > queryChain.getId()) {
queryChain.computeOverlaps(testChain, overlapTolerance, overlapAction);
nOverlaps++;
}
// short-circuit if possible
if (segInt.isDone())
return;
}
for (MonotoneChain queryChain : monoChains) {
Envelope queryEnv = queryChain.getEnvelope(overlapTolerance);
for (MonotoneChain testChain : index.query(queryEnv)) {
/**
* following test makes sure we only compare each pair of chains once
* and that we don't compare a chain to itself
*/
if (testChain.getId() > queryChain.getId()) {
queryChain.computeOverlaps(testChain, overlapTolerance, overlapAction);
nOverlaps++;
}
// short-circuit if possible
if (segInt.isDone()) return;
}
}
}

private void add(SegmentString segStr)
Expand Down

0 comments on commit 7f99fb3

Please sign in to comment.