/// <summary>VMP message to <c>set</c>.</summary> /// <param name="i">Constant value for <c>i</c>.</param> /// <param name="result">Modified to contain the outgoing message.</param> /// <returns> /// <paramref name="result" /> /// </returns> /// <remarks> /// <para>The outgoing message is the factor viewed as a function of <c>set</c> conditioned on the given values.</para> /// </remarks> public static BernoulliIntegerSubset SetAverageLogarithm(int i, BernoulliIntegerSubset result) { result.SetToUniform(); result.SparseBernoulliList[i] = Bernoulli.PointMass(true); return(result); }
/// <summary> /// VMP message to 'set' /// </summary> /// <param name="i">Constant value for 'i'.</param> /// <param name="result">Modified to contain the outgoing message</param> /// <returns><paramref name="result"/></returns> /// <remarks><para> /// The outgoing message is the factor viewed as a function of 'set' conditioned on the given values. /// </para></remarks> public static BernoulliIntegerSubset SetAverageLogarithm(int i, BernoulliIntegerSubset result) { result.SetToUniform(); result.LogOddsVector[i] = double.PositiveInfinity; return(result); }