/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Kurtosis to copy * @param dest Kurtosis to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(Kurtosis source, Kurtosis dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.moment = source.moment.copy(); dest.incMoment = source.incMoment; }
public static void main(String[] args) { final double[] values = new java.util.Random().doubles(5000).toArray(); final Kurtosis stat1 = new Kurtosis(); final org.apache.commons.math3.stat.descriptive.moment.Kurtosis stat2 = new org.apache.commons.math3.stat.descriptive.moment.Kurtosis(); for (double value : values) { stat1.add(value); stat2.increment(value); } final double result1 = stat1.getValue(); final double result2 = stat2.getResult(); if (result1 != result2) { throw new RuntimeException("Error: " + result1 + " != " + result2); } }
public Kurtosis() { super(new org.apache.commons.math3.stat.descriptive.moment.Kurtosis()); } }
/** * Copy constructor, creates a new {@code Kurtosis} identical * to the {@code original} * * @param original the {@code Kurtosis} instance to copy * @throws NullArgumentException if original is null */ public Kurtosis(Kurtosis original) throws NullArgumentException { copy(original, this); }
if (test(values, begin, length) && length > 3) {
public Kurtosis() { super(new org.apache.commons.math3.stat.descriptive.moment.Kurtosis()); } }
/** * Copy constructor, creates a new {@code Kurtosis} identical * to the {@code original} * * @param original the {@code Kurtosis} instance to copy * @throws NullArgumentException if original is null */ public Kurtosis(Kurtosis original) throws NullArgumentException { copy(original, this); }
if (test(values, begin, length) && length > 3) {
return new GeometricMean(); case Kurtosis: return new Kurtosis(); case Max: return new Max();
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Kurtosis to copy * @param dest Kurtosis to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(Kurtosis source, Kurtosis dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.moment = source.moment.copy(); dest.incMoment = source.incMoment; }
/** * Copy constructor, creates a new {@code Kurtosis} identical * to the {@code original} * * @param original the {@code Kurtosis} instance to copy * @throws NullArgumentException if original is null */ public Kurtosis(Kurtosis original) throws NullArgumentException { copy(original, this); }
if (test(values, begin, length) && length > 3) {
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Kurtosis to copy * @param dest Kurtosis to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(Kurtosis source, Kurtosis dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.moment = source.moment.copy(); dest.incMoment = source.incMoment; }