Click or drag to resize

NMathFunctionsNaNSumIf(DoubleVector, FuncDouble, Boolean, DoubleVector) Method

Calculates the sum of elements in one vector based on evaluating a logical function on corresponding elements in another vector that are not NaN.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static double NaNSumIf(
	DoubleVector data,
	Func<double, bool> function,
	DoubleVector sum
)

Parameters

data  DoubleVector
Evaluation vector.
function  FuncDouble, Boolean
A function that takes a double and returns a boolean.
sum  DoubleVector
Sum vector.

Return Value

Double
A sum.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if data and sum do not have the same number of elements that are not NaN.
See Also