Returns a new numeric column with the given name and same size as this
column, whose values are the result of applying the given double binary
function to each element of this column.
The first parameter to the binary function is an element of self; the
second parameter is the corresponding element of the passed vector.
Namespace:
CenterSpace.NMath.StatsAssembly: NMathStats (in NMathStats.dll) Version: 3.4.0.0
Syntax
| C# |
|---|
public DFNumericColumn Apply( string name, NMathFunctions..::.DoubleBinaryFunction function, DoubleVector v ) |
| Visual Basic (Declaration) |
|---|
Public Function Apply ( _ name As String, _ function As NMathFunctions..::.DoubleBinaryFunction, _ v As DoubleVector _ ) As DFNumericColumn |
| Visual C++ |
|---|
public: DFNumericColumn^ Apply( String^ name, NMathFunctions..::.DoubleBinaryFunction^ function, DoubleVector^ v ) |
Parameters
- name
- Type: System..::.String
Name for the new column.
- function
- Type: CenterSpace.NMath.Core..::.NMathFunctions..::.DoubleBinaryFunction
A delegate object representing a function that takes two double parameters and returns a double.
- v
- Type: CenterSpace.NMath.Core..::.DoubleVector
A vector of parameters to function.
Return Value
A column with the same name and size as self and with c[i] = function( this[i], v[i] )
Remarks
An attempt will be made to convert each value in this column to a
double to perform the operation. No data in this column will
be changed.
Exceptions
| Exception | Condition |
|---|---|
| CenterSpace.NMath.Core..::.MismatchedSizeException | Thrown if the passed vector is not the same length as this column. |
| CenterSpace.NMath.Core..::.InvalidArgumentException | Thrown if the values in this column cannot be converted to numeric values. |