public IObservable <TElement> Process <TElement>(IObservable <TElement> source, IObservable <Random> random)
 {
     return(source.ToArray().Zip(
                random.FirstAsync(),
                (elements, randomSource) => CombinatoricsHelper.SelectCombinationWithRepetition(elements, Count, randomSource))
            .SelectMany(elements => elements));
 }
Esempio n. 2
0
 public IObservable <TElement[]> Process <TElement>(IObservable <TElement[]> source, IObservable <Random> random)
 {
     return(random.FirstAsync().SelectMany(randomSource =>
                                           source.Select(elements => CombinatoricsHelper.SelectCombination(elements, Count, randomSource))));
 }
 public IObservable <TElement> Process <TElement>(IObservable <TElement> source)
 {
     return(source.ToArray().SelectMany(elements => CombinatoricsHelper.SelectCombinationWithRepetition(elements, Count)));
 }
Esempio n. 4
0
 public IObservable <TElement[]> Process <TElement>(IObservable <TElement[]> source)
 {
     return(source.Select(elements => CombinatoricsHelper.SelectCombination(elements, Count)));
 }