Class CartesianExtension
Extensions to the MoreLinq.Cartesian function.
Inherited Members
Namespace: Acoustics.Shared.Extensions
Assembly: Acoustics.Shared.dll
Syntax
public static class CartesianExtension
Methods
| Improve this Doc View SourceMultiCartesian<TSource, TResult>(IEnumerable<IEnumerable<TSource>>, Func<IEnumerable<TSource>, TResult>)
Returns the Cartesian product of multiple sequences by combining each element of every set with every other element and applying the user-defined projection to the pair.
Declaration
public static IEnumerable<TResult> MultiCartesian<TSource, TResult>(this IEnumerable<IEnumerable<TSource>> enumerables, Func<IEnumerable<TSource>, TResult> resultSelector)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<IEnumerable<TSource>> | enumerables | The sequence of sequences of element.s |
| Func<IEnumerable<TSource>, TResult> | resultSelector | A projection function that combines elements from both sequences. |
Returns
| Type | Description |
|---|---|
| IEnumerable<TResult> | A sequence representing the Cartesian product of the source sequences. |
Type Parameters
| Name | Description |
|---|---|
| TSource | The type of the elements of |
| TResult | The type of the elements of the result sequence. |