gearpump-dev mailing list archives

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

    https://github.com/apache/incubator-gearpump/pull/223#discussion_r138875669
  
    --- 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 --
    
    why do we need to `distinct` and `sort` here ?


---

Mime
View raw message