Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference

Skip Navigation LinksHome»Documentation»Reference»Extreme.DataAnalysis.Linq»LinqExtensions Class»Methods»SelectMany Method Overloads»SelectMany(T, TCollection, TResult) Method (Vector(T), Func(T, IEnumerable(TCollection)), Func(T, TCollection, TResult))

LinqExtensionsSelectManyT, TCollection, TResult Method (VectorT, FuncT, IEnumerableTCollection, FuncT, TCollection, TResult)

Extreme Optimization Numerical Libraries for .NET Professional
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.

Namespace:  Extreme.DataAnalysis.Linq
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public static IEnumerable<TResult> SelectMany<T, TCollection, TResult>(
	this Vector<T> vector,
	Func<T, IEnumerable<TCollection>> collectionSelector,
	Func<T, TCollection, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function SelectMany(Of T, TCollection, TResult) ( 
	vector As Vector(Of T),
	collectionSelector As Func(Of T, IEnumerable(Of TCollection)),
	resultSelector As Func(Of T, TCollection, TResult)
) As IEnumerable(Of TResult)
public:
[ExtensionAttribute]
generic<typename T, typename TCollection, typename TResult>
static IEnumerable<TResult>^ SelectMany(
	Vector<T>^ vector, 
	Func<T, IEnumerable<TCollection>^>^ collectionSelector, 
	Func<T, TCollection, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member SelectMany : 
        vector : Vector<'T> * 
        collectionSelector : Func<'T, IEnumerable<'TCollection>> * 
        resultSelector : Func<'T, 'TCollection, 'TResult> -> IEnumerable<'TResult> 

Parameters

vector
Type: Extreme.MathematicsVectorT
A vector to project.
collectionSelector
Type: SystemFuncT, IEnumerableTCollection
A function to apply to each element of the input.
resultSelector
Type: SystemFuncT, 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

Type: IEnumerableTResult
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 VectorT. 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

Reference

LinqExtensions Class
SelectMany Overload
Extreme.DataAnalysis.Linq Namespace

Copyright (c) 2004-2023 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2023, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.