/** * Copy constructor, creates a new {@code FirstMoment} identical * to the {@code original} * * @param original the {@code FirstMoment} instance to copy */ public FirstMoment(FirstMoment original) { super(); 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; }
/** * 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; }
/** * Copy constructor, creates a new {@code FirstMoment} identical * to the {@code original} * * @param original the {@code FirstMoment} instance to copy */ public FirstMoment(FirstMoment original) { super(); copy(original, this); }
/** * 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.incMoment = source.incMoment; dest.moment = source.moment.copy(); } }
/** * {@inheritDoc} */ @Override public FirstMoment copy() { FirstMoment result = new FirstMoment(); copy(this, result); return result; }
/** * {@inheritDoc} */ @Override public FirstMoment copy() { FirstMoment result = new FirstMoment(); copy(this, result); return result; }
/** * 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(); } }