Package it.unimi.dsi.stat
Class Jackknife.AbstractStatistic
- java.lang.Object
-
- it.unimi.dsi.stat.Jackknife.AbstractStatistic
-
- All Implemented Interfaces:
Jackknife.Statistic
- Enclosing class:
- Jackknife
public abstract static class Jackknife.AbstractStatistic extends Object implements Jackknife.Statistic
An abstract statistic with a template method that accepts an array of doubles, returns an array of doubles and handles the data conversions that are necessary to callJackknife.Statistic.compute(BigDecimal[], MathContext). Useful if you do not want to fiddle withBigDecimal.
-
-
Constructor Summary
Constructors Constructor Description AbstractStatistic()
-
Method Summary
Modifier and Type Method Description abstract double[]compute(double[] sample)BigDecimal[]compute(BigDecimal[] bigSample, MathContext unused)Computes the statistic.
-
-
-
Method Detail
-
compute
public abstract double[] compute(double[] sample)
-
compute
public BigDecimal[] compute(BigDecimal[] bigSample, MathContext unused)
Description copied from interface:Jackknife.StatisticComputes the statistic.Note that the
BigDecimalinstances passed to this method are guaranteed to have a scale set by the caller. If you have to perform divisions, please use the suppliedMathContext.- Specified by:
computein interfaceJackknife.Statistic- Parameters:
bigSample- the samples over which the statistic must be computed.unused- the mathematical context to be used when dividing big decimals.- Returns:
- the resulting statistic.
-
-