Projects each row of a data frame into a sequence of values,
flattens all the sequences into one sequence,
and invokes a selector function on each element of the flattened sequence.
The row index is used in the logic of the projection that produces the intermediate sequence.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static IEnumerable<TResult> SelectMany<R, C, TCollection, TResult>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, int, IEnumerable<TCollection>> collectionSelector,
Func<DataFrameRow<R, C>, TCollection, TResult> resultSelector
)
<ExtensionAttribute>
Public Shared Function SelectMany(Of R, C, TCollection, TResult) (
frame As DataFrame(Of R, C),
collectionSelector As Func(Of DataFrameRow(Of R, C), Integer, IEnumerable(Of TCollection)),
resultSelector As Func(Of DataFrameRow(Of R, C), TCollection, TResult)
) As IEnumerable(Of TResult)
public:
[ExtensionAttribute]
generic<typename R, typename C, typename TCollection, typename TResult>
static IEnumerable<TResult>^ SelectMany(
DataFrame<R, C>^ frame,
Func<DataFrameRow<R, C>^, int, IEnumerable<TCollection>^>^ collectionSelector,
Func<DataFrameRow<R, C>^, TCollection, TResult>^ resultSelector
)
[<ExtensionAttribute>]
static member SelectMany :
frame : DataFrame<'R, 'C> *
collectionSelector : Func<DataFrameRow<'R, 'C>, int, IEnumerable<'TCollection>> *
resultSelector : Func<DataFrameRow<'R, 'C>, 'TCollection, 'TResult> -> IEnumerable<'TResult>
Parameters
- frame
- Type: Extreme.DataAnalysisDataFrameR, C
A data frame to project. - collectionSelector
- Type: SystemFuncDataFrameRowR, C, Int32, IEnumerableTCollection
A function to apply to each row.
The second parameter of the function represents the row's index. - resultSelector
- Type: SystemFuncDataFrameRowR, C, TCollection, TResult
A function to apply to each element
of the intermediate sequence.
Type Parameters
- R
- The element type of the row index of the data frame.
- C
- The element type of the column index of the data frame.
- TCollection
- The type of the value returned by collectionSelector.
- TResult
- The type of the value returned by resultSelector.
Return Value
Type:
IEnumerableTResultA vector whose elements are the result of invoking the one-to-many function
collectionSelector on each row of the data frame
and then applying the transformation
resultSelector
on each element of this sequence.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataFrameR,
C. 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).
Reference