Example #1
0
        public void SetToSum(double weight1, UnnormalizedDiscrete value1, double weight2, UnnormalizedDiscrete value2)
        {
            Discrete result = Discrete.Uniform(Dimension);

            result.SetToSum(weight1, value1.ToDiscrete(), weight2, value2.ToDiscrete());
            SetLogProbs((DenseVector)result.GetLogProbs());
        }
Example #2
0
 /// <summary>
 /// Sets the parameters to represent the weighted sum of two discrete distributions.
 /// </summary>
 /// <param name="value1">The first discrete distribution</param>
 /// <param name="weight1">The first weight</param>
 /// <param name="value2">The second discrete distribution</param>
 /// <param name="weight2">The second weight</param>
 public void SetToSum(double weight1, TThis value1, double weight2, TThis value2)
 {
     disc.SetToSum(weight1, value1.disc, weight2, value2.disc);
 }