Ejemplo n.º 1
0
 protected override IEnumerable <Weighted <TResult> > GetSupport()
 {
     foreach (Weighted <TSource> a in this.source.Support())
     {
         Weighted <TResult> result = this.Projection(a.Value);
         yield return(new Weighted <TResult>
         {
             Value = result.Value,
             Probability = a.Probability * result.Probability
         });
     }
 }
Ejemplo n.º 2
0
 protected override IEnumerable <Weighted <TResult> > GetSupport()
 {
     foreach (Weighted <TSource> a in this.source.Support())
     {
         foreach (Weighted <TCollection> b in this.CollectionSelector(a.Value).Support())
         {
             Weighted <TResult> result = this.ResultSelector(a.Value, b.Value);
             result.Probability *= (a.Probability * b.Probability);
             yield return(result);
         }
     }
 }