Module Topological_sort
include Topological_sort__.Topological_sort_intf.Topological_sort
module type Node = Topological_sort__.Topological_sort_intf.Nodemodule Edge : sig ... endval sort : ?verbose:Topological_sort__.Import.bool -> (module Node with type t = 'node) -> 'node Topological_sort__.Import.list -> 'node Edge.t Topological_sort__.Import.list -> 'node Topological_sort__.Import.list Topological_sort__.Import.Or_error.tsort (module Node) nodes edgesreturns a list of nodesoutputsatisfying:- every node that appears in
nodesoredgesoccurs once inoutput. - if
{ from; to_ }is inedges, thenfromoccurs beforeto_inoutput. - nodes that have no incoming or outgoing edges appear sorted at the end of
output.
sortreturnsErrorif there is a cycle.- every node that appears in