Enumerates the indexes of all combinations of the specified length
from a set of the specified size.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static IEnumerable<int[]> Combinations(
int count,
int length
)
Public Shared Function Combinations (
count As Integer,
length As Integer
) As IEnumerable(Of Integer())
public:
static IEnumerable<array<int>^>^ Combinations(
int count,
int length
)
static member Combinations :
count : int *
length : int -> IEnumerable<int[]>
Parameters
- count
- Type: SystemInt32
The size of the set to draw combinations from. - length
- Type: SystemInt32
The length of the combinations.
Return Value
Type:
IEnumerableInt32A sequence of integer arrays that contain the indexes of
all combinations of
length elements from a set of
size
count.
Reference