![JAR search and dependency download from the Maven repository](/logo.png)
com.github.TKnudsen.ComplexDataObject.model.distanceMeasure.WeightedDistanceMeasure Maven / Gradle / Ivy
package com.github.TKnudsen.ComplexDataObject.model.distanceMeasure;
import java.util.List;
/**
*
* Title: WeightedDistanceMeasure
*
*
*
* Description:
*
*
*
* Copyright: Copyright (c) 2017
*
*
* @author Juergen Bernard
* @version 1.01
*/
public abstract class WeightedDistanceMeasure implements IWeightedDistanceMeasure {
private double nullValue;
private List weights;
public WeightedDistanceMeasure(List weights) {
this(weights, 0.5);
}
public WeightedDistanceMeasure(List weights, double nullValue){
setWeights(weights);
setNullValue(nullValue);
}
public double applyAsDouble(T t, T u) {
return getDistance(t, u);
}
/**
* @return the nullValue
*/
public double getNullValue() {
return nullValue;
}
@Override
public List getWeights() {
return weights;
}
/**
* @param nullValue the nullValue to set
*/
public void setNullValue(double nullValue) {
this.nullValue = nullValue;
}
public void setWeights(List weights) {
this.weights = weights;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy