/// <summary>
 /// Evidence message for EP
 /// </summary>
 /// <param name="isGreaterThan">Incoming message from 'isGreaterThan'.</param>
 /// <param name="a">Constant value for 'a'.</param>
 /// <param name="b">Constant value for 'b'.</param>
 /// <returns>Logarithm of the factor's average value across the given argument distributions</returns>
 /// <remarks><para>
 /// The formula for the result is <c>log(sum_(isGreaterThan) p(isGreaterThan) factor(isGreaterThan,a,b))</c>.
 /// </para></remarks>
 public static double LogAverageFactor(Bernoulli isGreaterThan, int a, int b)
 {
     return(isGreaterThan.GetLogProb(Factor.IsGreaterThan(a, b)));
 }
 /// <summary>
 /// Evidence message for EP
 /// </summary>
 /// <param name="isGreaterThan">Constant value for 'isGreaterThan'.</param>
 /// <param name="a">Constant value for 'a'.</param>
 /// <param name="b">Constant value for 'b'.</param>
 /// <returns>Logarithm of the factor's average value across the given argument distributions</returns>
 /// <remarks><para>
 /// The formula for the result is <c>log(factor(isGreaterThan,a,b))</c>.
 /// </para></remarks>
 public static double LogAverageFactor(bool isGreaterThan, int a, int b)
 {
     return((isGreaterThan == Factor.IsGreaterThan(a, b)) ? 0.0 : Double.NegativeInfinity);
 }