コード例 #1
0
  private static double getCost(List<Location> path, AccessibilityGraphImpl graph) {
    double cost = 0;

    for (int i = 0; i < path.size() - 1; i++) {
      cost += graph.getShortestPathLength(path.get(i), path.get(i + 1));
    }

    return cost;
  }
コード例 #2
0
 private double getCost(Location[] array, int i, int j) {
   return graph.getShortestPathLength(array[i], array[j]);
 }