/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source StandardDeviation to copy * @param dest StandardDeviation to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(StandardDeviation source, StandardDeviation dest) { dest.setData(source.getDataRef()); dest.variance = source.variance.copy(); }
/** * 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 NullPointerException if either source or dest is null */ public static void copy(Kurtosis source, Kurtosis dest) { dest.setData(source.getDataRef()); dest.moment = source.moment.copy(); dest.incMoment = source.incMoment; }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Skewness to copy * @param dest Skewness to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(Skewness source, Skewness dest) { dest.setData(source.getDataRef()); dest.moment = new ThirdMoment(source.moment.copy()); dest.incMoment = source.incMoment; } }
/** Constructs a VectorialMean. * @param dimension vectors dimension */ public VectorialMean(int dimension) { means = new Mean[dimension]; for (int i = 0; i < dimension; ++i) { means[i] = new Mean(); } }
/** * {@inheritDoc} */ @Override public StandardDeviation copy() { StandardDeviation result = new StandardDeviation(); copy(this, result); return result; }
/** * {@inheritDoc} */ @Override public ThirdMoment copy() { ThirdMoment result = new ThirdMoment(); copy(this, result); return result; }
/** * Constructs a Variance with default (true) <code>isBiasCorrected</code> * property. */ public Variance() { moment = new SecondMoment(); }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Mean to copy * @param dest Mean to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(Mean source, Mean dest) { dest.setData(source.getDataRef()); dest.incMoment = source.incMoment; dest.moment = source.moment.copy(); } }
/** * {@inheritDoc} */ @Override public void clear() { if (incMoment) { moment.clear(); } }
/** * @return Returns the isBiasCorrected. */ public boolean isBiasCorrected() { return variance.isBiasCorrected(); }
/** * {@inheritDoc} */ @Override public void clear() { if (incMoment) { moment.clear(); } }
/** * {@inheritDoc} */ @Override public void increment(final double d) { if (incMoment) { moment.increment(d); } }
/** * {@inheritDoc} */ @Override public void increment(final double d) { if (incMoment) { moment.increment(d); } }
/** * Copy constructor, creates a new {@code Mean} identical * to the {@code original} * * @param original the {@code Mean} instance to copy */ public Mean(Mean original) { copy(original, this); }
/** * Copy constructor, creates a new {@code Skewness} identical * to the {@code original} * * @param original the {@code Skewness} instance to copy */ public Skewness(Skewness original) { copy(original, this); }
/** * Copy constructor, creates a new {@code FourthMoment} identical * to the {@code original} * * @param original the {@code FourthMoment} instance to copy */ public FourthMoment(FourthMoment original) { super(); copy(original, this); }
/** * Copy constructor, creates a new {@code Variance} identical * to the {@code original} * * @param original the {@code Variance} instance to copy */ public Variance(Variance original) { copy(original, this); }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source SecondMoment to copy * @param dest SecondMoment to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(SecondMoment source, SecondMoment dest) { FirstMoment.copy(source, dest); dest.m2 = source.m2; }
/** * {@inheritDoc} */ @Override public void clear() { super.clear(); m2 = Double.NaN; }