Interface ShortestPathResult

    • Method Detail

      • createPath

        <T extends SimpleDirectedPath> T createPath​(DirectedPathFactory<T> pathFactory,
                                                    DirectedVertex origin,
                                                    DirectedVertex destination)
        Create the path from the provided origin to a specified destination vertex, using the results available. The path builder is used to create the instance of the path.
        Type Parameters:
        T - type of path
        Parameters:
        pathFactory - to use for creating path instances
        origin - the specified origin vertex
        destination - the specified destination vertex
        Returns:
        the path that is created, when no path could be extracted null is returned
      • getNextEdgeSegmentForVertex

        EdgeSegment getNextEdgeSegmentForVertex​(Vertex vertex)
        Find the next edge segment for a given vertex, depending on the underlying search this can be either in upstream or downstream direction
        Parameters:
        vertex - to get next segment for
        Returns:
        next edge segment
      • forEachNextEdgeSegment

        default int forEachNextEdgeSegment​(DirectedVertex startVertex,
                                           DirectedVertex endVertex,
                                           Consumer<EdgeSegment> nextEdgeSegmentConsumer)
        apply consumer to each edge segment on path. Depending on the type of shortest path (direction), the next segment is either in the backward direction from destination to origin (one-to-all) or in the forward direction from the origin to the destination (all-to-one). This depends on the implementation of the getNextEdgeSegmentForVertex(Vertex). If path does not lead to origin/destination, the loop terminates when no more next edge segment is found anymore
        Parameters:
        startVertex - to use
        endVertex - to use
        nextEdgeSegmentConsumer - to apply to each next segment on the path
        Returns:
        number of edge segments traversed on the path