LinqExtensions.Select Method

Definition

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

Overload List

Select<T, TResult>(Vector<T>, Func<T, TResult>) Projects each element of a vector into a new form.
Select<T, TResult>(Vector<T>, Func<T, Int32, TResult>) Projects each element of a vector into a new form by incorporating the elements index.
Select<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, TResult>) Projects each row of a data frame into a value.
Select<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, Int32, TResult>) Projects each row of a data frame into a value.
Select<TKey, TElement, TResult>(LinqExtensions.Lookup<TKey, TElement>, Func<LinqExtensions.Grouping<TKey, TElement>, TResult>) Returns a vector that applies the specified selector to each element of a lookup.
Select<TKey, R, C, TResult>(LinqExtensions.DataFrameLookup<TKey, R, C>, Func<LinqExtensions.DataFrameGrouping<TKey, R, C>, TResult>) Returns a vector that applies the specified selector to each element of a lookup.

LinqExtensions.Select<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, TResult>)

Projects each row of a data frame into a value.
C#
public static Vector<TResult> Select<R, C, TResult>(
	this DataFrame<R, C> frame,
	Func<DataFrameRow<R, C>, TResult> selector
)

Parameters

frame  DataFrame<R, C>
A data frame to invoke a transform function on.
selector  Func<DataFrameRow<R, C>, 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

Vector<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

ArgumentNullException

frame is null.

-or-

selector is null.

LinqExtensions.Select<R, C, TResult>(DataFrame<R, C>, Func<DataFrameRow<R, C>, Int32, TResult>)

Projects each row of a data frame into a value.
C#
public static Vector<TResult> Select<R, C, TResult>(
	this DataFrame<R, C> frame,
	Func<DataFrameRow<R, C>, int, TResult> selector
)

Parameters

frame  DataFrame<R, C>
A data frame to invoke a transform function on.
selector  Func<DataFrameRow<R, C>, Int32, 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

Vector<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

ArgumentNullException

frame is null.

-or-

selector is null.

LinqExtensions.Select<TKey, R, C, TResult>(LinqExtensions.DataFrameLookup<TKey, R, C>, Func<LinqExtensions.DataFrameGrouping<TKey, R, C>, TResult>)

Returns a vector that applies the specified selector to each element of a lookup.
C#
public static Vector<TResult> Select<TKey, R, C, TResult>(
	this LinqExtensions.DataFrameLookup<TKey, R, C> lookup,
	Func<LinqExtensions.DataFrameGrouping<TKey, R, C>, TResult> selector
)

Parameters

lookup  LinqExtensions.DataFrameLookup<TKey, R, C>
A LinqExtensions.Lookup<TKey, T> value.
selector  Func<LinqExtensions.DataFrameGrouping<TKey, R, C>, TResult>
The function to apply to each group in lookup.

Type Parameters

TKey
The type of the lookup keys.
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 result of the selector function.

Return Value

Vector<TResult>
A vector containing the results of applying selector to each grouping in lookup.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type LinqExtensions.DataFrameLookup<TKey, 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).

LinqExtensions.Select<TKey, TElement, TResult>(LinqExtensions.Lookup<TKey, TElement>, Func<LinqExtensions.Grouping<TKey, TElement>, TResult>)

Returns a vector that applies the specified selector to each element of a lookup.
C#
public static Vector<TResult> Select<TKey, TElement, TResult>(
	this LinqExtensions.Lookup<TKey, TElement> lookup,
	Func<LinqExtensions.Grouping<TKey, TElement>, TResult> selector
)

Parameters

lookup  LinqExtensions.Lookup<TKey, TElement>
A LinqExtensions.Lookup<TKey, T> value.
selector  Func<LinqExtensions.Grouping<TKey, TElement>, TResult>
The function to apply to each group in lookup.

Type Parameters

TKey
The type of the lookup keys.
TElement
The type of the elements of the lookup collections.
TResult
The type of the result of the selector function.

Return Value

Vector<TResult>
A vector containing the results of applying selector to each grouping in lookup.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type LinqExtensions.Lookup<TKey, TElement>. 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).

LinqExtensions.Select<T, TResult>(Vector<T>, Func<T, TResult>)

Projects each element of a vector into a new form.
C#
public static Vector<TResult> Select<T, TResult>(
	this Vector<T> vector,
	Func<T, TResult> selector
)

Parameters

vector  Vector<T>
A vector to transform.
selector  Func<T, TResult>
A function to apply to each element of the vector.

Type Parameters

T
The element type of the vector.
TResult
The type of the result.

Return Value

Vector<TResult>
A vector whose elements are the result of applying selector to 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).

LinqExtensions.Select<T, TResult>(Vector<T>, Func<T, Int32, TResult>)

Projects each element of a vector into a new form by incorporating the elements index.
C#
public static Vector<TResult> Select<T, TResult>(
	this Vector<T> vector,
	Func<T, int, TResult> selector
)

Parameters

vector  Vector<T>
A vector to transform.
selector  Func<T, Int32, TResult>
A function to apply to each element of the vector and its index.

Type Parameters

T
The element type of the vector.
TResult
The type of the result.

Return Value

Vector<TResult>
A vector whose elements are the result of applying selector to 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).

See Also