Back to index

python-biopython  1.60
Public Member Functions | Public Attributes
Bio.Nexus.Nodes.Node Class Reference

List of all members.

Public Member Functions

def __init__
def set_id
def get_id
def get_succ
def get_prev
def add_succ
def remove_succ
def set_succ
def set_prev
def get_data
def set_data

Public Attributes

 id
 data
 prev
 succ

Detailed Description

A single node.

Definition at line 117 of file Nodes.py.


Constructor & Destructor Documentation

def Bio.Nexus.Nodes.Node.__init__ (   self,
  data = None 
)
Represents a node with one predecessor and multiple successors: (self, data=None).

Definition at line 120 of file Nodes.py.

00120 
00121     def __init__(self,data=None):
00122         """Represents a node with one predecessor and multiple successors: (self, data=None)."""
00123         self.id=None
00124         self.data=data
00125         self.prev=None
00126         self.succ=[]


Member Function Documentation

def Bio.Nexus.Nodes.Node.add_succ (   self,
  id 
)
Adds a node id to the node's successors: (self,id).

Definition at line 145 of file Nodes.py.

00145 
00146     def add_succ(self,id):
00147         """Adds a node id to the node's successors: (self,id)."""
00148         if isinstance(id,type([])):
00149             self.succ.extend(id)
00150         else:
00151             self.succ.append(id)

Returns a node's data: (self).

Definition at line 166 of file Nodes.py.

00166 
00167     def get_data(self):
00168         """Returns a node's data: (self)."""
00169         return self.data

Returns the node's id: (self).

Definition at line 133 of file Nodes.py.

00133 
00134     def get_id(self):
00135         """Returns the node's id: (self)."""
00136         return self.id

Here is the caller graph for this function:

Returns the id of the node's predecessor: (self).

Definition at line 141 of file Nodes.py.

00141 
00142     def get_prev(self):
00143         """Returns the id of the node's predecessor: (self)."""
00144         return self.prev

Returns a list of the node's successors: (self).

Definition at line 137 of file Nodes.py.

00137 
00138     def get_succ(self):
00139         """Returns a list of the node's successors: (self)."""
00140         return self.succ

def Bio.Nexus.Nodes.Node.remove_succ (   self,
  id 
)
Removes a node id from the node's successors: (self,id).

Definition at line 152 of file Nodes.py.

00152 
00153     def remove_succ(self,id):
00154         """Removes a node id from the node's successors: (self,id)."""
00155         self.succ.remove(id)

def Bio.Nexus.Nodes.Node.set_data (   self,
  data 
)
Sets a node's data: (self,data).

Definition at line 170 of file Nodes.py.

00170 
00171     def set_data(self,data):
00172         """Sets a node's data: (self,data)."""
00173         self.data=data
def Bio.Nexus.Nodes.Node.set_id (   self,
  id 
)
Sets the id of a node, if not set yet: (self,id).

Definition at line 127 of file Nodes.py.

00127 
00128     def set_id(self,id):
00129         """Sets the id of a node, if not set yet: (self,id)."""
00130         if self.id is not None:
00131             raise NodeException('Node id cannot be changed.')
00132         self.id=id

def Bio.Nexus.Nodes.Node.set_prev (   self,
  id 
)
Sets the node's predecessor: (self,id).

Definition at line 162 of file Nodes.py.

00162 
00163     def set_prev(self,id):
00164         """Sets the node's predecessor: (self,id)."""
00165         self.prev=id
    
def Bio.Nexus.Nodes.Node.set_succ (   self,
  new_succ 
)
Sets the node's successors: (self,new_succ).

Definition at line 156 of file Nodes.py.

00156 
00157     def set_succ(self,new_succ):
00158         """Sets the node's successors: (self,new_succ)."""
00159         if not isinstance(new_succ,type([])):
00160             raise NodeException('Node successor must be of list type.')
00161         self.succ=new_succ


Member Data Documentation

Definition at line 123 of file Nodes.py.

Definition at line 122 of file Nodes.py.

Definition at line 124 of file Nodes.py.

Definition at line 125 of file Nodes.py.


The documentation for this class was generated from the following file: