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 graph. 

Returns an undirected view of the graph graph. 

Returns True if G has no edges. 

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 G applying a filter on nodes and edges. 

Returns a SubGraph view of G showing only nodes in nbunch. 

Returns a view of G with hidden nodes and edges. 

View of G with edge directions reversed 

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 G has weighted edges. 

Returns True if G has negatively weighted edges. 

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 
Freezing graph structure¶

Modify graph to prevent further change by adding or removing nodes or edges. 

Returns True if graph is frozen. 