Class: Hanuman::Graph
- Inherits:
-
Stage
- Object
- Stage
- Hanuman::Graph
show all
- Includes:
- TSort
- Defined in:
- lib/hanuman/graph.rb
Instance Method Summary
collapse
#builder, #label, #register, #set_builder
Instance Method Details
#directed_sort ⇒ Object
16
|
# File 'lib/hanuman/graph.rb', line 16
def directed_sort() self.tsort ; end
|
#tsort_each_child(node, &blk) ⇒ Object
12
13
14
|
# File 'lib/hanuman/graph.rb', line 12
def tsort_each_child(node, &blk)
links.select{ |link| link.into == node }.map(&:from).each(&blk)
end
|
#tsort_each_node(&blk) ⇒ Object
8
9
10
|
# File 'lib/hanuman/graph.rb', line 8
def tsort_each_node(&blk)
stages.keys.each(&blk)
end
|