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 call
Jackknife.Statistic.compute(BigDecimal[], MathContext)
. Useful if you do not
want to fiddle with BigDecimal
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract double[]
compute
(double[] sample) compute
(BigDecimal[] bigSample, MathContext unused) Computes the statistic.
-
Constructor Details
-
AbstractStatistic
public AbstractStatistic()
-
-
Method Details
-
compute
public abstract double[] compute(double[] sample) -
compute
Description copied from interface:Jackknife.Statistic
Computes the statistic.Note that the
BigDecimal
instances 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:
compute
in 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.
-