/** * Copy constructor, creates a new {@code FirstMoment} identical * to the {@code original} * * @param original the {@code FirstMoment} instance to copy * @throws NullArgumentException if original is null */ FirstMoment(FirstMoment original) throws NullArgumentException { super(); copy(original, this); }
/** * {@inheritDoc} */ @Override public FirstMoment copy() { FirstMoment result = new FirstMoment(); // No try-catch or advertised exception because args are guaranteed non-null copy(this, result); return result; }
/** * 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 NullArgumentException if either source or dest is null */ public static void copy(SecondMoment source, SecondMoment dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); FirstMoment.copy(source, dest); dest.m2 = source.m2; }
/** * 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(); } }
/** * Copy constructor, creates a new {@code FirstMoment} identical * to the {@code original} * * @param original the {@code FirstMoment} instance to copy * @throws NullArgumentException if original is null */ FirstMoment(FirstMoment original) throws NullArgumentException { super(); copy(original, this); }
/** * Copy constructor, creates a new {@code FirstMoment} identical * to the {@code original} * * @param original the {@code FirstMoment} instance to copy * @throws NullArgumentException if original is null */ FirstMoment(FirstMoment original) throws NullArgumentException { super(); copy(original, this); }
/** * {@inheritDoc} */ @Override public FirstMoment copy() { FirstMoment result = new FirstMoment(); // No try-catch or advertised exception because args are guaranteed non-null copy(this, result); return result; }
/** * {@inheritDoc} */ @Override public FirstMoment copy() { FirstMoment result = new FirstMoment(); // No try-catch or advertised exception because args are guaranteed non-null copy(this, result); return result; }
/** * 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 NullArgumentException if either source or dest is null */ public static void copy(SecondMoment source, SecondMoment dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(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 NullArgumentException if either source or dest is null */ public static void copy(SecondMoment source, SecondMoment dest) throws NullArgumentException { MathUtils.checkNotNull(source); MathUtils.checkNotNull(dest); FirstMoment.copy(source, dest); dest.m2 = source.m2; }
/** * 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(); } }