rustworkx.digraph_complement#

digraph_complement(graph, /)#

Compute the complement of a directed graph.

Parameters:

graph (PyDiGraph) – The graph to be used.

Returns:

The complement of the graph.

Return type:

PyDiGraph

Note

Parallel edges and self-loops are never created, even if the multigraph attribute is set to True