void updatePendingNodes(final int newLandmarkIndex,final Node toNode,final RouterPriorityQueue<Node> pendingNodes){
  Iterator<Node> it=pendingNodes.iterator();
  PreProcessLandmarks.LandmarksData toRole=getPreProcessData(toNode);
  ArrayList<Double> newEstRemTravCosts=new ArrayList<Double>();
  ArrayList<Node> nodesToBeUpdated=new ArrayList<Node>();
  while (it.hasNext()) {
    Node node=it.next();
    AStarNodeData role=getData(node);
    PreProcessLandmarks.LandmarksData ppRole=getPreProcessData(node);
    double estRemTravCost=role.getExpectedRemainingCost();
    double newEstRemTravCost=estimateRemainingTravelCost(ppRole,toRole,newLandmarkIndex);
    if (newEstRemTravCost > estRemTravCost) {
      nodesToBeUpdated.add(node);
      newEstRemTravCosts.add(newEstRemTravCost);
    }
  }
  for (  Node node : nodesToBeUpdated) {
    pendingNodes.remove(node);
  }
  for (int i=0; i < nodesToBeUpdated.size(); i++) {
    Node node=nodesToBeUpdated.get(i);
    AStarNodeData data=getData(node);
    data.setExpectedRemainingCost(newEstRemTravCosts.get(i));
    pendingNodes.add(node,getPriority(data));
  }
}

void updatePendingNodes ( final int newLandmarkIndex , final Node toNode , final RouterPriorityQueue < Node > pendingNodes ) { Iterator < Node > it = pendingNodes . iterator ( ) ; PreProcessLandmarks . LandmarksData toRole = getPreProcessData ( toNode ) ; ArrayList < Double > newEstRemTravCosts = new ArrayList < Double > ( ) ; ArrayList < Node > nodesToBeUpdated = new ArrayList < Node > ( ) ; while ( it . hasNext ( ) ) { Node node = it . next ( ) ; AStarNodeData role = getData ( node ) ; PreProcessLandmarks . LandmarksData ppRole = getPreProcessData ( node ) ; double estRemTravCost = role . getExpectedRemainingCost ( ) ; double newEstRemTravCost = estimateRemainingTravelCost ( ppRole , toRole , newLandmarkIndex ) ; if ( newEstRemTravCost > estRemTravCost ) { nodesToBeUpdated . add ( node ) ; newEstRemTravCosts . add ( newEstRemTravCost ) ; } } for ( Node node : nodesToBeUpdated ) { pendingNodes . remove ( node ) ; } for ( int i = 0 ; i < nodesToBeUpdated . size ( ) ; i ++ ) { Node node = nodesToBeUpdated . get ( i ) ; AStarNodeData data = getData ( node ) ; data . setExpectedRemainingCost ( newEstRemTravCosts . get ( i ) ) ; pendingNodes . add ( node , getPriority ( data ) ) ; } }
if a landmark has been added to the set of the active landmarks , this function re - evaluates the estimated remaining travel time based on the new set of active landmarks of the nodes contained in pendingnodes . if this estimation improved , the node ' s position in the pendingnodes queue is updated .
