Module: Algorithmable::Graphs::Traversals
- Defined in:
- lib/algorithmable/graphs/traversals.rb,
lib/algorithmable/graphs/traversals/errors.rb,
lib/algorithmable/graphs/traversals/depth_first.rb,
lib/algorithmable/graphs/traversals/breadth_first.rb
Defined Under Namespace
Modules: Errors
Classes: BreadthFirst, DepthFirst
Instance Method Summary
collapse
Instance Method Details
#traverse_with_breadth_first(graph, source) ⇒ Object
12
13
14
|
# File 'lib/algorithmable/graphs/traversals.rb', line 12
def traverse_with_breadth_first(graph, source)
BreadthFirst.new(graph, source)
end
|
#traverse_with_depth_first(graph, source) ⇒ Object
8
9
10
|
# File 'lib/algorithmable/graphs/traversals.rb', line 8
def traverse_with_depth_first(graph, source)
DepthFirst.new(graph, source)
end
|