protected void initSearch (N startNode, N endNode, Heuristic<N> heuristic) { if (metrics != null) metrics.reset(); // Increment the search id if (++searchId < 0) searchId = 1; // Initialize the open list openList.clear(); // Initialize the record for the start node and add it to the open list NodeRecord<N> startRecord = getNodeRecord(startNode); startRecord.node = startNode; startRecord.connection = null; startRecord.costSoFar = 0; addToOpenList(startRecord, heuristic.estimate(startNode, endNode)); current = null; }
nodeHeuristic = heuristic.estimate(node, endNode);
protected void initSearch (N startNode, N endNode, Heuristic<N> heuristic) { if (metrics != null) metrics.reset(); // Increment the search id if (++searchId < 0) searchId = 1; // Initialize the open list openList.clear(); // Initialize the record for the start node and add it to the open list NodeRecord<N> startRecord = getNodeRecord(startNode); startRecord.node = startNode; startRecord.connection = null; startRecord.costSoFar = 0; addToOpenList(startRecord, heuristic.estimate(startNode, endNode)); current = null; }
nodeHeuristic = heuristic.estimate(node, endNode);