/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source Variance to copy * @param dest Variance to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(Variance source, Variance dest) { if (source == null || dest == null) { throw new NullArgumentException(); } dest.setData(source.getDataRef()); dest.moment = source.moment.copy(); dest.isBiasCorrected = source.isBiasCorrected; dest.incMoment = source.incMoment; } }