|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectannas.graph.GraphPath<N,A>
N
- Node typeA
- Arc typepublic class GraphPath<N,A extends ArcInterface<N>>
Models a Path in a graph
Constructor Summary | |
---|---|
GraphPath(N start,
N end)
Constructor |
Method Summary | |
---|---|
void |
add(N node,
A arc)
Adds the next node into the path |
double |
getDistance()
Gets the distance between the start node and end node |
java.util.Iterator<N> |
getIterator()
Gets an iterator over the path |
int |
size()
Number of nodes in the path |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphPath(N start, N end)
start
- start node of the pathend
- end node of the pathMethod Detail |
---|
public void add(N node, A arc)
node
- Tailarc
- public int size()
public java.util.Iterator<N> getIterator()
public double getDistance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |