Package org.onlab.graph
Interface Path<V extends Vertex,E extends Edge<V>>
-
- Type Parameters:
V
- vertex typeE
- edge type
- All Superinterfaces:
Edge<V>
- All Known Subinterfaces:
MutablePath<V,E>
- All Known Implementing Classes:
DefaultMutablePath
,DefaultPath
,DisjointPathPair
public interface Path<V extends Vertex,E extends Edge<V>> extends Edge<V>
Representation of a path in a graph as a sequence of edges. Paths are assumed to be continuous, where adjacent edges must share a vertex.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Weight
cost()
Returns the total cost of the path as a weight object.List<E>
edges()
Returns the list of edges comprising the path.
-
-
-
Method Detail
-
edges
List<E> edges()
Returns the list of edges comprising the path. Adjacent edges will share the same vertex, meaning that a source of one edge, will be the same as the destination of the prior edge.- Returns:
- list of path edges
-
cost
Weight cost()
Returns the total cost of the path as a weight object.- Returns:
- path cost as a weight object
-
-