/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source GeometricMean to copy * @param dest GeometricMean to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(GeometricMean source, GeometricMean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.sumOfLogs = source.sumOfLogs.copy(); }
MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.maxImpl = source.maxImpl.copy(); dest.minImpl = source.minImpl.copy(); dest.sumImpl = source.sumImpl.copy(); dest.sumLogImpl = source.sumLogImpl.copy(); dest.sumsqImpl = source.sumsqImpl.copy(); dest.secondMoment = source.secondMoment.copy(); dest.n = source.n; dest.varianceImpl = new Variance(dest.secondMoment); } else { dest.varianceImpl = source.varianceImpl.copy(); dest.meanImpl = source.meanImpl.copy(); dest.geoMeanImpl = source.geoMeanImpl.copy();
/** * Return a new instance of this statistic implementation. * N.B. must call clear(n) before using the result. * @return A new instance of this statistic implementation. */ @Override public UnivariateAggregator get() { return new StorelessStatistic(this, statImpl.copy()); } }
/** * Return a new instance of this statistic implementation. * @return A new instance of this statistic implementation. */ @Override public JsonUnivariateAggregator get() { return new JsonStorelessStatistic(this, statImpl.copy()); } }
MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.maxImpl = source.maxImpl.copy(); dest.minImpl = source.minImpl.copy(); dest.sumImpl = source.sumImpl.copy(); dest.sumLogImpl = source.sumLogImpl.copy(); dest.sumsqImpl = source.sumsqImpl.copy(); dest.secondMoment = source.secondMoment.copy(); dest.n = source.n; dest.varianceImpl = new Variance(dest.secondMoment); } else { dest.varianceImpl = source.varianceImpl.copy(); dest.meanImpl = source.meanImpl.copy(); dest.geoMeanImpl = source.geoMeanImpl.copy();
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source GeometricMean to copy * @param dest GeometricMean to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(GeometricMean source, GeometricMean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.sumOfLogs = source.sumOfLogs.copy(); }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source GeometricMean to copy * @param dest GeometricMean to copy to * @throws NullArgumentException if either source or dest is null */ public static void copy(GeometricMean source, GeometricMean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.sumOfLogs = source.sumOfLogs.copy(); }
MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.maxImpl = source.maxImpl.copy(); dest.minImpl = source.minImpl.copy(); dest.sumImpl = source.sumImpl.copy(); dest.sumLogImpl = source.sumLogImpl.copy(); dest.sumsqImpl = source.sumsqImpl.copy(); dest.secondMoment = source.secondMoment.copy(); dest.n = source.n; dest.varianceImpl = new Variance(dest.secondMoment); } else { dest.varianceImpl = source.varianceImpl.copy(); dest.meanImpl = source.meanImpl.copy(); dest.geoMeanImpl = source.geoMeanImpl.copy();