
public class DimensionSelectingDistanceFunction extends AbstractSpatialDoubleDistanceNorm implements DimensionSelectingSubspaceDistanceFunction<NumberVector<?>,DoubleDistance>
| Modifier and Type | Class and Description |
|---|---|
static class |
DimensionSelectingDistanceFunction.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
dim
The dimension to be considered for distance computation.
|
static OptionID |
DIM_ID
Parameter for dimensionality.
|
| Constructor and Description |
|---|
DimensionSelectingDistanceFunction(int dim)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
doubleDistance(NumberVector<?> v1,
NumberVector<?> v2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
double |
doubleMinDist(SpatialComparable mbr1,
SpatialComparable mbr2)
Computes the distance between the two given MBRs according to this
distance function.
|
double |
doubleNorm(NumberVector<?> obj)
Compute the norm of object obj as double value.
|
boolean |
equals(Object obj) |
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
VectorTypeInformation<? super NumberVector<?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
int |
getSelectedDimension()
Returns the selected dimension.
|
BitSet |
getSelectedDimensions()
Deprecated.
|
void |
setSelectedDimensions(BitSet dimensions)
Sets the selected dimensions according to the set bits in the given BitSet.
|
instantiate, minDistnormdimensionality, dimensionality, dimensionality, dimensionality, distanceisMetric, isSymmetricclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstantiate, isMetric, isSymmetricdistancepublic static final OptionID DIM_ID
private int dim
public DimensionSelectingDistanceFunction(int dim)
dim - Dimensionpublic double doubleDistance(NumberVector<?> v1, NumberVector<?> v2)
doubleDistance in interface PrimitiveDoubleDistanceFunction<NumberVector<?>>v1 - first DatabaseObjectv2 - second DatabaseObjectpublic double doubleMinDist(SpatialComparable mbr1, SpatialComparable mbr2)
SpatialPrimitiveDoubleDistanceFunctiondoubleMinDist in interface SpatialPrimitiveDoubleDistanceFunction<NumberVector<?>>mbr1 - the first MBR objectmbr2 - the second MBR objectpublic double doubleNorm(NumberVector<?> obj)
DoubleNormdoubleNorm in interface DoubleNorm<NumberVector<?>>obj - Objectpublic int getSelectedDimension()
@Deprecated public BitSet getSelectedDimensions()
DimensionSelectingSubspaceDistanceFunctiongetSelectedDimensions in interface DimensionSelectingSubspaceDistanceFunction<NumberVector<?>,DoubleDistance>public void setSelectedDimensions(BitSet dimensions)
DimensionSelectingSubspaceDistanceFunctionsetSelectedDimensions in interface DimensionSelectingSubspaceDistanceFunction<NumberVector<?>,DoubleDistance>dimensions - a BitSet designating the new selected dimensionspublic VectorTypeInformation<? super NumberVector<?>> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector<?>,DoubleDistance>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>getInputTypeRestriction in class AbstractVectorDoubleDistanceFunctionpublic DoubleDistance getDistanceFactory()
DistanceFunctiongetDistanceFactory in interface DistanceFunction<NumberVector<?>,DoubleDistance>getDistanceFactory in class AbstractVectorDoubleDistanceFunction