| NMathFunctionsSumIf(Int32, FuncInt32, 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.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static double SumIf(
int[] data,
Func<int, bool> function,
double[] sum
)
Public Shared Function SumIf (
data As Integer(),
function As Func(Of Integer, Boolean),
sum As Double()
) As Double
public:
static double SumIf(
array<int>^ data,
Func<int, bool>^ function,
array<double>^ sum
)
static member SumIf :
data : int[] *
function : Func<int, bool> *
sum : float[] -> float
Parameters
- data Int32
- Evaluation data.
- function FuncInt32, Boolean
- A function that takes an integer and returns a boolean.
- sum Double
- Sum data.
Return Value
DoubleA sum.
Exceptions See Also