Enumerates the indexes of all combinations with replacement
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[]> CombinationsWithReplacement(
int count,
int length
)
Public Shared Function CombinationsWithReplacement (
count As Integer,
length As Integer
) As IEnumerable(Of Integer())
public:
static IEnumerable<array<int>^>^ CombinationsWithReplacement(
int count,
int length
)
static member CombinationsWithReplacement :
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 with replacement of
length elements
from a set of size
count.
Reference