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=())
Initialize a new MultiGraph object.
source code
 
__eq__(self, g)
Return true if g is equal to this graph.
source code
 
__ne__(self, g)
Return true if g is not equal to this graph.
source code
 
__repr__(self)
Return a unique string representation of this graph.
source code
 
__str__(self)
Return a concise string description of this graph.
source code
 
add_node(self, node)
Add a node to this graph.
source code
 
add_edge(self, source, to, label=None)
Add an edge to this graph.
source code
 
child_edges(self, parent)
Return a list of (child, label) pairs for parent.
source code
 
children(self, parent)
Return a list of unique children for parent.
source code
 
edges(self, label)
Return a list of all the edges with this label.
source code
 
labels(self)
Return a list of all the edge labels in this graph.
source code
 
nodes(self)
Return a list of the nodes in this graph.
source code
 
parent_edges(self, child)
Return a list of (parent, label) pairs for child.
source code
 
parents(self, child)
Return a list of unique parents for child.
source code
 
remove_node(self, node)
Remove node and all edges connected to it.
source code
 
remove_edge(self, parent, child, label)
Remove edge (NOT IMPLEMENTED).
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 
Initialize a new MultiGraph object.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 
Return a unique string representation of this graph.
Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 
Return a concise string description of this graph.
Overrides: object.__str__