/// <summary>
        /// The maximum difference in parameters between
        /// this distribution array and that distribution array
        /// </summary>
        /// <param name="that">That distribution array</param>
        /// <returns>The maximum difference</returns>
        public override double MaxDiff(object that)
        {
            DistributionStructArray2D <T, DomainType> thatd = that as DistributionStructArray2D <T, DomainType>;

            if ((object)thatd == null)
            {
                return(Double.PositiveInfinity);
            }
            return(Distribution.MaxDiff(this.array, thatd.array));
        }
 /// <summary>
 /// The expected logarithm of that distribution under this distribution.
 /// </summary>
 /// <param name="that">The distribution to take the logarithm of.</param>
 /// <returns><c>sum_x this.Evaluate(x)*Math.Log(that.Evaluate(x))</c></returns>
 /// <remarks>This is also known as the cross entropy.
 /// </remarks>
 public double GetAverageLog(DistributionStructArray2D <T, DomainType> that)
 {
     return(Distribution.GetAverageLog(array, that.array));
 }
 /// <summary>
 /// Get the integral of this distribution times another distribution raised to a power.
 /// </summary>
 /// <param name="that"></param>
 /// <param name="power"></param>
 /// <returns></returns>
 public double GetLogAverageOfPower(DistributionStructArray2D <T, DomainType> that, double power)
 {
     return(Distribution.GetLogAverageOfPower(array, that.array, power));
 }
 /// <summary>
 /// Set the parameters to match the moments of a mixture of two distributions
 /// </summary>
 /// <param name="weight1">The first weight</param>
 /// <param name="a">The first distribution array</param>
 /// <param name="weight2">The second weight</param>
 /// <param name="b">The second distribution array</param>
 public void SetToSum(double weight1, DistributionStructArray2D <T, DomainType> a, double weight2, DistributionStructArray2D <T, DomainType> b)
 {
     Distribution.SetToSum(array, weight1, a.array, weight2, b.array);
 }
 /// <summary>
 /// Set the parameters to represent the power of a source distribution to some exponent
 /// </summary>
 /// <param name="a">The source distribution array</param>
 /// <param name="exponent">The exponent</param>
 public void SetToPower(DistributionStructArray2D <T, DomainType> a, double exponent)
 {
     Distribution.SetToPower(array, a.array, exponent);
 }
 /// <summary>
 /// Set the parameters to represent the ratio of two distributions
 /// </summary>
 /// <param name="numerator">The numerator distribution array</param>
 /// <param name="denominator">The denominator distribution array</param>
 public void SetToRatio(DistributionStructArray2D <T, DomainType> numerator, DistributionStructArray2D <T, DomainType> denominator)
 {
     Distribution.SetToRatio(array, numerator.array, denominator.array);
 }
 /// <summary>
 /// Set the parameters to represent the product of two distributions
 /// </summary>
 /// <param name="a">The first distribution</param>
 /// <param name="b">The second distribution</param>
 public void SetToProduct(DistributionStructArray2D <T, DomainType> a, DistributionStructArray2D <T, DomainType> b)
 {
     Distribution.SetToProduct(array, a.array, b.array);
 }
 /// <summary>
 /// Set the parameters of this distribution to match those of the given distribution (by value)
 /// </summary>
 /// <param name="that"></param>
 public void SetTo(DistributionStructArray2D <T, DomainType> that)
 {
     base.SetTo(that);
 }