A directed multigraph abstraction with labeled edges.
|
|
|
|
|
__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
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__subclasshook__
|