Creates a new vector by applying a logical function to the elements of a
vector. Elements in the original vector that return true are set to the given true value
in the new vector; elements that return false are not changed.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public static DoubleVector If( DoubleVector data, StatsFunctions..::.LogicalDoubleFunction function, double ifTrue ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function If ( _ data As DoubleVector, _ function As StatsFunctions..::.LogicalDoubleFunction, _ ifTrue As Double _ ) As DoubleVector |
| Visual C++ |
|---|
public: static DoubleVector^ If( DoubleVector^ data, StatsFunctions..::.LogicalDoubleFunction^ function, double ifTrue ) |
Parameters
- data
- Type: CenterSpace.NMath.Core..::.DoubleVector
A vector.
- function
- Type: CenterSpace.NMath.Stats..::.StatsFunctions..::.LogicalDoubleFunction
A function that takes a double and returns a boolean.
- ifTrue
- Type: System..::.Double
Value in case of true.