Digraph class.
Digraphs are built of nodes and directed edges.
boolean
|
__eq__(self,
other)
Return whether this graph is equal to another one. |
|
|
|
|
boolean
|
__ne__(self,
other)
Return whether this graph is not equal to another one. |
|
|
|
add_edge(self,
edge,
wt=1,
label='
' ,
attrs=[ ] )
Add an directed edge to the graph connecting two nodes. |
|
|
|
add_node(self,
node,
attrs=None)
Add given node to the graph. |
|
|
|
del_edge(self,
edge)
Remove an directed edge from the graph. |
|
|
|
del_node(self,
node)
Remove a node from the graph. |
|
|
list
|
edges(self)
Return all edges in the graph. |
|
|
boolean
|
has_edge(self,
edge)
Return whether an edge exists. |
|
|
boolean
|
has_node(self,
node)
Return whether the requested node exists. |
|
|
list
|
incidents(self,
node)
Return all nodes that are incident to the given node. |
|
|
list
|
neighbors(self,
node)
Return all nodes that are directly accessible from given node. |
|
|
number
|
node_order(self,
node)
Return the order of the given node. |
|
|
list
|
nodes(self)
Return node list. |
|
|
Inherited from mixins.common.common :
__getitem__ ,
__iter__ ,
__len__ ,
__repr__ ,
__str__ ,
add_graph ,
add_nodes ,
add_spanning_tree ,
complete ,
inverse ,
order ,
reverse
Inherited from mixins.labeling.labeling :
add_edge_attribute ,
add_edge_attributes ,
add_node_attribute ,
del_edge_labeling ,
del_node_labeling ,
edge_attributes ,
edge_label ,
edge_weight ,
get_edge_properties ,
node_attributes ,
set_edge_label ,
set_edge_properties ,
set_edge_weight
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|