Class: Bio::NeXML::IntTree
Overview
end class Tree
Instance Attribute Summary
Attributes inherited from Tree
Instance Method Summary (collapse)
- - (Object) add_edge(edge)
- - (Object) create_edge(options = {})
- - (Object) create_rootedge(options = {})
-
- (IntTree) initialize(id = nil, options = {}, &block)
constructor
A new instance of IntTree.
Methods inherited from Tree
#<<, #[], #__add_edge__, #__add_node__, #add_node, #add_rootedge, #ancestors, #children, #create_node, #descendents, #each_edge, #each_edge_with_id, #each_node, #each_node_with_id, #get_edge_by_id, #get_node_by_id, #has_edge?, #has_node?, #include?, #lowest_common_ancestor, #number_of_edges, #number_of_nodes, #parent, #remove_edge, #remove_node, #roots, #to_xml
Methods included from Mapper
Constructor Details
- (IntTree) initialize(id = nil, options = {}, &block)
A new instance of IntTree
428 429 430 |
# File 'lib/bio/db/nexml/trees.rb', line 428 def initialize( id = nil, = {}, &block ) super end |
Instance Method Details
- (Object) add_edge(edge)
432 433 434 435 |
# File 'lib/bio/db/nexml/trees.rb', line 432 def add_edge( edge ) edge.length = edge.length.to_i super end |
- (Object) create_edge(options = {})
437 438 439 440 441 |
# File 'lib/bio/db/nexml/trees.rb', line 437 def create_edge( = {} ) edge = IntEdge.new( Bio::NeXML.generate_id( IntEdge ), ) self << edge edge end |
- (Object) create_rootedge(options = {})
443 444 445 446 447 |
# File 'lib/bio/db/nexml/trees.rb', line 443 def create_rootedge( = {} ) rootedge = IntRootEdge.new( Bio::NeXML.generate_id( IntRootEdge ), ) self << rootedge rootedge end |