Package de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.clustermerge
Class DistanceMatrixComputationJob
java.lang.Object
de.uni_mannheim.informatik.dws.melt.matching_jena_matchers.multisource.dispatchers.clustermerge.DistanceMatrixComputationJob
- All Implemented Interfaces:
Callable<DistanceMatrixComputationResult>
public class DistanceMatrixComputationJob
extends Object
implements Callable<DistanceMatrixComputationResult>
The job/callable to compute the distance matrix in parallel.
This is only for euclidean distance.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDistanceMatrixComputationJob
(double[][] fullArray, int i, int j, int step, boolean squared) -
Method Summary
Modifier and TypeMethodDescriptioncall()
static double[][]
computeDistanceMatrix
(double[][] A, double[][] B, boolean squared) private static double[][]
extractSubArray
(double[][] from, int fromIndex, int toIndex)
-
Field Details
-
fullArray
private final double[][] fullArray -
i
private final int i -
j
private final int j -
step
private final int step -
squared
private final boolean squaredif true, the euclidean distance is squared which means the square root is not computed.
-
-
Constructor Details
-
DistanceMatrixComputationJob
public DistanceMatrixComputationJob(double[][] fullArray, int i, int j, int step, boolean squared)
-
-
Method Details
-
call
- Specified by:
call
in interfaceCallable<DistanceMatrixComputationResult>
- Throws:
Exception
-
extractSubArray
private static double[][] extractSubArray(double[][] from, int fromIndex, int toIndex) -
computeDistanceMatrix
public static double[][] computeDistanceMatrix(double[][] A, double[][] B, boolean squared)
-