Class TLcdPartitionedShortestRoutePreprocessor
java.lang.Object
com.luciad.network.algorithm.routing.TLcdPartitionedShortestRoutePreprocessor
Preprocesses partitioned graphs for the partitioned shortest route algorithm.
The result of the preprocessing is an
ILcdShortestRouteDistanceTableProvider
,
containing a set of TLcdShortestRouteDistanceTable
(one for each partition).
Note that the preprocessing result is specific for the given
ILcdPartitionedGraph
and given ILcdEdgeValueFunction
.
Modifying the partitioning scheme or one or more of the edges/nodes contained
in it, or modifying the edge value function requires a new preprocessing
step. Otherwise, optimal routing results are not guaranteed anymore.- Since:
- 5.1
-
Constructor Summary
ConstructorDescriptionConstructs a newTLcdPartitionedShortestRoutePreprocessor
. -
Method Summary
Modifier and TypeMethodDescription<N,
E> ILcdShortestRouteDistanceTableProvider <N, E> preprocess
(ILcdPartitionedGraph<N, E> aGraph, ILcdEdgeValueFunction<N, E> aEdgeValueFunction, ILcdDistanceFunction<N, E> aHeuristicDistanceFunction) Preprocesses the given partitioned graph, and returns the resultingILcdShortestRouteDistanceTableProvider
.<N,
E> void preprocess
(ILcdPartitionedGraph<N, E> aGraph, ILcdEdgeValueFunction<N, E> aEdgeValueFunction, ILcdDistanceFunction<N, E> aHeuristicDistanceFunction, ILcdEditableShortestRouteDistanceTableProvider<N, E> aDistanceTableProviderSFCT) Preprocesses the given partitioned graph.
-
Constructor Details
-
TLcdPartitionedShortestRoutePreprocessor
public TLcdPartitionedShortestRoutePreprocessor()Constructs a newTLcdPartitionedShortestRoutePreprocessor
.
-
-
Method Details
-
preprocess
public <N,E> void preprocess(ILcdPartitionedGraph<N, E> aGraph, ILcdEdgeValueFunction<N, E> aEdgeValueFunction, ILcdDistanceFunction<N, E> aHeuristicDistanceFunction, ILcdEditableShortestRouteDistanceTableProvider<N, E> aDistanceTableProviderSFCT) Preprocesses the given partitioned graph. The computed distance tables are stored in the specified distance table provider. Only those partitions will be preprocessed for which no distance table is available yet.- Parameters:
aGraph
- the graph to be preprocessed.aEdgeValueFunction
- the edge value function that will be used in the routing algorithm.aHeuristicDistanceFunction
- a heuristic distance function - not required.aDistanceTableProviderSFCT
- the distance table provider in which the computed distance tables should be stored.- Throws:
NullPointerException
- if the given graph or edge value function isnull
.
-
preprocess
public <N,E> ILcdShortestRouteDistanceTableProvider<N,E> preprocess(ILcdPartitionedGraph<N, E> aGraph, ILcdEdgeValueFunction<N, E> aEdgeValueFunction, ILcdDistanceFunction<N, E> aHeuristicDistanceFunction) Preprocesses the given partitioned graph, and returns the resultingILcdShortestRouteDistanceTableProvider
.- Parameters:
aGraph
- the graph to be preprocessed.aEdgeValueFunction
- the edge value function that will be used in the routing algorithm.aHeuristicDistanceFunction
- a heuristic distance function - not required.- Returns:
- a distance table provider with distance tables for all partitions in the graph.
- Throws:
NullPointerException
- if the given graph or edge value function isnull
.
-