# networkx.algorithms.euler.eulerize¶

eulerize(G)[source]

Transforms a graph into an Eulerian graph

Parameters: G (NetworkX graph) – An undirected graph G NetworkX multigraph NetworkXError – If the graph is not connected.

References

 [1] J. Edmonds, E. L. Johnson. Matching, Euler tours and the Chinese postman. Mathematical programming, Volume 5, Issue 1 (1973), 111-114. [2] https://en.wikipedia.org/wiki/Eulerian_path

Examples

>>> G = nx.complete_graph(10)
>>> H = nx.eulerize(G)
>>> nx.is_eulerian(H)
True