| NMathFunctionsIf(Double, FuncDouble, Boolean, Double) Method |
Creates a new array by applying a logical function to the elements of an
array. Elements in the original array that return true are set to the given true value
in the new array; elements that return false are not changed.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static double[] If(
double[] data,
Func<double, bool> function,
double ifTrue
)
Public Shared Function If (
data As Double(),
function As Func(Of Double, Boolean),
ifTrue As Double
) As Double()
public:
static array<double>^ If(
array<double>^ data,
Func<double, bool>^ function,
double ifTrue
)
static member If :
data : float[] *
function : Func<float, bool> *
ifTrue : float -> float[]
Parameters
- data Double
- An array of doubles.
- function FuncDouble, Boolean
- A function that takes a double and returns a boolean.
- ifTrue Double
- Value in case of true.
Return Value
DoubleA new array.
See Also