Class: Bio::Tree::Node
- Inherits:
-
Object
- Object
- Bio::Tree::Node
- Defined in:
- lib/bio-alignment/tree.rb
Instance Method Summary collapse
- #children ⇒ Object
-
#distance(other) ⇒ Object
Get the distance to another node (FIXME: write test).
- #inject_tree(tree) ⇒ Object
- #leaf? ⇒ Boolean
- #parent ⇒ Object
Instance Method Details
#children ⇒ Object
48 49 50 |
# File 'lib/bio-alignment/tree.rb', line 48 def children @tree.children(self) end |
#distance(other) ⇒ Object
Get the distance to another node (FIXME: write test)
57 58 59 |
# File 'lib/bio-alignment/tree.rb', line 57 def distance other @tree.distance(self,other) end |
#inject_tree(tree) ⇒ Object
40 41 42 |
# File 'lib/bio-alignment/tree.rb', line 40 def inject_tree tree @tree = tree end |
#leaf? ⇒ Boolean
44 45 46 |
# File 'lib/bio-alignment/tree.rb', line 44 def leaf? children.size == 0 end |
#parent ⇒ Object
52 53 54 |
# File 'lib/bio-alignment/tree.rb', line 52 def parent @tree.parent(self) end |