- Type Parameters:
T- the type of the nodes
A directed graph is a data structure consisting of nodes and arrows connecting those nodes which are called edges. In a directed graph edges are ordered pairs of respectively source and target nodes.
This implementation is adapted to small in-memory graphs.
- See Also:
DigraphConstructs a directed graph from a specification Map.
spec- the map defining a set of source nodes (keys) that are linked to a collection of adjacent target nodes (values). Both keys and values must not be
IllegalArgumentException- when a target node is not present in the sources nodes.
sortSort nodes in a topological ordering assuming that this graph is acyclic.
A graph without cycles is often called a Directed Acyclic Graph (DAG).