Class: Bio::AssemblyGraphAlgorithms::GraphExplorer::ExplorationPath
- Inherits:
-
Object
- Object
- Bio::AssemblyGraphAlgorithms::GraphExplorer::ExplorationPath
- Defined in:
- lib/assembly/graph_explorer.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#set_of_nodes ⇒ Object
Returns the value of attribute set_of_nodes.
-
#termination_type ⇒ Object
Returns the value of attribute termination_type.
Instance Method Summary collapse
- #add_node(onode) ⇒ Object
- #copy ⇒ Object
- #include?(oriented_node) ⇒ Boolean
-
#initialize(path) ⇒ ExplorationPath
constructor
A new instance of ExplorationPath.
- #to_s ⇒ Object
Constructor Details
#initialize(path) ⇒ ExplorationPath
60 61 62 63 |
# File 'lib/assembly/graph_explorer.rb', line 60 def initialize(path) @path = path @set_of_nodes = Set.new path.collect{|n| n.to_settable} end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
58 59 60 |
# File 'lib/assembly/graph_explorer.rb', line 58 def path @path end |
#set_of_nodes ⇒ Object
Returns the value of attribute set_of_nodes.
58 59 60 |
# File 'lib/assembly/graph_explorer.rb', line 58 def set_of_nodes @set_of_nodes end |
#termination_type ⇒ Object
Returns the value of attribute termination_type.
58 59 60 |
# File 'lib/assembly/graph_explorer.rb', line 58 def termination_type @termination_type end |
Instance Method Details
#add_node(onode) ⇒ Object
69 70 71 72 |
# File 'lib/assembly/graph_explorer.rb', line 69 def add_node(onode) path.add_oriented_node onode @set_of_nodes << onode.to_settable end |
#copy ⇒ Object
74 75 76 77 |
# File 'lib/assembly/graph_explorer.rb', line 74 def copy anew = ExplorationPath.new @path.copy return anew end |
#include?(oriented_node) ⇒ Boolean
65 66 67 |
# File 'lib/assembly/graph_explorer.rb', line 65 def include?(oriented_node) @set_of_nodes.include?(oriented_node.to_settable) end |
#to_s ⇒ Object
79 80 81 |
# File 'lib/assembly/graph_explorer.rb', line 79 def to_s @path.collect{|on| on.node_id}.join(',') end |