Returns a new matrix with the same size as this matrix, whose values are the result of applying the given binary function to each element of this matrix. The first parameter to the binary function is the matrix element; the second parameter is the corresponding element of the passed matrix.

Namespace:  CenterSpace.NMath.Core
Assembly:  NMath (in NMath.dll) Version: 5.1.0.0

Syntax

C#
public FloatMatrix Apply(
	NMathFunctions..::.FloatBinaryFunction function,
	FloatMatrix B
)
Visual Basic (Declaration)
Public Function Apply ( _
	function As NMathFunctions..::.FloatBinaryFunction, _
	B As FloatMatrix _
) As FloatMatrix
Visual C++
public:
FloatMatrix^ Apply(
	NMathFunctions..::.FloatBinaryFunction^ function, 
	FloatMatrix^ B
)

Parameters

function
Type: CenterSpace.NMath.Core..::.NMathFunctions..::.FloatBinaryFunction
A delegate object representing a function that takes two float parameters and returns a float.
B
Type: CenterSpace.NMath.Core..::.FloatMatrix
Another matrix.

Return Value

A matrix C with the same size as self and with C[i,j]=function(this[i,j],B[i,j]).

Exceptions

ExceptionCondition
CenterSpace.NMath.Core..::.MismatchedSizeExceptionThrown if the passed matrix does not have the same dimensions as this matrix.

See Also