Click or drag to resize

NMathFunctionsSumIf(IDFColumn, FuncInt32, Boolean, IDFColumn) Method

Calculates the sum of elements in one column 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(
	IDFColumn data,
	Func<int, bool> function,
	IDFColumn sum
)

Parameters

data  IDFColumn
Evaluation data.
function  FuncInt32, Boolean
A function that takes an integer and returns a boolean.
sum  IDFColumn
Sum data.

Return Value

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