Iterators.Combinations With Replacement(Int 32, Int 32) Method
Enumerates the indexes of all combinations with replacement
of the specified length from a set of the specified size.
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A sequence of integer arrays that contain the indexes of all combinations with replacement of length elements from a set of size count.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static IEnumerable<int[]> CombinationsWithReplacement(
int count,
int length
)
Parameters
- count Int32
- The size of the set to draw combinations from.
- length Int32
- The length of the combinations.
Return Value
IEnumerable<Int32[]>A sequence of integer arrays that contain the indexes of all combinations with replacement of length elements from a set of size count.
Exceptions
Argument | length is less than zero. |