Linq Extensions.Select Many Method
Definition
Namespace: Numerics.NET.DataAnalysis.Linq
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Select | Projects each element of a vector to a vector and flattens the resulting vectors into one vector. |
Select | Projects each element of a vector to a vector incorporating the element's index and flattens the resulting vectors into one vector. |
Select | Projects each row of a data frame into a value. |
Select | Projects each row of a data frame into a sequence of values, flattens all the sequences into one sequence. |
Select | 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. |
Select | Projects each element of a vector to a vector incorporating the element's index and flattens the resulting vectors into one vector, and applies a selector function to each element of the flattened vector. |
Select | 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. |
Select | 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. |
SelectMany<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, IEnumerable<TResult>>)
Projects each row of a data frame into a value.
public static IEnumerable<TResult> SelectMany<R, C, TResult>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, IEnumerable<TResult>> selector
)
Parameters
- frame DataFrame<R, C>
- A data frame to invoke a transform function on.
- selector Func<DataFrameRow<R, C>, IEnumerable<TResult>>
- A function to apply to each row.
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.
- TResult
- The type of the value returned by selector.
Return Value
IEnumerable<TResult>A vector whose elements are the result of invoking selector on each row of the data frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<R, 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).Exceptions
Argument | frame is null. -or- selector is null. |
SelectMany<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, Int32, IEnumerable<TResult>>)
Projects each row of a data frame into a sequence of values,
flattens all the sequences into one sequence.
public static IEnumerable<TResult> SelectMany<R, C, TResult>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, int, IEnumerable<TResult>> selector
)
Parameters
- frame DataFrame<R, C>
- A data frame to project.
- selector Func<DataFrameRow<R, C>, Int32, IEnumerable<TResult>>
- A function to apply to each row.
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.
- TResult
- The type of the value returned by selector.
Return Value
IEnumerable<TResult>A vector whose elements are the result of invoking the one-to-many function selector on each row of the data frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<R, 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).Exceptions
Argument | frame is null. -or- selector is null. |
SelectMany<T, TResult>(Vector<T>, Func<T, IEnumerable<TResult>>)
Projects each element of a vector to a vector and flattens the resulting
vectors into one vector.
public static IEnumerable<TResult> SelectMany<T, TResult>(
this Vector<T> vector,
Func<T, IEnumerable<TResult>> selector
)
Parameters
- vector Vector<T>
- A vector to project.
- selector Func<T, IEnumerable<TResult>>
- A function to apply to each element.
Type Parameters
- T
- The type of the elements of the vector.
- TResult
- The type of the result.
Return Value
IEnumerable<TResult>A vector whose elements are the result of invoking the function selector on each element of vector.
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).SelectMany<T, TResult>(Vector<T>, Func<T, Int32, IEnumerable<TResult>>)
Projects each element of a vector to a vector incorporating the element's index
and flattens the resulting vectors into one vector.
public static IEnumerable<TResult> SelectMany<T, TResult>(
this Vector<T> vector,
Func<T, int, IEnumerable<TResult>> selector
)
Parameters
- vector Vector<T>
- A vector to project.
- selector Func<T, Int32, IEnumerable<TResult>>
- A function to apply to each element.
Type Parameters
- T
- The type of the elements of the vector.
- TResult
- The type of the result.
Return Value
IEnumerable<TResult>A vector whose elements are the result of invoking the function selector on each element of vector.
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).SelectMany<R, C, TCollection, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, IEnumerable<TCollection>>, Func<DataFrameRow<R, C>, TCollection, TResult>)
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.
public static IEnumerable<TResult> SelectMany<R, C, TCollection, TResult>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, IEnumerable<TCollection>> collectionSelector,
Func<DataFrameRow<R, C>, TCollection, TResult> resultSelector
)
Parameters
- frame DataFrame<R, C>
- A data frame to project.
- collectionSelector Func<DataFrameRow<R, C>, IEnumerable<TCollection>>
- A function to apply to each row.
- resultSelector Func<DataFrameRow<R, 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
IEnumerable<TResult>A 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 DataFrame<R, 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).Exceptions
Argument | frame is null. -or- collectionSelector is null. -or- resultSelector is null. |
SelectMany<R, C, TCollection, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, Int32, IEnumerable<TCollection>>, Func<DataFrameRow<R, C>, TCollection, TResult>)
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.
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
)
Parameters
- frame DataFrame<R, C>
- A data frame to project.
- collectionSelector Func<DataFrameRow<R, C>, Int32, IEnumerable<TCollection>>
- A function to apply to each row. The second parameter of the function represents the row's index.
- resultSelector Func<DataFrameRow<R, 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
IEnumerable<TResult>A 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 DataFrame<R, 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).Exceptions
Argument | frame is null. -or- collectionSelector is null. -or- resultSelector is null. |
SelectMany<T, TCollection, TResult>(Vector<T>, Func<T, IEnumerable<TCollection>>, Func<T, TCollection, TResult>)
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.
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).SelectMany<T, TCollection, TResult>(Vector<T>, Func<T, Int32, IEnumerable<TCollection>>, Func<T, TCollection, TResult>)
Projects each element of a vector to a vector incorporating the element's index
and flattens the resulting vectors into one vector,
and applies a selector function to each element of the flattened vector.
public static IEnumerable<TResult> SelectMany<T, TCollection, TResult>(
this Vector<T> vector,
Func<T, int, IEnumerable<TCollection>> collectionSelector,
Func<T, TCollection, TResult> resultSelector
)
Parameters
- vector Vector<T>
- A vector to project.
- collectionSelector Func<T, Int32, 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.