/// <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 TruncatedGamma)) { return(Double.PositiveInfinity); } TruncatedGamma that = (TruncatedGamma)thatd; double diff1 = Gamma.MaxDiff(that.Gamma); double diff3 = MMath.AbsDiff(LowerBound, that.LowerBound); double diff4 = MMath.AbsDiff(UpperBound, that.UpperBound); return(Math.Max(diff1, Math.Max(diff3, diff4))); }