Package Bio :: Package Pathway :: Package Rep :: Module MultiGraph :: Class MultiGraph
[hide private]
[frames] | no frames]

Class MultiGraph

source code

object --+
         |
        MultiGraph

A directed multigraph abstraction with labeled edges.

Instance Methods [hide private]
 
__init__(self, nodes=[])
Initializes a new MultiGraph object.
source code
 
__eq__(self, g)
Returns true if g is equal to this graph.
source code
 
__ne__(self, g)
Returns true if g is not equal to this graph.
source code
 
__repr__(self)
Returns a unique string representation of this graph.
source code
 
__str__(self)
Returns a concise string description of this graph.
source code
 
add_node(self, node)
Adds a node to this graph.
source code
 
add_edge(self, source, to, label=None)
Adds an edge to this graph.
source code
 
child_edges(self, parent)
Returns a list of (child, label) pairs for parent.
source code
 
children(self, parent)
Returns a list of unique children for parent.
source code
 
edges(self, label)
Returns a list of all the edges with this label.
source code
 
labels(self)
Returns a list of all the edge labels in this graph.
source code
 
nodes(self)
Returns a list of the nodes in this graph.
source code
 
parent_edges(self, child)
Returns a list of (parent, label) pairs for child.
source code
 
parents(self, child)
Returns a list of unique parents for child.
source code
 
remove_node(self, node)
Removes node and all edges connected to it.
source code
 
remove_edge(self, parent, child, label)
Removes edge.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, nodes=[])
(Constructor)

source code 
Initializes a new MultiGraph object.

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Returns a unique string representation of this graph.

Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Returns a concise string description of this graph.

Overrides: object.__str__

remove_edge(self, parent, child, label)

source code 
Removes edge. -- NOT IMPLEMENTED