Functions#
Functional interface to graph methods and assorted utilities.
Graph#
|
Returns a degree view of single node or of nbunch of nodes. |
Returns a list of the frequency of each degree value. |
|
|
Returns the density of a graph. |
|
Returns a copy of the graph G with all of the edges removed. |
|
Return True if graph is directed. |
|
Returns a directed view of the graph |
|
Returns an undirected view of the graph |
|
Returns True if |
|
Add a star to Graph G_to_add_to. |
|
Add a path to the Graph G_to_add_to. |
|
Add a cycle to the Graph G_to_add_to. |
|
Returns the subgraph induced on nodes in nbunch. |
|
Returns a SubGraph view of |
|
Returns a view of |
|
Returns a view of the subgraph induced by the specified edges. |
Nodes#
|
Returns a NodeView over the graph nodes. |
Returns the number of nodes in the graph. |
|
|
Returns an iterator over all neighbors of node n. |
|
Returns all of the neighbors of a node in the graph. |
|
Returns the non-neighbors of the node in the graph. |
|
Returns the common neighbors of two nodes in a graph. |
Edges#
Self loops#
|
Returns an iterator over selfloop edges. |
Returns the number of selfloop edges. |
|
Returns an iterator over nodes with self loops. |
Attributes#
|
Returns True if |
|
Returns True if |
|
Sets node attributes from a given value or dictionary of values. |
|
Get node attributes from graph |
|
Sets edge attributes from a given value or dictionary of values. |
|
Get edge attributes from graph |
Paths#
|
Returns whether or not the specified path exists. |
|
Returns total cost associated with specified path and weight |