crucial performance optimization
This commit is contained in:
parent
ff108a55e6
commit
d3bd6ae843
@ -64,10 +64,9 @@ public class BinaryHeapOpenSet implements IOpenSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void update(PathNode node) {
|
public final void update(PathNode val) {
|
||||||
int index = node.heapPosition;
|
int index = val.heapPosition;
|
||||||
int parentInd = index >>> 1;
|
int parentInd = index >>> 1;
|
||||||
PathNode val = array[index];
|
|
||||||
double cost = val.combinedCost;
|
double cost = val.combinedCost;
|
||||||
PathNode parentNode = array[parentInd];
|
PathNode parentNode = array[parentInd];
|
||||||
while (index > 1 && parentNode.combinedCost > cost) {
|
while (index > 1 && parentNode.combinedCost > cost) {
|
||||||
|
Loading…
Reference in New Issue
Block a user