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

Namespace:  CenterSpace.NMath.Stats
Assembly:  NMathStats (in NMathStats.dll) Version: 3.4.0.0

Syntax

C#
public static double NaNSumIf(
	double[] data,
	StatsFunctions..::.LogicalDoubleFunction function,
	double[] sum
)
Visual Basic (Declaration)
Public Shared Function NaNSumIf ( _
	data As Double(), _
	function As StatsFunctions..::.LogicalDoubleFunction, _
	sum As Double() _
) As Double
Visual C++
public:
static double NaNSumIf(
	array<double>^ data, 
	StatsFunctions..::.LogicalDoubleFunction^ function, 
	array<double>^ sum
)

Parameters

data
Type: array< System..::.Double >[]()[]
Evaluation data.
function
Type: CenterSpace.NMath.Stats..::.StatsFunctions..::.LogicalDoubleFunction
A function that takes a double and returns a boolean.
sum
Type: array< System..::.Double >[]()[]
Sum data.

Return Value

A sum.

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.MismatchedSizeException Thrown if data and sum do not have the same number of elements that are not NaN.

See Also