xndai commented on a change in pull request #1832: [CALCITE-3827] Reduce the 
time complexity of finding in-edges of a vertex in the graph
URL: https://github.com/apache/calcite/pull/1832#discussion_r384653139
 
 

 ##########
 File path: 
core/src/main/java/org/apache/calcite/util/graph/DefaultDirectedGraph.java
 ##########
 @@ -36,7 +36,17 @@
 public class DefaultDirectedGraph<V, E extends DefaultEdge>
     implements DirectedGraph<V, E> {
   final Set<E> edges = new LinkedHashSet<>();
-  final Map<V, VertexInfo<V, E>> vertexMap = new LinkedHashMap<>();
+
+  /**
+   * The map for out-edges.
+   */
+  final Map<V, VertexInfo<V, E>> vertexOutMap = new LinkedHashMap<>();
 
 Review comment:
   Why is VertexInfo used as Map value? Essentially you just need List\<E\>, 
don't you?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to