List of usage examples for org.apache.commons.math.stat.descriptive.moment StandardDeviation StandardDeviation
public StandardDeviation(boolean isBiasCorrected)
isBiasCorrected
property. From source file:jsprit.core.algorithm.termination.VariationCoefficientTermination.java
@Override public boolean isPrematureBreak(DiscoveredSolution discoveredSolution) { if (discoveredSolution.isAccepted()) { lastAccepted = discoveredSolution.getSolution(); solutionValues[currentIteration] = discoveredSolution.getSolution().getCost(); } else {//from w w w .j a v a 2s . c o m if (lastAccepted != null) { solutionValues[currentIteration] = lastAccepted.getCost(); } else solutionValues[currentIteration] = Integer.MAX_VALUE; } if (currentIteration == (noIterations - 1)) { double mean = StatUtils.mean(solutionValues); double stdDev = new StandardDeviation(true).evaluate(solutionValues, mean); double variationCoefficient = stdDev / mean; if (variationCoefficient < variationCoefficientThreshold) { return true; } } return false; }
From source file:org.beedraz.semantics_II.expression.number.real.double64.stat.DoublePopulationStandardDeviationBeed.java
/** * @post getSource() == null;//from w w w .j ava2 s.c o m * @post getDouble() == null; * @post owner != null ? owner.registerAggregateElement(this); */ public DoublePopulationStandardDeviationBeed(AggregateBeed owner) { super(new StandardDeviation(false), owner); }
From source file:org.beedraz.semantics_II.expression.number.real.double64.stat.DoubleSampleStandardDeviationBeed.java
/** * @post getSource() == null;/* ww w . j a va2 s . co m*/ * @post getDouble() == null; * @post owner != null ? owner.registerAggregateElement(this); */ public DoubleSampleStandardDeviationBeed(AggregateBeed owner) { super(new StandardDeviation(true), owner); }