Example #1
0
 /// <include file='FactorDocs.xml' path='factor_docs/message_op_class[@name="BooleanAreEqualOp"]/message_doc[@name="LogAverageFactor(Bernoulli, bool, bool)"]/*'/>
 public static double LogAverageFactor(Bernoulli areEqual, bool a, bool b)
 {
     return(areEqual.GetLogProb(Factor.AreEqual(a, b)));
 }
Example #2
0
 /// <include file='FactorDocs.xml' path='factor_docs/message_op_class[@name="BooleanAreEqualOp"]/message_doc[@name="AreEqualAverageConditional(bool, bool)"]/*'/>
 public static Bernoulli AreEqualAverageConditional(bool A, bool B)
 {
     return(Bernoulli.PointMass(Factor.AreEqual(A, B)));
 }
Example #3
0
 /// <include file='FactorDocs.xml' path='factor_docs/message_op_class[@name="DiscreteAreEqualOp"]/message_doc[@name="LogAverageFactor(bool, int, int)"]/*'/>
 public static double LogAverageFactor(bool areEqual, int a, int b)
 {
     return((areEqual == Factor.AreEqual(a, b)) ? 0.0 : Double.NegativeInfinity);
 }