Class DirectedGraph<V>
java.lang.Object
org.pf4j.util.DirectedGraph<V>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd an edge to the graph; if either vertex does not exist, it's added.voidAdd a vertex to the graph.booleancontainsVertex(V vertex) True if graph contains vertex.getNeighbors(V vertex) inDegree()Report (as aMap) the in-degree (the number of head ends adjacent to a vertex) of each vertex.booleanisDag()True if graph is a dag (directed acyclic graph).Report (as a Map) the out-degree (the number of tail ends adjacent to a vertex) of each vertex.voidremoveEdge(V from, V to) Remove an edge from the graph.voidremoveVertex(V vertex) Report (as a List) the reverse topological sort of the vertices; null for no such sort.Report (as a List) the topological sort of the vertices; null for no such sort.toString()String representation of graph.
-
Field Details
-
neighbors
-
-
Constructor Details
-
DirectedGraph
public DirectedGraph()
-
-
Method Details
-
addVertex
Add a vertex to the graph. Nothing happens if vertex is already in graph. -
containsVertex
True if graph contains vertex. -
removeVertex
-
addEdge
-
removeEdge
-
getNeighbors
-
outDegree
-
inDegree
-
topologicalSort
-
reverseTopologicalSort
-
isDag
public boolean isDag()True if graph is a dag (directed acyclic graph). -
toString
-