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