Interface Path<V extends Vertex,​E extends Edge<V>>

  • Type Parameters:
    V - vertex type
    E - 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.
      java.util.List<E> edges()
      Returns the list of edges comprising the path.
      • Methods inherited from interface org.onlab.graph.Edge

        dst, src
    • Method Detail

      • edges

        java.util.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