/** * 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 NullArgumentException if either source or dest is null */ public static void copy(Mean source, Mean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.incMoment = source.incMoment; dest.moment = source.moment.copy(); } }
private TimingResults timeIt(RunMe runMe, int iterations) { double[] values = new double[iterations]; for (int i = 0; i < iterations; ++i) values[i] = timeIt(runMe); TimingResults results = new TimingResults(); results.mean.setData(values); results.median.setData(values); results.stddev.setData(values); return results; }
/** * 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 NullArgumentException if either source or dest is null */ public static void copy(Mean source, Mean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.incMoment = source.incMoment; dest.moment = source.moment.copy(); } }
/** * 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 NullArgumentException if either source or dest is null */ public static void copy(Mean source, Mean dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); dest.setData(source.getDataRef()); dest.incMoment = source.incMoment; dest.moment = source.moment.copy(); } }