/** * Add a new target node to the heuristic. * @param source location to be added. */ public void addSourceNodeToHeuristic(Point2D source) { Preconditions.checkNotNull(source, "The source node may not be null"); if (!heuristicForSourceAvailable(source)) { synchronized (lock) { ObjectDoubleMap<Point2D> hueristicForTarget = calculateHeuristicForSource(source, map.getCities()); heuristicMap.put(source, hueristicForTarget); } } else { logger.debug("Heuristic for source point {} is available (point is contained as key)", source); } } /**