Iterators.Product(Int 32[], Int 32[]) 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#
A sequence of integer arrays that contain the indexes of all selections of elements from sets of size counts.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static IEnumerable<int[]> Product(
int[] counts,
int[] result
)
Parameters
- counts Int32[]
- An array containing the length of each dimension.
- result Int32[]
- An array that is to hold the result.
Return Value
IEnumerable<Int32[]>A sequence of integer arrays that contain the indexes of all selections of elements from sets of size counts.
Remarks
The indexes are returned each time in the same array, result. Its elements should not be modified. If they are modified, the results are unpredictable.
Exceptions
Argument | counts is null. |
Dimension | The length of result is not equal to the length of counts. |