Click or drag to resize

NMathFunctionsIf(IDFColumn, FuncDouble, Boolean, Double) Method

Creates a new column by applying a logical function to the elements of a column. Elements in the original column that return true are set to the given true value in the new column; elements that return false are not changed.

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

Parameters

data  IDFColumn
A column.
function  FuncDouble, Boolean
A function that takes a double and returns a boolean.
ifTrue  Double
Value in case of true.

Return Value

IDFColumn
A new column.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if data is not numeric.
See Also