Package oracle.spatial.network.lod
Class DefaultPairwiseShortestPaths
- java.lang.Object
-
- oracle.spatial.network.lod.DefaultPairwiseShortestPaths
-
- All Implemented Interfaces:
PairwiseShortestPaths,XMLConfigurable
public class DefaultPairwiseShortestPaths extends java.lang.Object implements PairwiseShortestPaths, XMLConfigurable
This is the default pairwise shortest paths algorithm. It computes the pairwise shortest paths one by one using the input shortest path algorithm.- Since:
- 11gR2
-
-
Field Summary
Fields Modifier and Type Field Description protected LODAnalysisInfoinitialAnalysisInfoprotected ShortestPathspAlgorithm
-
Constructor Summary
Constructors Constructor Description DefaultPairwiseShortestPaths(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)Deprecated.DefaultPairwiseShortestPaths(ShortestPath spAlgorithm)Construct a DefaultPairwiseShortestPaths instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetXMLSchema()Returns the XML schema for the input parameter.voidinit(org.w3c.dom.Element parameter)Initializes the XML configurable object with the input parameter.voidsetInitialAnalysisInfo(LODAnalysisInfo analysisInfo)voidsetNetworkAnalyst(NetworkAnalyst analyst)This method allows caller to pass the network analyst object to this pairwise shortest paths implementation, so that the algorithm can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst.double[][]shortestPathCosts(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction)Returns the pair-wise shortest path cost between a set of candidate start points and end points.Matrix<LogicalSubPath>shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction)Returns the pair-wise shortest paths between a set of candidate start points and end points.Matrix<LogicalLightSubPath>shortestPathsLight(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction)Returns the pair-wise light weight shortest paths between a set of candidate start points and end points.voidshortestPathsLight(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction, PairwisePathResultIO pathIO)Computes the pair-wise light weight shortest paths between a set of candidate start points and end points, and outputs the light weight paths via PairwisePathResultIO.
-
-
-
Field Detail
-
initialAnalysisInfo
protected LODAnalysisInfo initialAnalysisInfo
-
spAlgorithm
protected ShortestPath spAlgorithm
-
-
Constructor Detail
-
DefaultPairwiseShortestPaths
public DefaultPairwiseShortestPaths(NetworkExplorer ne, LinkCostCalculator[] lccs, NodeCostCalculator[] nccs, ShortestPath spAlgorithm)
Deprecated.- Parameters:
ne-lccs-nccs-spAlgorithm-
-
DefaultPairwiseShortestPaths
public DefaultPairwiseShortestPaths(ShortestPath spAlgorithm)
Construct a DefaultPairwiseShortestPaths instance.- Parameters:
spAlgorithm-
-
-
Method Detail
-
setInitialAnalysisInfo
public void setInitialAnalysisInfo(LODAnalysisInfo analysisInfo)
-
shortestPaths
public Matrix<LogicalSubPath> shortestPaths(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction) throws LODNetworkException
Description copied from interface:PairwiseShortestPathsReturns the pair-wise shortest paths between a set of candidate start points and end points.- Specified by:
shortestPathsin interfacePairwiseShortestPaths- Parameters:
startPoints- array of start candidatesendPoints- array of end candidatesconstraint- network constraintpairwiseMatrix- a matrix that specifies for which pairs the shortest paths need to be computed. If the matrix element for pair (i, j) is set to 0, then the shortest path from i to j does not need to be computed; otherwise it must be computed. If this parameter is set to null, then the shortest paths for all pairs must be computed.- Returns:
- Throws:
LODNetworkException
-
shortestPathsLight
public Matrix<LogicalLightSubPath> shortestPathsLight(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction) throws LODNetworkException
Description copied from interface:PairwiseShortestPathsReturns the pair-wise light weight shortest paths between a set of candidate start points and end points.- Specified by:
shortestPathsLightin interfacePairwiseShortestPaths- Parameters:
startPoints- array of start candidatesendPoints- array of end candidatesconstraint- network constraintpairwiseMatrix- a matrix that specifies for which pairs the shortest paths need to be computed. If the matrix element for pair (i, j) is set to 0, then the shortest path from i to j does not need to be computed; otherwise it must be computed. If this parameter is set to null, then the shortest paths for all pairs must be computed.- Returns:
- Throws:
LODNetworkException
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:PairwiseShortestPathsThis method allows caller to pass the network analyst object to this pairwise shortest paths implementation, so that the algorithm can call the analysis functions provided by the network analyst, or access the network explorer associated with the network analyst. If network analyst is not needed by the algorithm, the algorithm can choose to do nothing with this method.- Specified by:
setNetworkAnalystin interfacePairwiseShortestPaths
-
init
public void init(org.w3c.dom.Element parameter)
Description copied from interface:XMLConfigurableInitializes the XML configurable object with the input parameter.- Specified by:
initin interfaceXMLConfigurable- Parameters:
parameter- an XML element containing the necessary information to initialize the object.
-
getXMLSchema
public java.lang.String getXMLSchema()
Description copied from interface:XMLConfigurableReturns the XML schema for the input parameter.- Specified by:
getXMLSchemain interfaceXMLConfigurable- Returns:
-
shortestPathsLight
public void shortestPathsLight(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction, PairwisePathResultIO pathIO) throws LODNetworkException
Description copied from interface:PairwiseShortestPathsComputes the pair-wise light weight shortest paths between a set of candidate start points and end points, and outputs the light weight paths via PairwisePathResultIO.- Specified by:
shortestPathsLightin interfacePairwiseShortestPaths- Parameters:
startPoints- array of start candidatesendPoints- array of end candidatesconstraint- network constraintpairwiseMatrix- a matrix that specifies for which pairs the shortest paths need to be computed. If the matrix element for pair (i, j) is set to 0, then the shortest path from i to j does not need to be computed; otherwise it must be computed. If this parameter is set to null, then the shortest paths for all pairs must be computed.- Throws:
LODNetworkException
-
shortestPathCosts
public double[][] shortestPathCosts(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix, int direction) throws LODNetworkException
Description copied from interface:PairwiseShortestPathsReturns the pair-wise shortest path cost between a set of candidate start points and end points. This method can be used when the caller is only interested in path costs. the light path results.- Specified by:
shortestPathCostsin interfacePairwiseShortestPaths- Parameters:
startPoints- array of start candidatesendPoints- array of end candidatesconstraint- network constraintpairwiseMatrix- a matrix that specifies for which pairs the shortest paths need to be computed. If the matrix element for pair (i, j) is set to 0, then the shortest path from i to j does not need to be computed; otherwise it must be computed. If this parameter is set to null, then the shortest paths for all pairs must be computed.- Returns:
- Throws:
LODNetworkException
-
-