
public class WeightedDistanceFunction extends AbstractVectorDoubleDistanceFunction
| Modifier and Type | Field and Description |
|---|---|
protected Matrix |
weightMatrix
The weight matrix.
|
| Constructor and Description |
|---|
WeightedDistanceFunction(Matrix weightMatrix)
Provides the Weighted distance for feature vectors.
|
| Modifier and Type | Method and Description |
|---|---|
double |
doubleDistance(NumberVector<?> o1,
NumberVector<?> o2)
Computes the distance between two given Objects according to this distance
function.
|
VectorFieldTypeInformation<? super NumberVector<?>> |
getInputTypeRestriction()
Get the input data type of the function.
|
dimensionality, dimensionality, dimensionality, dimensionality, distance, getDistanceFactoryinstantiate, isMetric, isSymmetricclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinstantiate, isMetric, isSymmetricprotected Matrix weightMatrix
public WeightedDistanceFunction(Matrix weightMatrix)
weightMatrix - weight matrixpublic double doubleDistance(NumberVector<?> o1, NumberVector<?> o2)
PrimitiveDoubleDistanceFunctiono1 - first Objecto2 - second Objectpublic VectorFieldTypeInformation<? super NumberVector<?>> getInputTypeRestriction()
DistanceFunctiongetInputTypeRestriction in interface DistanceFunction<NumberVector<?>,DoubleDistance>getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?>,DoubleDistance>getInputTypeRestriction in class AbstractVectorDoubleDistanceFunction