Thrown if a cycle was detected.
Calculate connected components of the graph defined by hasEdge.
Calculate all shortest paths in DAG starting at start. The functions hasEdge and weight define the graphs structure and weights, respectively. Nodes are represented as size_t integers. The graph must be directed and acyclic (DAG).
Takes as input a bipartite graph and produces as output a maximum cardinality matching – a set of as many edges as possible with the property that no two edges share an endpoint.
Sort nodes of a DAG topologically. The graph structure is defined by hasEdge and n. Nodes are represented as size_t integers. The graph must be directed and acyclic (DAG).
This module contains graph algorithms.