Click or drag to resize

NMathFunctionsSumIf(Int32, FuncDouble, Boolean, Double) Method

Calculates the sum of elements in one array based on evaluating a logical function on corresponding elements in another data.

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

Parameters

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

Return Value

Double
A sum.
Exceptions
ExceptionCondition
MismatchedSizeException Thrown if data and sum do not have the same length;
See Also