Class MinMaxPathResultImpl

    • Constructor Detail

      • MinMaxPathResultImpl

        protected MinMaxPathResultImpl​(double[] minVertexCost,
                                       EdgeSegment[] minCostBackwardEdgeSegments,
                                       double[] maxVertexCost,
                                       EdgeSegment[] maxCostBackwardEdgeSegments)
        Constructor
        Parameters:
        minVertexCost - found
        minCostBackwardEdgeSegments - found
        maxVertexCost - found
        maxCostBackwardEdgeSegments - found
    • Method Detail

      • setMinPathState

        public void setMinPathState​(boolean flag)
        Switch state to minimum path results
        Specified by:
        setMinPathState in interface MinMaxPathResult
        Parameters:
        flag - when true switch to minimum paths, otherwise switch to maximum paths. Default is minimum paths
      • createPath

        public <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.
        Specified by:
        createPath in interface ShortestPathResult
        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

        public 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
        Specified by:
        getNextEdgeSegmentForVertex in interface ShortestPathResult
        Parameters:
        vertex - to get next segment for
        Returns:
        next edge segment
      • getNextVertexForEdgeSegment

        public DirectedVertex getNextVertexForEdgeSegment​(EdgeSegment edgeSegment)
        Description copied from interface: ShortestResult
        Find the next vertex on the given edge segment extremity based on the underlying search this can be either in upstream or downstream direction
        Specified by:
        getNextVertexForEdgeSegment in interface ShortestResult
        Parameters:
        edgeSegment - to get next vertex for
        Returns:
        next vertex
      • getCostOf

        public double getCostOf​(Vertex vertex)
        Collect the cost to reach the given vertex from the reference starting point
        Specified by:
        getCostOf in interface ShortestResult
        Parameters:
        vertex - to collect cost for
        Returns:
        cost found
      • getSearchType

        public ShortestSearchType getSearchType()
        Provide the search type that was used to obtain this result
        Specified by:
        getSearchType in interface ShortestResult
        Returns:
        shortest path search type used to obtain result