Matrix<T>.Map Columns Into<U> Method
Applies a vector function to each column in a matrix
and returns the result as a matrix.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
A matrix whose columns are the result of applying function to each column of the matrix.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
public Matrix<T> MapColumnsInto<U>(
Func<Vector<T>, Vector<U>?, Vector<U>> function,
Matrix<U>? result
)
Parameters
- function Func<Vector<T>, Vector<U>, Vector<U>>
- A delegate that represents a multivariate vector function.
- result Matrix<U>
- The matrix that is to hold the result.
Type Parameters
- U
Return Value
Matrix<T>A matrix whose columns are the result of applying function to each column of the matrix.
Remarks
If result is null, the length of the result of applying function to the first row of the matrix is used as the number of rows in the result.
Exceptions
Argument | function is null. |
Dimension | The number of columns in result does not equal the number of columns in this matrix. |