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

      • createPath

        public DirectedPath createPath​(DirectedPathFactory pathFactory,
                                       Vertex origin,
                                       Vertex 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
        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
      • getCostToReach

        public double getCostToReach​(Vertex vertex)
        Collect the cost to reach the given vertex
        Specified by:
        getCostToReach in interface ShortestPathResult
        Parameters:
        vertex - to collect cost for
        Returns:
        cost found
      • 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