Applies a function to the elements of a vector
and returns the result in a new vector.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static Vector<U> Map<T, U>(
Func<int, T, U> function,
Vector<T> vector
)
Public Shared Function Map(Of T, U) (
function As Func(Of Integer, T, U),
vector As Vector(Of T)
) As Vector(Of U)
public:
generic<typename T, typename U>
static Vector<U>^ Map(
Func<int, T, U>^ function,
Vector<T>^ vector
)
static member Map :
function : Func<int, 'T, 'U> *
vector : Vector<'T> -> Vector<'U>
Parameters
- function
- Type: SystemFuncInt32, T, U
A delegate that maps the index and the value to
a result. - vector
- Type: Extreme.MathematicsVectorT
A vector whose elements
to apply function to.
Type Parameters
- T
- U
Return Value
Type:
VectorUA new vector.
Reference