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:20:50 GMT
Github user manuzhang commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/223#discussion_r138876553
  
    --- Diff: core/src/main/scala/org/apache/gearpump/util/Graph.scala ---
    @@ -318,11 +355,12 @@ class Graph[N, E](vertexList: List[N], edgeList: List[(N, E, N)])
extends Serial
        * http://www.drdobbs.com/database/topological-sorting/184410262
        */
       def topologicalOrderWithCirclesIterator: Iterator[N] = {
    -    if (hasCycle()) {
    +    val result = tryTopologicalOrderIterator
    --- End diff --
    
    `match case` looks more clear


---

Mime
View raw message