Example #1
0
        /// <summary>
        /// The maximum difference between the parameters of this distribution and that
        /// </summary>
        /// <param name="thatd"></param>
        /// <returns></returns>
        public double MaxDiff(object thatd)
        {
            if (!(thatd is WrappedGaussian))
            {
                return(Double.PositiveInfinity);
            }
            WrappedGaussian that  = (WrappedGaussian)thatd;
            double          diff1 = Gaussian.MaxDiff(that.Gaussian);
            double          diff2 = Math.Abs(this.Period - that.Period);

            return(Math.Max(diff1, diff2));
        }
Example #2
0
        /// <summary>
        /// The maximum difference between the parameters of this distribution and that
        /// </summary>
        /// <param name="thatd"></param>
        /// <returns></returns>
        public double MaxDiff(object thatd)
        {
            if (!(thatd is TruncatedGaussian))
            {
                return(Double.PositiveInfinity);
            }
            TruncatedGaussian that  = (TruncatedGaussian)thatd;
            double            diff1 = Gaussian.MaxDiff(that.Gaussian);
            double            diff3 = MMath.AbsDiff(LowerBound, that.LowerBound);
            double            diff4 = MMath.AbsDiff(UpperBound, that.UpperBound);

            return(Math.Max(diff1, Math.Max(diff3, diff4)));
        }