Vector<T>.MapWhere<U>(Func<T, Boolean>, Func<T, U>) Method

Applies a function to the elements of a vector that meet a condition and returns the result.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public Vector<U> MapWhere<U>(
	Func<T, bool> condition,
	Func<T, U> function
)

Parameters

condition  Func<T, Boolean>
A predicate that computes whether a value should be mapped.
function  Func<T, U>
A delegate that represents a function of one variable

Type Parameters

U

Return Value

Vector<U>
The result of applying function to each element of this vector that matches condition. When condition is false, a missing value is returned.

Exceptions

ArgumentNullException

function is null.

-or-

condition is null.

See Also