/** * Copy constructor. Creates a new ResizableDoubleArray that is a deep, * fresh copy of the original. Needs to acquire synchronization lock * on original. Original may not be null; otherwise a NullPointerException * is thrown. * * @param original array to copy * @since 2.0 */ public ResizableDoubleArray(ResizableDoubleArray original) { copy(original, this); }
/** * Copy constructor. Creates a new ResizableDoubleArray that is a deep, * fresh copy of the original. Needs to acquire synchronization lock * on original. Original may not be null; otherwise a NullPointerException * is thrown. * * @param original array to copy * @since 2.0 */ public ResizableDoubleArray(ResizableDoubleArray original) { copy(original, this); }
/** * Returns a copy of the ResizableDoubleArray. Does not contract before * the copy, so the returned object is an exact copy of this. * * @return a new ResizableDoubleArray with the same data and configuration * properties as this * @since 2.0 */ public synchronized ResizableDoubleArray copy() { ResizableDoubleArray result = new ResizableDoubleArray(); copy(this, result); return result; }
/** * Returns a copy of the ResizableDoubleArray. Does not contract before * the copy, so the returned object is an exact copy of this. * * @return a new ResizableDoubleArray with the same data and configuration * properties as this * @since 2.0 */ public synchronized ResizableDoubleArray copy() { ResizableDoubleArray result = new ResizableDoubleArray(); copy(this, result); return result; }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source DescriptiveStatistics to copy * @param dest DescriptiveStatistics to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(DescriptiveStatistics source, DescriptiveStatistics dest) { // Copy data and window size dest.eDA = source.eDA.copy(); dest.windowSize = source.windowSize; // Copy implementations dest.maxImpl = source.maxImpl.copy(); dest.meanImpl = source.meanImpl.copy(); dest.minImpl = source.minImpl.copy(); dest.sumImpl = source.sumImpl.copy(); dest.varianceImpl = source.varianceImpl.copy(); dest.sumsqImpl = source.sumsqImpl.copy(); dest.geometricMeanImpl = source.geometricMeanImpl.copy(); dest.kurtosisImpl = source.kurtosisImpl; dest.skewnessImpl = source.skewnessImpl; dest.percentileImpl = source.percentileImpl; } }
/** * Copies source to dest. * <p>Neither source nor dest can be null.</p> * * @param source DescriptiveStatistics to copy * @param dest DescriptiveStatistics to copy to * @throws NullPointerException if either source or dest is null */ public static void copy(DescriptiveStatistics source, DescriptiveStatistics dest) { // Copy data and window size dest.eDA = source.eDA.copy(); dest.windowSize = source.windowSize; // Copy implementations dest.maxImpl = source.maxImpl.copy(); dest.meanImpl = source.meanImpl.copy(); dest.minImpl = source.minImpl.copy(); dest.sumImpl = source.sumImpl.copy(); dest.varianceImpl = source.varianceImpl.copy(); dest.sumsqImpl = source.sumsqImpl.copy(); dest.geometricMeanImpl = source.geometricMeanImpl.copy(); dest.kurtosisImpl = source.kurtosisImpl; dest.skewnessImpl = source.skewnessImpl; dest.percentileImpl = source.percentileImpl; } }