![JAR search and dependency download from the Maven repository](/logo.png)
com.github.TKnudsen.ComplexDataObject.data.uncertainty.Double.ValueUncertainty Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of complex-data-object Show documentation
Show all versions of complex-data-object Show documentation
A library that models real-world objects in Java, referred to as ComplexDataObjects. Other features: IO and preprocessing of ComplexDataObjects.
The newest version!
package com.github.TKnudsen.ComplexDataObject.data.uncertainty.Double;
import java.util.Collection;
import com.github.TKnudsen.ComplexDataObject.model.tools.StatisticsSupport;
/**
*
* Basic interface uncertainties of numerical values modeled as Double.
*
*
*
* Copyright: (c) 2015-2018 Juergen Bernard,
* https://github.com/TKnudsen/ComplexDataObject
*
*
* @author Juergen Bernard
* @version 1.06
*/
public class ValueUncertainty implements IValueUncertainty {
private Double amount;
public ValueUncertainty() {
super();
}
public ValueUncertainty(double amount) {
this.setAmount(amount);
}
public ValueUncertainty(Collection extends Double> values) {
initialize(values);
}
private void initialize(Collection extends Double> values) {
StatisticsSupport statisticsSupport = new StatisticsSupport(values);
this.setAmount(statisticsSupport.getMedian());
}
@Override
public String toString() {
return "ValueUncertainty. Amount: " + getAmount();
}
@Override
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy