Applies a function to the elements of a vector that meet a condition and returns the result.
Namespace:
Extreme.Mathematics
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public Vector<U> MapWhere<U>(
Func<int, T, bool> condition,
Func<T, U> function
)
Public Function MapWhere(Of U) (
condition As Func(Of Integer, T, Boolean),
function As Func(Of T, U)
) As Vector(Of U)
public:
generic<typename U>
Vector<U>^ MapWhere(
Func<int, T, bool>^ condition,
Func<T, U>^ function
)
member MapWhere :
condition : Func<int, 'T, bool> *
function : Func<'T, 'U> -> Vector<'U>
Parameters
- condition
- Type: SystemFuncInt32, T, Boolean
A predicate that computes whether a value should be mapped
based on the index and value of the element. - function
- Type: SystemFuncT, U
A delegate that represents a function of one variable
Type Parameters
- U
Return Value
Type:
VectorUThe result of applying
function
to each element of this vector that matches
condition.
When
condition is
, a missing value
is returned.
Reference