Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andrioni opened this issue Mar 15, 2017 · 0 comments
Closed
Labels

Comments

@andrioni
Copy link

andrioni commented Mar 15, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants