Linq Extensions.Select Many<T, TCollection, TResult>(Vector<T>, Func<T, IEnumerable<TCollection>>, Func<T, TCollection, TResult>) Method
Projects each element of a vector to a vector
and flattens the resulting vectors into one vector,
and applies a selector function to each element of the flattened vector.
Definition
Namespace: Extreme.DataAnalysis.Linq
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A vector whose elements are the result of invoking the one-to-many function collectionSelector on each element of vector, and then applying resultSelector to each element of the intermediate result.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static IEnumerable<TResult> SelectMany<T, TCollection, TResult>(
this Vector<T> vector,
Func<T, IEnumerable<TCollection>> collectionSelector,
Func<T, TCollection, TResult> resultSelector
)
Parameters
- vector Vector<T>
- A vector to project.
- collectionSelector Func<T, IEnumerable<TCollection>>
- A function to apply to each element of the input.
- resultSelector Func<T, TCollection, TResult>
- A function to apply to each element of the intermediate vector.
Type Parameters
- T
- The type of the elements of the vector.
- TCollection
- The type of the intermediate elements.
- TResult
- The type of the result.
Return Value
IEnumerable<TResult>A vector whose elements are the result of invoking the one-to-many function collectionSelector on each element of vector, and then applying resultSelector to each element of the intermediate result.