Skip to content

Topological sort returns Right for graphs with cycles pruning cycles #68

@andrioni

Description

@andrioni

A small repro:

scala> Graph(1 ~> 2, 4 ~> 2, 2 ~> 3, 3 ~> 4, 1 ~> 5).topologicalSort
warning: there was one feature warning; re-run with -feature for details
res0: scala.util.Either[_1.NodeT,_1.TopologicalOrder[_1.NodeT]] forSome { val _1: scalax.collection.Graph[Int,scalax.collection.GraphEdge.DiEdge] } = Right(TopologicalOrder(1, 5))

scala> Graph(1 ~> 2, 4 ~> 2, 2 ~> 3, 3 ~> 4, 1 ~> 5).isCyclic
res1: Boolean = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions