Iterators Class

Contains methods for generating combinatorial sequences over collections.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
public static class Iterators
Inheritance
Object  →  Iterators

Remarks

Use the methods of the Iterators class to enumerate all the combinations or permutations, or the Cartesian product of sets of items. Methods are available for combinations with and without replacement, permutations of a specified length, and the Cartesian product of a set with itself ("permutations with replacement") or of different sets.

Methods

Combinations(Int32, Int32) Enumerates the indexes of all combinations of the specified length from a set of the specified size.
Combinations(Int32, Int32, Int32[]) Enumerates the indexes of all combinations of the specified length from a set of the specified size.
Combinations<T>(IList<T>, Int32) Enumerates all combinations of the specified length from a set of items.
CombinationsWithReplacement(Int32, Int32) Enumerates the indexes of all combinations with replacement of the specified length from a set of the specified size.
CombinationsWithReplacement(Int32, Int32, Int32[]) Enumerates the indexes of all combinations with replacement of the specified length from a set of the specified size.
CombinationsWithReplacement<T>(IList<T>, Int32) Enumerates the indexes of all combinations with replacement of the specified length from a list of items.
Permutations(Int32, Boolean) Enumerates the indexes of all permutations from a set of the specified size.
Permutations(Int32, Boolean, Int32[]) Enumerates the indexes of all permutations from a set of the specified size.
Permutations(Int32, Int32, Boolean) Enumerates the indexes of all permutations of the specified length from a set of the specified size.
Permutations(Int32, Int32, Boolean, Int32[]) Enumerates the indexes of all permutations of the specified length from a set of the specified size.
Permutations<T>(IList<T>, Boolean) Enumerates the indexes of all permutations from a set of items.
Permutations<T>(IList<T>, Int32, Boolean) Enumerates the indexes of all permutations of the specified length from a set of items.
Product(Int32[]) Enumerates the indexes of the Cartesian product of the specified length from a set of the specified size.
Product(Int32, Int32) Enumerates the indexes of the Cartesian product of the specified length from a set of the specified size.
Product(Int32[], Int32[]) Enumerates the indexes of the Cartesian product of the specified length from a set of the specified size.
Product(Int32, Int32, Int32[]) Enumerates the indexes of the Cartesian product of the specified length from a set of the specified size.
Product<T>(IList<T>, Int32) Enumerates the Cartesian product of the specified length from a set of items.

See Also