public class VALPNormDistance
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double[][] |
lookup
Lookup table for grid cells.
|
private double |
onebyp
Value of 1/p for lP norm.
|
private VectorApproximation |
queryApprox
Approximation of the query vector.
|
Constructor and Description |
---|
VALPNormDistance(double p,
double[][] splitPositions,
NumberVector query,
VectorApproximation queryApprox)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
getMaxDist(VectorApproximation vec)
Get the maximum distance.
|
double |
getMinDist(VectorApproximation vec)
Get the minimum distance to approximated vector vec.
|
double |
getPartialMaxDist(int dimension,
int vp)
Get the maximum distance contribution of a single dimension.
|
double |
getPartialMaxMaxDist(int dimension)
Get the maximum distance.
|
double |
getPartialMinDist(int dimension,
int vp)
Get the minimum distance contribution of a single dimension.
|
private void |
initializeLookupTable(double[][] splitPositions,
NumberVector query,
double p)
Initialize the lookup table.
|
private final double onebyp
private double[][] lookup
private VectorApproximation queryApprox
public VALPNormDistance(double p, double[][] splitPositions, NumberVector query, VectorApproximation queryApprox)
p
- Value of psplitPositions
- Split positionsquery
- Query vectorqueryApprox
- Query approximationpublic double getPartialMinDist(int dimension, int vp)
dimension
- Dimensionvp
- Vector positionpublic double getMinDist(VectorApproximation vec)
vec
- Vector approximationpublic double getPartialMaxDist(int dimension, int vp)
dimension
- Dimensionvp
- Vector positionpublic double getMaxDist(VectorApproximation vec)
vec
- Approximation vectorpublic double getPartialMaxMaxDist(int dimension)
dimension
- Dimensionprivate void initializeLookupTable(double[][] splitPositions, NumberVector query, double p)
splitPositions
- Split positionsquery
- Query vectorp
- pCopyright © 2019 ELKI Development Team. License information.