Note
This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
rustworkx.generators.directed_empty_graph#
- directed_empty_graph(n, multigraph=True)#
Generate a directed empty graph with
n
nodes and no edges.- Parameters:
n (int) – The number of nodes to generate the graph with.
- Returns:
The generated empty graph
- Return type:
import rustworkx.generators from rustworkx.visualization import mpl_draw graph = rustworkx.generators.directed_empty_graph(5) mpl_draw(graph)