module RGL::MutableGraph
def cycles
-
(Array)
- of all minimum cycles in a graph
def cycles g = self.clone self.inject([]) do |acc, v| acc = acc.concat(g.cycles_with_vertex(v)) g.remove_vertex(v); acc end end
(Array)
- of all minimum cycles in a graph
def cycles g = self.clone self.inject([]) do |acc, v| acc = acc.concat(g.cycles_with_vertex(v)) g.remove_vertex(v); acc end end