xndai commented on a change in pull request #2027:
URL: https://github.com/apache/calcite/pull/2027#discussion_r445712632



##########
File path: core/src/main/java/org/apache/calcite/util/graph/Graphs.java
##########
@@ -102,41 +99,28 @@ public int size() {
    */
   public static class FrozenGraph<V, E extends DefaultEdge> {
     private final DefaultDirectedGraph<V, E> graph;
-    private final Map<Pair<V, V>, List<V>> shortestPaths;
+    private final Map<Pair<V, V>, int[]> shortestDistances;
 
     /** Creates a frozen graph as a copy of another graph. */
     FrozenGraph(DefaultDirectedGraph<V, E> graph,
-        Map<Pair<V, V>, List<V>> shortestPaths) {
+        Map<Pair<V, V>, int[]> shortestDistances) {
       this.graph = graph;
-      this.shortestPaths = shortestPaths;
+      this.shortestDistances = shortestDistances;
     }
 
     /**
-     * Returns an iterator of all paths between two nodes, shortest first.
+     * Returns an iterator of all paths between two nodes,
+     * in non-decreasing order of path lengths.

Review comment:
       +1




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to