CombinatoricsSelectVariationWithRepetitionT Method |
Select a random variation, with repetition, from a data sequence by randomly selecting k elements in random order.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static IEnumerable<T> SelectVariationWithRepetition<T>(
this IEnumerable<T> data,
int elementsToChoose,
Random randomSource = null
)
Parameters
- data IEnumerableT
- The data source to choose from.
- elementsToChoose Int32
- Number of elements (k) to choose from the data set. Elements can be chosen more than once.
- randomSource Random (Optional)
- The random number generator to use. Optional; the default random source will be used if null.
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Altaxo.Calc.Combinatorics.SelectVariationWithRepetition``1(System.Collections.Generic.IEnumerable{``0},System.Int32,System.Random)"]
Return Value
IEnumerableTThe chosen variation with repetition, in random order.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also