public final class TopologicalSort extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
sort(Collection<T> vertices,
EdgeRelation<? super T> edgeRelation)
Apply topological ordering to a given collection.
|
public static <T> List<T> sort(Collection<T> vertices, EdgeRelation<? super T> edgeRelation)
T - the vertex typevertices - the vertices of the directed acyclic graphedgeRelation - the relation defining the edges of the graphCopyright © The Apache Software Foundation. All Rights Reserved.