CombinatoricsSelectPermutationT Method |
Select a random permutation from a data sequence by returning the provided data in random order.
Implemented using Fisher-Yates Shuffling.
Namespace: Altaxo.CalcAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static IEnumerable<T> SelectPermutation<T>(
this IEnumerable<T> data,
Random randomSource = null
)
Parameters
- data IEnumerableT
- The data elements to be reordered.
- 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.SelectPermutation``1(System.Collections.Generic.IEnumerable{``0},System.Random)"]
Return Value
IEnumerableT[Missing <returns> documentation for "M:Altaxo.Calc.Combinatorics.SelectPermutation``1(System.Collections.Generic.IEnumerable{``0},System.Random)"]
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