Vector.MapInto Method

Definition

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

Overload List

MapInto<T, U>(Func<T, U>, Vector<T>, Vector<U>) Applies a function to the elements of a vector.
MapInto<T, U, V>(Func<T, U, V>, Vector<T>, Vector<U>, Vector<V>) Applies a function to the corresponding elements of two vectors and returns the result in a third vector.

MapInto<T, U>(Func<T, U>, Vector<T>, Vector<U>)

Applies a function to the elements of a vector.
C#
public static Vector<U> MapInto<T, U>(
	Func<T, U> function,
	Vector<T> vector,
	Vector<U> result
)

Parameters

function  Func<T, U>
A delegate that represents a function of one variable
vector  Vector<T>
A vector whose elements to apply function to.
result  Vector<U>
The vector that is to hold the result. May be null.

Type Parameters

T
U

Return Value

Vector<U>
The vector result.

Exceptions

ArgumentNullExceptionfunction is null.

MapInto<T, U, V>(Func<T, U, V>, Vector<T>, Vector<U>, Vector<V>)

Applies a function to the corresponding elements of two vectors and returns the result in a third vector.
C#
public static Vector<V> MapInto<T, U, V>(
	Func<T, U, V> function,
	Vector<T> first,
	Vector<U> second,
	Vector<V> result
)

Parameters

function  Func<T, U, V>
A delegate that represents a function of two variables
first  Vector<T>
A vector whose elements serve as the first argument to the function.
second  Vector<U>
A vector whose elements serve as the second argument to the function.
result  Vector<V>
The vector that is to hold the result. May be null.

Type Parameters

T
U
V

Return Value

Vector<V>
A vector whose elements are the result of applying function to the corresponding elements of first and second.

Exceptions

ArgumentNullExceptionfunction is null.

-or-

first is null

-or-

second is null

DimensionMismatchException

The length of first does not equal the length of second.

See Also