All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.TKnudsen.ComplexDataObject.data.uncertainty.Double.ValueUncertainty Maven / Gradle / Ivy

Go to download

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 values) { initialize(values); } private void initialize(Collection 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