rustworkx.generators.directed_empty_graph#
- directed_empty_graph(n, multigraph=True)#
Generate a directed empty graph with
nnodes 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)