NetworkX

Table Of Contents

Previous topic

Functions

Next topic

Linear algebra

Graph generators

Atlas

Generators for the small graph atlas.

See “An Atlas of Graphs” by Ronald C. Read and Robin J. Wilson, Oxford University Press, 1998.

Because of its size, this module is not imported by default.

Classic

Generators for some classic graphs.

The typical graph generator is called as follows:

>>> G=nx.complete_graph(100)

returning the complete graph on n nodes labeled 0,..,99 as a simple graph. Except for empty_graph, all the generators in this module return a Graph class (i.e. a simple, undirected graph).

Small

Various small and named graphs, together with some compact generators.

Random Graphs

Generators for random graphs.

Degree Sequence

Generate graphs with a given degree sequence or expected degree sequence.

Directed

Generators for some directed graphs.

gn_graph: growing network gnc_graph: growing network with copying gnr_graph: growing network with redirection scale_free_graph: scale free directed graph

Geometric

Generators for geometric graphs.

Hybrid

Hybrid

Bipartite

Generators and functions for bipartite graphs.

Line Graph

Line graphs.

Ego Graph

Ego graph.

Stochastic

Stocastic graph.