Interface PairwiseCostCalculator

    • Method Detail

      • calculate

        boolean calculate​(PointOnNet[][] startPoints,
                          PointOnNet[][] endPoints,
                          LODNetworkConstraint constraint,
                          Matrix<java.lang.Integer> pairwiseMatrix)
                   throws LODNetworkException
        Computes the pairwise costs between two sets of points.
        Parameters:
        startPoints - start point candidates
        endPoints - end point candidates
        constraint - network constraint
        pairwiseMatrix - 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

        Matrix<LogicalSubPath> getPairwisePaths()
        Returns the pairwise paths that was computed when calculate was called. Returns null if the pairwise paths were not computed.
        Returns:
      • getPairwiseCosts

        Matrix<double[]> getPairwiseCosts()
        Returns the pairwise costs that was computed when calculate was called. The pairwise costs must have been computed when calculate was called.
        Returns:
      • setNetworkAnalyst

        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. If network analyst is not needed by the cost calculator, the calculator can choose to do nothing with this method.