Package oracle.spatial.network.lod
Class GeodeticPairwiseCostCalculator
- java.lang.Object
-
- oracle.spatial.network.lod.GeodeticPairwiseCostCalculator
-
- All Implemented Interfaces:
PairwiseCostCalculator
,XMLConfigurable
public class GeodeticPairwiseCostCalculator extends java.lang.Object implements PairwiseCostCalculator, XMLConfigurable
- Since:
- release specific (what release of product did this appear in)
-
-
Constructor Summary
Constructors Modifier Constructor Description GeodeticPairwiseCostCalculator()
protected
GeodeticPairwiseCostCalculator(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, NetworkExplorer ne)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
calculate(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix)
Computes the pairwise costs between two sets of points.Matrix<double[]>
getPairwiseCosts()
Returns the pairwise costs that was computed when calculate was called.Matrix<LogicalSubPath>
getPairwisePaths()
Returns the pairwise paths that was computed when calculate was called.java.lang.String
getXMLSchema()
Returns the XML schema for the input parameter.void
init(org.w3c.dom.Element parameter)
Initializes the XML configurable object with the input parameter.void
setNetworkAnalyst(NetworkAnalyst analyst)
This method allows caller to pass the network analyst object to this cost calculator 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.
-
-
-
Constructor Detail
-
GeodeticPairwiseCostCalculator
public GeodeticPairwiseCostCalculator()
-
GeodeticPairwiseCostCalculator
protected GeodeticPairwiseCostCalculator(int userDataCategory, int xCoordUserDataIndex, int yCoordUserDataIndex, NetworkExplorer ne)
-
-
Method Detail
-
calculate
public boolean calculate(PointOnNet[][] startPoints, PointOnNet[][] endPoints, LODNetworkConstraint constraint, Matrix<java.lang.Integer> pairwiseMatrix) throws LODNetworkException
Description copied from interface:PairwiseCostCalculator
Computes the pairwise costs between two sets of points.- Specified by:
calculate
in interfacePairwiseCostCalculator
- Parameters:
startPoints
- start point candidatesendPoints
- end point candidatesconstraint
- network constraintpairwiseMatrix
- a matrix that specifies for which pairs the costs need to be computed. If the matrix element for pair (i, j) is set to 0, then the cost from i to j does not need to be computed; otherwise it must be computed. If this parameter is set to null, then the costs for all pairs must be computed.- Returns:
- true if the pairwise paths are also computed in addition to the pairwise costs; false otherwise
- Throws:
LODNetworkException
-
getPairwisePaths
public Matrix<LogicalSubPath> getPairwisePaths()
Description copied from interface:PairwiseCostCalculator
Returns the pairwise paths that was computed when calculate was called. Returns null if the pairwise paths were not computed.- Specified by:
getPairwisePaths
in interfacePairwiseCostCalculator
- Returns:
-
getPairwiseCosts
public Matrix<double[]> getPairwiseCosts()
Description copied from interface:PairwiseCostCalculator
Returns the pairwise costs that was computed when calculate was called. The pairwise costs must have been computed when calculate was called.- Specified by:
getPairwiseCosts
in interfacePairwiseCostCalculator
- Returns:
-
setNetworkAnalyst
public void setNetworkAnalyst(NetworkAnalyst analyst)
Description copied from interface:PairwiseCostCalculator
This method allows caller to pass the network analyst object to this cost calculator 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 cost calculator, the calculator can choose to do nothing with this method.- Specified by:
setNetworkAnalyst
in interfacePairwiseCostCalculator
-
init
public void init(org.w3c.dom.Element parameter)
Description copied from interface:XMLConfigurable
Initializes the XML configurable object with the input parameter.- Specified by:
init
in interfaceXMLConfigurable
- Parameters:
parameter
- an XML element containing the necessary information to initialize the object.
-
getXMLSchema
public java.lang.String getXMLSchema()
Description copied from interface:XMLConfigurable
Returns the XML schema for the input parameter.- Specified by:
getXMLSchema
in interfaceXMLConfigurable
- Returns:
-
-