Package org.goplanit.algorithms.shortest
Interface ShortestResult
-
- All Known Subinterfaces:
MinMaxPathResult
,ShortestBushResult
,ShortestPathResult
- All Known Implementing Classes:
MinMaxPathResultImpl
,ShortestBushResultGeneralised
,ShortestPathResultGeneralised
,ShortestResultGeneralised
public interface ShortestResult
Base interface that defines how to access results of a shortest X execution allowing one to extract information- Author:
- markr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description double
getCostOf(Vertex vertex)
Collect the cost to reach the given vertex from the reference starting pointDirectedVertex
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 directionShortestSearchType
getSearchType()
Provide the search type that was used to obtain this resultdefault boolean
isInverted()
when search is inverted, result is also inverted, i.e., when search is one-to-x (regular), result is in upstream direction, when inverted, result is in downstream direction
-
-
-
Method Detail
-
getNextVertexForEdgeSegment
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- Parameters:
edgeSegment
- to get next vertex for- Returns:
- next vertex
-
getCostOf
double getCostOf(Vertex vertex)
Collect the cost to reach the given vertex from the reference starting point- Parameters:
vertex
- to collect cost for- Returns:
- cost found
-
getSearchType
ShortestSearchType getSearchType()
Provide the search type that was used to obtain this result- Returns:
- shortest path search type used to obtain result
-
isInverted
default boolean isInverted()
when search is inverted, result is also inverted, i.e., when search is one-to-x (regular), result is in upstream direction, when inverted, result is in downstream direction- Returns:
- true when search (and result) is inverted compared to regular one-to-x search, false otherwise
-
-