gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huafengw <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request #223: [GEARPUMP-349] Optimize Graph topologi...
Date Thu, 14 Sep 2017 12:41:21 GMT
Github user huafengw commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/223#discussion_r138880939
  
    --- Diff: core/src/main/scala/org/apache/gearpump/util/Graph.scala ---
    @@ -165,7 +181,7 @@ class Graph[N, E](vertexList: List[N], edgeList: List[(N, E, N)])
extends Serial
        * edges connected to node
        */
       def edgesOf(node: N): List[(N, E, N)] = {
    -    (incomingEdgesOf(node) ++ outgoingEdgesOf(node)).toSet[(N, E, N)].toList.sortBy(_indexs(_))
    +    (incomingEdgesOf(node) ++ outgoingEdgesOf(node)).distinct.sortBy(_indexs(_))
    --- End diff --
    
    ```
     // This is used to ensure the output of this Graph is always stable
     // Like method vertices(), or edges()
     private var _indexs = Map.empty[Any, Int]
    ````


---

Mime
View raw message