|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Nested Class Summary | |
static class |
DirectedGraph.DirectedEdge
|
| Nested classes inherited from class org.metasyntactic.math.Graph |
Graph.Path |
| Method Summary | |
int |
inDegree(java.lang.Object vertex)
In a directed graph, the in-degree of a vertex is the number of edges entering it. |
boolean |
isStronglyConnected()
A directed class is strongly connected if every two vertices are reachable from each other. |
int |
outDegree(java.lang.Object vertex)
In a directed graph, the out-degree of a vertex is the number of edges leaving it |
UndirectedGraph |
toUndirectedGraph()
Given a directed graph G = (V, E), the undirected graph of G is the undirected graph G' = (V, E'), where (u, v) ∈ E' if and only if u ≠ v and (u, v) ∈ E. |
| Methods inherited from interface org.metasyntactic.math.Graph |
addEdge, addVertex, areAdjacent, containsEdge, containsVertex, degree, getEdges, getVertices, induce, isReachable, isSubgraph |
| Method Detail |
public UndirectedGraph toUndirectedGraph()
public boolean isStronglyConnected()
true If this directed graph is strongly connectedpublic int outDegree(java.lang.Object vertex)
vertex - The vertex you want to find out how many edges leave from
public int inDegree(java.lang.Object vertex)
vertex - The vertex you want to find out how many edges enter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||