org.apache.commons.graph
Interface Path<V extends Vertex,E extends Edge<V>>

Type Parameters:
V - the Graph vertices type
E - the Graph edges type
All Known Subinterfaces:
WeightedPath<V,WE>
All Known Implementing Classes:
InMemoryPath

public interface Path<V extends Vertex,E extends Edge<V>>

A Path in a Graph is a sequence of Vertex such that from each of its vertices there is an Edge to the next Vertex in the sequence.


Method Summary
 List<E> getEdges()
          getEdges() - This returns a list of Edges which comprise the path.
 V getSource()
          Returns the source of the path.
 V getTarget()
          Returns the target of the path.
 List<V> getVertices()
          getVertices() - This returns a list of Vertices, in order as they go from Start to End.
 int size()
          size() - This returns the size of the path in terms of number of verticies it visits.
 

Method Detail

getSource

V getSource()
Returns the source of the path.


getTarget

V getTarget()
Returns the target of the path.


getVertices

List<V> getVertices()
getVertices() - This returns a list of Vertices, in order as they go from Start to End. This includes the Start and End vertex, and will have one more entry than the Edges list.


getEdges

List<E> getEdges()
getEdges() - This returns a list of Edges which comprise the path. It will have one less than the list of Vertices.


size

int size()
size() - This returns the size of the path in terms of number of verticies it visits.



Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.