public abstract class AbstractVectorDoubleDistanceFunction extends AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance> implements PrimitiveDoubleDistanceFunction<NumberVector<?>>, NumberVectorDistanceFunction<DoubleDistance>
Constructor and Description |
---|
AbstractVectorDoubleDistanceFunction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
dimensionality(NumberVector<?> o1,
NumberVector<?> o2)
Get the common dimensionality of the two objects.
|
static int |
dimensionality(NumberVector<?> o1,
NumberVector<?> o2,
int expect)
Get the common dimensionality of the two objects.
|
static int |
dimensionality(SpatialComparable o1,
SpatialComparable o2)
Get the common dimensionality of the two objects.
|
static int |
dimensionality(SpatialComparable o1,
SpatialComparable o2,
int expect)
Get the common dimensionality of the two objects.
|
DoubleDistance |
distance(NumberVector<?> o1,
NumberVector<?> o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
SimpleTypeInformation<? super NumberVector<?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
instantiate, isMetric, isSymmetric
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doubleDistance
instantiate, isMetric, isSymmetric
public AbstractVectorDoubleDistanceFunction()
public SimpleTypeInformation<? super NumberVector<?>> getInputTypeRestriction()
DistanceFunction
getInputTypeRestriction
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
getInputTypeRestriction
in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
public final DoubleDistance distance(NumberVector<?> o1, NumberVector<?> o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
distance
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic DoubleDistance getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<NumberVector<?>,DoubleDistance>
getDistanceFactory
in class AbstractPrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>
public static final int dimensionality(SpatialComparable o1, SpatialComparable o2)
IllegalArgumentException
otherwise.o1
- First vector / MBRo2
- Second vector / MBRIllegalArgumentException
- when dimensionalities are not the same.public static final int dimensionality(SpatialComparable o1, SpatialComparable o2, int expect)
IllegalArgumentException
otherwise.o1
- First vector / MBRo2
- Second vector / MBRexpect
- Expected dimensionalityIllegalArgumentException
- when dimensionalities are not the same.public static final int dimensionality(NumberVector<?> o1, NumberVector<?> o2)
IllegalArgumentException
otherwise.o1
- First vector / MBRo2
- Second vector / MBRIllegalArgumentException
- when dimensionalities are not the same.public static final int dimensionality(NumberVector<?> o1, NumberVector<?> o2, int expect)
IllegalArgumentException
otherwise.o1
- First vector / MBRo2
- Second vector / MBRexpect
- Expected dimensionalityIllegalArgumentException
- when dimensionalities are not the same.