Skip to content

Commit

Permalink
Use internal PriorityQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornharrtell committed May 23, 2020
1 parent 6262251 commit 941fb5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
package org.locationtech.jts.algorithm.construct;

import java.util.PriorityQueue;

import org.locationtech.jts.algorithm.locate.IndexedPointInAreaLocator;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Envelope;
Expand All @@ -22,6 +20,7 @@
import org.locationtech.jts.geom.Location;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.operation.distance.IndexedFacetDistance;
import org.locationtech.jts.util.PriorityQueue;

/**
* Constructs the Largest Empty Circle for a set
Expand Down Expand Up @@ -207,7 +206,7 @@ private void compute() {
}

// Priority queue of cells, ordered by decreasing distance from constraints
PriorityQueue<Cell> cellQueue = new PriorityQueue<>();
PriorityQueue<Cell> cellQueue = new PriorityQueue<Cell>();

createInitialGrid(obstacles.getEnvelopeInternal(), cellQueue);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
*/
package org.locationtech.jts.algorithm.construct;

import java.util.PriorityQueue;

import org.locationtech.jts.algorithm.locate.IndexedPointInAreaLocator;
import org.locationtech.jts.geom.Coordinate;
import org.locationtech.jts.geom.Envelope;
Expand All @@ -24,6 +22,7 @@
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.Polygon;
import org.locationtech.jts.operation.distance.IndexedFacetDistance;
import org.locationtech.jts.util.PriorityQueue;

/**
* Constructs the Maximum Inscribed Circle for a
Expand Down Expand Up @@ -183,7 +182,7 @@ private void compute() {
if (centerCell != null) return;

// Priority queue of cells, ordered by maximum distance from boundary
PriorityQueue<Cell> cellQueue = new PriorityQueue<>();
PriorityQueue<Cell> cellQueue = new PriorityQueue<Cell>();

createInitialGrid(inputGeom.getEnvelopeInternal(), cellQueue);

Expand Down

0 comments on commit 941fb5d

Please sign in to comment.