Esempio n. 1
0
 /// <include file='FactorDocs.xml' path='factor_docs/message_op_class[@name="IsGreaterThanOp"]/message_doc[@name="LogAverageFactor(Bernoulli, int, int)"]/*'/>
 public static double LogAverageFactor(Bernoulli isGreaterThan, int a, int b)
 {
     return(isGreaterThan.GetLogProb(Factor.IsGreaterThan(a, b)));
 }
Esempio n. 2
0
 /// <include file='FactorDocs.xml' path='factor_docs/message_op_class[@name="IsGreaterThanOp"]/message_doc[@name="LogAverageFactor(bool, int, int)"]/*'/>
 public static double LogAverageFactor(bool isGreaterThan, int a, int b)
 {
     return((isGreaterThan == Factor.IsGreaterThan(a, b)) ? 0.0 : Double.NegativeInfinity);
 }