Documentation
¶
Overview ¶
Package scc contains an implementation of Tarjan's algorithm, which converts a directed graph into a DAG of strongly-connected components (subgraphs such that every node is reachable from every other node).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component[Node comparable] struct { // contains filtered or unexported fields }
Component is a strongly connected component.
type DAG ¶
type DAG[Node comparable] struct { // contains filtered or unexported fields }
DAG represents the strongly connected component DAG of some arbitrary directed graph.
func Sort ¶
func Sort[Node comparable](root Node, graph Graph[Node]) *DAG[Node]
Sort sorts the strongly connected components of a directed graph represented by deps, using Tarjan's algorithm.
Click to show internal directories.
Click to hide internal directories.