|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A path of length k from a vertex u to a vertex u' in a Graph G = (V, E) is a sequence 〈v0, v1, 2, …, vk〉 of vertices such that u = v0, u' = vk, and (vi-1, vi) ∈ E for i = 1, 2, …, k.
| Method Summary | |
boolean |
containsEdge(Graph.Edge edge)
The path contains the edges (v0, v1), (v1, v2), …, (vk-1, vk). |
boolean |
containsVertex(java.lang.Object vertex)
The path contains the vertices v0, v1, 2, …, vk |
int |
getLength()
The length of the path is the number of edges in the path. |
boolean |
isSimple()
A path is simple if all vertices in the path are distinct. |
| Method Detail |
public int getLength()
public boolean containsVertex(java.lang.Object vertex)
true if this path contains this vertexpublic boolean containsEdge(Graph.Edge edge)
public boolean isSimple()
true if the path is simple
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||