de.lmu.ifi.dbs.elki.distance.distancefunction
Class WeightedDistanceFunction
java.lang.Object
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractPrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractVectorDoubleDistanceFunction
de.lmu.ifi.dbs.elki.distance.distancefunction.WeightedDistanceFunction
- All Implemented Interfaces:
- DistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>, PrimitiveDoubleDistanceFunction<NumberVector<?,?>>, InspectionUtilFrequentlyScanned, Parameterizable
- Direct Known Subclasses:
- HSBHistogramQuadraticDistanceFunction, RGBHistogramQuadraticDistanceFunction
public class WeightedDistanceFunction
- extends AbstractVectorDoubleDistanceFunction
Provides the Weighted distance for feature vectors.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
weightMatrix
protected Matrix weightMatrix
- The weight matrix.
WeightedDistanceFunction
public WeightedDistanceFunction(Matrix weightMatrix)
- Provides the Weighted distance for feature vectors.
- Parameters:
weightMatrix - weight matrix
doubleDistance
public double doubleDistance(NumberVector<?,?> o1,
NumberVector<?,?> o2)
- Provides the Weighted distance for feature vectors.
- Parameters:
o1 - first Objecto2 - second Object
- Returns:
- the Weighted distance between the given two vectors
getInputTypeRestriction
public VectorFieldTypeInformation<? super NumberVector<?,?>> getInputTypeRestriction()
- Description copied from interface:
DistanceFunction
- Get the input data type of the function.
- Specified by:
getInputTypeRestriction in interface DistanceFunction<NumberVector<?,?>,DoubleDistance>- Specified by:
getInputTypeRestriction in interface PrimitiveDistanceFunction<NumberVector<?,?>,DoubleDistance>- Overrides:
getInputTypeRestriction in class AbstractVectorDoubleDistanceFunction
- Returns:
- Type restriction