Ruby TSort Functions
EditRocket provides the following information on TSort functions in the Ruby source code builder.
each_strongly_connected_component( {|nodes| ...} - "The iterator version of the #strongly_connected_components method. obj.each_strongly_connected_component is similar to obj.strongly_connected_components.each, but modification of obj during the iteration may lead to unexpected results."
each_strongly_connected_component_from(node, id_map={}, stack=[]) - Iterates over strongly connected component in the subgraph reachable from node.
strongly_connected_components() - Returns strongly connected components as an array of arrays of nodes. The array is sorted from children to parents. Each elements of the array represents a strongly connected component.
tsort() - Returns a topologically sorted array of nodes. The array is sorted from children to parents, i.e. the first element has no child and the last node has no parent.
tsort_each( {|node| ...} - "The iterator version of the #tsort method. obj.tsort_each is similar to obj.tsort.each, but modification of obj during the iteration may lead to unexpected results."
tsort_each_child(node) - Should be implemented by a extended class.
tsort_each_node( {|node| ...} - Should be implemented by a extended class.