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