Class: Bio::AssemblyGraphAlgorithms::GraphExplorer::ExplorationPath

Inherits:
Object
  • Object
show all
Defined in:
lib/assembly/graph_explorer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pathObject

Returns the value of attribute path.



58
59
60
# File 'lib/assembly/graph_explorer.rb', line 58

def path
  @path
end

#set_of_nodesObject

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_typeObject

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

#copyObject



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_sObject



79
80
81
# File 'lib/assembly/graph_explorer.rb', line 79

def to_s
  @path.collect{|on| on.node_id}.join(',')
end