public Method

TSort.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.

Source Code

# File tsort.rb, line 163
def strongly_connected_components
  result = []
  each_strongly_connected_component {|component| result << component}
  result
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.