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. 

Return a summary of information for the graph G or a single node n. 

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. 

View of 

Returns a SubGraph view of 

Returns a view of 

View of 

Returns a view of the subgraph induced by the specified edges. 
Nodes¶

Returns an iterator over the graph nodes. 
Returns the number of nodes in the graph. 


Returns a list of nodes connected to node n. 

Returns all of the neighbors of a node in the graph. 

Returns the nonneighbors of the node in the graph. 

Returns the common neighbors of two nodes in a graph. 
Edges¶

Returns an edge view of edges incident to nodes in nbunch. 
Returns the number of edges in the graph. 


Returns the density of a graph. 

Returns the nonexistent edges in the graph. 
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 