Formatting
This commit is contained in:
parent
28956f8ad5
commit
e5fe0d9eb7
1 changed files with 167 additions and 165 deletions
|
@ -44,9 +44,11 @@ public class BinaryRoutePlanner {
|
|||
|
||||
private static class SegmentsComparator implements Comparator<RouteSegment> {
|
||||
final RoutingContext ctx;
|
||||
|
||||
public SegmentsComparator(RoutingContext ctx) {
|
||||
this.ctx = ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(RouteSegment o1, RouteSegment o2) {
|
||||
return ctx.roadPriorityComparator(o1.distanceFromStart, o1.distanceToEnd, o2.distanceFromStart, o2.distanceToEnd);
|
||||
|
@ -56,11 +58,13 @@ public class BinaryRoutePlanner {
|
|||
private static class NonHeuristicSegmentsComparator implements Comparator<RouteSegment> {
|
||||
public NonHeuristicSegmentsComparator() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(RouteSegment o1, RouteSegment o2) {
|
||||
return roadPriorityComparator(o1.distanceFromStart, o1.distanceToEnd, o2.distanceFromStart, o2.distanceToEnd, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate route between start.segmentEnd and end.segmentStart (using A* algorithm)
|
||||
* return list of segments
|
||||
|
@ -354,7 +358,6 @@ public class BinaryRoutePlanner {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private static void println(String logMsg) {
|
||||
// log.info(logMsg);
|
||||
System.out.println(logMsg);
|
||||
|
@ -696,8 +699,6 @@ public class BinaryRoutePlanner {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private RouteSegment processIntersections(RoutingContext ctx, PriorityQueue<RouteSegment> graphSegments,
|
||||
TLongObjectHashMap<RouteSegment> visitedSegments, float distFromStart, RouteSegment segment,
|
||||
short segmentPoint, RouteSegment inputNext, boolean reverseWaySearch, boolean doNotAddIntersections,
|
||||
|
@ -950,6 +951,7 @@ public class BinaryRoutePlanner {
|
|||
public Iterator<RouteSegment> getIterator() {
|
||||
return new Iterator<BinaryRoutePlanner.RouteSegment>() {
|
||||
RouteSegment next = RouteSegment.this;
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
|
|
Loading…
Reference in a new issue