Package Bio :: Package Nexus :: Module Nodes :: Class Chain
[show private | hide private]
[frames | no frames]

Class Chain

Known Subclasses:
Tree

Stores a list of nodes that are linked together.
Method Summary
  __init__(self)
Initiates a node chain: (self).
  add(self, node, prev)
Attaches node to another: (self, node, prev).
  all_ids(self)
Return a list of all node ids.
  collapse(self, id)
Deletes node from chain and relinks successors to predecessor: collapse(self, id).
  is_parent_of(self, parent, grandchild)
Check if grandchild is a subnode of parent: is_parent_of(self,parent,grandchild).
  kill(self, id)
Kills a node from chain without caring to what it is connected: kill(self,id).
  link(self, parent, child)
Connects son to parent: link(self,son,parent).
  trace(self, start, finish)
Returns a list of all node_ids between two nodes (excluding start, including end): trace(start,end).
  unlink(self, id)
Disconnects node from his predecessor: unlink(self,id).

Method Details

__init__(self)
(Constructor)

Initiates a node chain: (self).

add(self, node, prev=None)

Attaches node to another: (self, node, prev).

all_ids(self)

Return a list of all node ids.

collapse(self, id)

Deletes node from chain and relinks successors to predecessor: collapse(self, id).

is_parent_of(self, parent, grandchild)

Check if grandchild is a subnode of parent: is_parent_of(self,parent,grandchild).

kill(self, id)

Kills a node from chain without caring to what it is connected: kill(self,id).

link(self, parent, child)

Connects son to parent: link(self,son,parent).

trace(self, start, finish)

Returns a list of all node_ids between two nodes (excluding start, including end): trace(start,end).

unlink(self, id)

Disconnects node from his predecessor: unlink(self,id).

Generated by Epydoc 2.1 on Thu Aug 10 20:01:14 2006 http://epydoc.sf.net