Iterators.Product(Int32, Int32) Method

Enumerates the indexes of the Cartesian product 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#
public static IEnumerable<int[]> Product(
	int count,
	int length
)

Parameters

count  Int32
The size of the set to draw selections from.
length  Int32
The length of the selections.

Return Value

IEnumerable<Int32[]>
A sequence of integer arrays that contain the indexes of all selections of length elements with replacement from a set of size count.

Exceptions

ArgumentOutOfRangeException

length is less than zero.

See Also