private void relax(MapNode node){
  double nodeDist=distances.get(node);
  for (  MapNode n : node.getNeighbors()) {
    if (visited.contains(n)) {
      continue;
    }
    if (okMapNodes != null && !n.isType(okMapNodes)) {
      continue;
    }
    double nDist=nodeDist + getDistance(node,n);
    if (distances.get(n) > nDist) {
      prevNodes.put(n,node);
      setDistance(n,nDist);
    }
  }
}

private void relax ( MapNode node ) { double nodeDist = distances . get ( node ) ; for ( MapNode n : node . getNeighbors ( ) ) { if ( visited . contains ( n ) ) { continue ; } if ( okMapNodes != null && ! n . isType ( okMapNodes ) ) { continue ; } double nDist = nodeDist + getDistance ( node , n ) ; if ( distances . get ( n ) > nDist ) { prevNodes . put ( n , node ) ; setDistance ( n , nDist ) ; } } }
relaxes the neighbors of a node ( updates the shortest distances ) .
