Bio.Pathway.Rep.Graph module¶
get/set abstraction for graph representation.
-
class
Bio.Pathway.Rep.Graph.
Graph
(nodes=())¶ Bases:
object
A directed graph abstraction with labeled edges.
-
__init__
(self, nodes=())¶ Initialize a new Graph object.
-
__eq__
(self, g)¶ Return true if g is equal to this graph.
-
__ne__
(self, g)¶ Return true if g is not equal to this graph.
-
__repr__
(self)¶ Return a unique string representation of this graph.
-
__str__
(self)¶ Return a concise string description of this graph.
-
add_node
(self, node)¶ Add a node to this graph.
-
add_edge
(self, source, to, label=None)¶ Add an edge to this graph.
-
child_edges
(self, parent)¶ Return a list of (child, label) pairs for parent.
-
children
(self, parent)¶ Return a list of unique children for parent.
-
edges
(self, label)¶ Return a list of all the edges with this label.
-
labels
(self)¶ Return a list of all the edge labels in this graph.
-
nodes
(self)¶ Return a list of the nodes in this graph.
-
parent_edges
(self, child)¶ Return a list of (parent, label) pairs for child.
-
parents
(self, child)¶ Return a list of unique parents for child.
-
remove_node
(self, node)¶ Remove node and all edges connected to it.
-
remove_edge
(self, parent, child, label)¶ Remove edge (NOT IMPLEMENTED).
-
__hash__
= None¶
-