Stongly connected components
This library provides a simple implementation of a SCC algorithm. It is parametrized over the Node type, which must be comparable. (The algorithm uses the RBTree from base internally).
Node
base
import SCC "mo:scc/scc"; assert( SCC.scc<Text>(Text.compare, [ ("A", ["C"].vals()), ("B", ["B", "A"].vals()), ("C", ["A"].vals()), ].vals()) == [["B"],["A", "C"]);
Stongly connected components
This library provides a simple implementation of a SCC algorithm. It is parametrized over the
Node
type, which must be comparable. (The algorithm uses the RBTree frombase
internally).