Class ShortestResultGeneralised

    • Field Detail

      • vertexMeasuredCost

        protected final double[] vertexMeasuredCost
        the costs found by a shortest path run
      • getVertexAtExtreme

        protected Function<EdgeSegment,​DirectedVertex> getVertexAtExtreme
        depending on configuration this function collects vertex at desired edge segment extremity
    • Constructor Detail

      • ShortestResultGeneralised

        protected ShortestResultGeneralised​(double[] vertexMeasuredCost,
                                            ShortestSearchType searchType)
        Constructor only to be used by shortest X algorithms
        Parameters:
        vertexMeasuredCost - measured costs to get to the vertex (by id)
        searchType - used (one-to-all, all-to-one, etc)
    • Method Detail

      • getStartEndVertexForResultTraversal

        protected Pair<DirectedVertex,​DirectedVertex> getStartEndVertexForResultTraversal​(DirectedVertex origin,
                                                                                                DirectedVertex destination)
        Determine the start and end vertex to use for constructing the path depending on the search type used in the preceding shortest path search
        Parameters:
        origin - of to be constructed path
        destination - of to be constructed path
        Returns:
        order in which origin and destination are to be encountered when traversing search results
      • getNextVertexForEdgeSegment

        public DirectedVertex getNextVertexForEdgeSegment​(EdgeSegment edgeSegment)
        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
      • 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