Class KShortestPaths.PathWrapper

  • All Implemented Interfaces:
    GraphPath<V,​E>
    Enclosing class:
    KShortestPaths<V,​E>

    private class KShortestPaths.PathWrapper
    extends java.lang.Object
    implements GraphPath<V,​E>
    • Field Detail

      • edgeList

        private java.util.List<E> edgeList
    • Method Detail

      • getGraph

        public Graph<V,​E> getGraph()
        Description copied from interface: GraphPath
        Returns the graph over which this path is defined. The path may also be valid with respect to other graphs.
        Specified by:
        getGraph in interface GraphPath<V,​E>
        Returns:
        the containing graph
      • getStartVertex

        public V getStartVertex()
        Description copied from interface: GraphPath
        Returns the start vertex in the path.
        Specified by:
        getStartVertex in interface GraphPath<V,​E>
        Returns:
        the start vertex
      • getEndVertex

        public V getEndVertex()
        Description copied from interface: GraphPath
        Returns the end vertex in the path.
        Specified by:
        getEndVertex in interface GraphPath<V,​E>
        Returns:
        the end vertex
      • getEdgeList

        public java.util.List<E> getEdgeList()
        Description copied from interface: GraphPath
        Returns the edges making up the path. The first edge in this path is incident to the start vertex. The last edge is incident to the end vertex. The vertices along the path can be obtained by traversing from the start vertex, finding its opposite across the first edge, and then doing the same successively across subsequent edges; see GraphPath.getVertexList().

        Whether or not the returned edge list is modifiable depends on the path implementation.

        Specified by:
        getEdgeList in interface GraphPath<V,​E>
        Returns:
        list of edges traversed by the path
      • getWeight

        public double getWeight()
        Description copied from interface: GraphPath
        Returns the weight assigned to the path. Typically, this will be the sum of the weights of the edge list entries (as defined by the containing graph), but some path implementations may use other definitions.
        Specified by:
        getWeight in interface GraphPath<V,​E>
        Returns:
        the weight of the path
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object