|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.mit.csail.sdg.alloy4.DirectedGraph<N>
N - - the type of nodepublic final class DirectedGraph<N>
Mutable; implements a directed graph; null node is allowed.
Note: it uses n1==n2 for comparing nodes rather than using n1.equals(n2)
| Constructor Summary | |
|---|---|
DirectedGraph()
Constructs an empty graph. |
|
| Method Summary | |
|---|---|
void |
addEdge(N start,
N end)
Add a directed edge from start node to end node (if there wasn't such an edge already). |
boolean |
hasPath(N start,
N end)
Returns whether there is a directed path from start node to end node by following directed edges 0 or more times (breath-first). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectedGraph()
| Method Detail |
|---|
public void addEdge(N start,
N end)
public boolean hasPath(N start,
N end)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||