Skip to content

Proper handling of acyclic graphs

Compare
Choose a tag to compare
@sgraf812 sgraf812 released this 16 Sep 10:33
· 39 commits to master since this release

Previously, results of topologicalSort and heightLevels was not really meaningful for cyclic graphs.

This release introduces checkAcyclic which returns an AcyclicGraph in the succeeding case, witnessing the fact that the graph is acyclic.
topologicalSort and heightLevels now take an AcyclicGraph as argument, and stronglyConnectedComponents returns a Result, being a more elaborate version of checkAcyclic.