LinqExtensions.SelectMany<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#
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.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Vector<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

See Also