Package dev.nm.graph
Interface DAGraph<V,E extends Arc<V>>
-
- Type Parameters:
V
- vertex typeE
- arc type
- All Known Subinterfaces:
RootedTree<V,E>
- All Known Implementing Classes:
SparseDAGraph
,SparseTree
,VertexTree
public interface DAGraph<V,E extends Arc<V>> extends DiGraph<V,E>
A directed acyclic graph (DAG), is a directed graph with no directed cycles. A graph has no directed cycles if and only if it has a topological ordering.- See Also:
- Wikipedia: Directed acyclic graph
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
topologicalOrder(V v)
Get the topological order of a vertex.-
Methods inherited from interface dev.nm.graph.DiGraph
children, incomingArcs, outgoingArcs, parents
-
Methods inherited from interface dev.nm.graph.Graph
addEdge, addVertex, edges, edges, removeEdge, removeVertex, vertices
-
-
-
-
Method Detail
-
topologicalOrder
int topologicalOrder(V v)
Get the topological order of a vertex.- Parameters:
v
- a vertex- Returns:
- the topological order of a vertex
-
-