Skip to content

utils

Functions:

Name Description
is_dag

Determine if a graph is a directed acyclic graph (DAG).

is_dag

is_dag(graph: dict[str, set[str]]) -> bool

Determine if a graph is a directed acyclic graph (DAG).

Parameters:

Name Type Description Default
graph dict[str, set[str]]

The graph to check.

required

Returns:

Type Description
bool

Whether the graph is a DAG.