Method: Bio::Tree#out_edges
- Defined in:
- lib/bio/tree.rb
#out_edges(source) ⇒ Object
Returns all connected edges with adjacent nodes. Returns an array of the array [ source, target, edge ].
The reason why the method name is “out_edges” is that it comes from the Boost Graph Library.
341 342 343 344 345 346 347 348 |
# File 'lib/bio/tree.rb', line 341 def out_edges(source) h = @pathway.graph[source] if h h.collect { |key, val| [ source, key, val ] } else [] end end |