Graph

Represents a module dependency graph.

Members

Functions

addEdge
Edge addEdge(Vertex from, Vertex to)
Edge addEdge(size_t id1, size_t id2)

Adds an edge between two vertices to the graph.

addVertex
void addVertex(Vertex vertex)

Adds a vertex to the graph and sets its ID.

detectCycles
void detectCycles()

Walks the graph and marks cyclic vertices and edges.

findTarjansSCCs
Vertex[][] findTarjansSCCs()

Returns a list of strongly connected components using Tarjan's algorithm.

Variables

edges
Edge[] edges;

The edges or import statements.

vertices
Vertex[] vertices;

The vertices or modules.

Meta