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.is_directed_acyclic_graph#

is_directed_acyclic_graph(graph, /)#

Check that the PyDiGraph or PyDAG doesn’t have a cycle

Parameters:

graph (PyDiGraph) – The graph to check for cycles

Returns:

True if there are no cycles in the input graph, False if there are cycles

Return type:

bool