/// <summary>
        /// Computes the deviations from the receiver's measures to another bin's measures.
        /// </summary>
        /// <param name="other">the other bin to compare with</param>
        /// <returns>a summary of the deviations.</returns>
        public override String CompareWith(AbstractBin1D other)
        {
            StringBuilder buf = new StringBuilder(base.CompareWith(other));

            if (other is MightyStaticBin1D)
            {
                MightyStaticBin1D m = (MightyStaticBin1D)other;
                if (HasSumOfLogarithms && m.HasSumOfLogarithms)
                {
                    buf.Append("geometric mean: " + RelError(GeometricMean(), m.GeometricMean()) + " %\n");
                }
                if (HasSumOfInversions && m.HasSumOfInversions)
                {
                    buf.Append("harmonic mean: " + RelError(HarmonicMean(), m.HarmonicMean()) + " %\n");
                }
                if (HasSumOfPowers(3) && m.HasSumOfPowers(3))
                {
                    buf.Append("skew: " + RelError(Skew(), m.Skew()) + " %\n");
                }
                if (HasSumOfPowers(4) && m.HasSumOfPowers(4))
                {
                    buf.Append("kurtosis: " + RelError(Kurtosis(), m.Kurtosis()) + " %\n");
                }
                buf.Append("\n");
            }
            return(buf.ToString());
        }
        /// <summary>
        /// Returns whether two bins are equal;
        /// They are equal if the other object is of the same class or a subclass of this class and both have the same size, minimum, maximum, sum, sumOfSquares, sumOfInversions and sumOfLogarithms.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        protected Boolean XEquals(Object obj)
        {
            if (!(obj is MightyStaticBin1D))
            {
                return(false);
            }
            MightyStaticBin1D other = (MightyStaticBin1D)obj;

            return(base.Equals(other) && SumOfInversions == other.SumOfInversions && SumOfLogarithms == other.SumOfLogarithms);
        }
        public override Object Clone()
        {
            MightyStaticBin1D clone = (MightyStaticBin1D)base.Clone();

            if (_sumOfPowers != null)
            {
                clone.SumOfPowers = (double[])clone.SumOfPowers.Clone();
            }
            return(clone);
        }