![JAR search and dependency download from the Maven repository](/logo.png)
com.github.TKnudsen.ComplexDataObject.data.uncertainty.Double.NumericalUncertainty Maven / Gradle / Ivy
package com.github.TKnudsen.ComplexDataObject.data.uncertainty.Double;
import java.util.Collection;
import com.github.TKnudsen.ComplexDataObject.data.uncertainty.IUncertaintyQuantitative;
import com.github.TKnudsen.ComplexDataObject.model.tools.StatisticsSupport;
/**
*
* Title: NumericalUncertainty
*
*
*
* Description: data model for uncertainties of numerical values.
*
*
*
* Copyright: Copyright (c) 2015-2017
*
*
* @author Juergen Bernard
* @version 1.02
*/
public class NumericalUncertainty implements IUncertaintyQuantitative {
private Double min;
private Double max;
private Double representant;
private double variation;
public NumericalUncertainty(Collection extends Double> values) {
initialize(values);
}
private void initialize(Collection extends Double> values) {
StatisticsSupport statisticsSupport = new StatisticsSupport(values);
this.min = statisticsSupport.getMin();
this.max = statisticsSupport.getMax();
this.representant = statisticsSupport.getMedian();
this.variation = statisticsSupport.getVariance();
}
@Override
public Double getRepresentant() {
return representant;
}
@Override
public Double getMinimum() {
return min;
}
@Override
public Double getMaximum() {
return max;
}
@Override
public double getVariation() {
return variation;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy