Matrix<T>.Map As First Core Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Map | Applies a function to the corresponding elements of two matrices. |
Map | Applies a function to the corresponding elements of a matrix and a vector broadcast along the specified dimension. |
MapAsFirstCore<U, V>(Func<T, U, V>, Matrix<U>, Matrix<V>)
Applies a function to the corresponding elements of two matrices.
protected virtual Matrix<V> MapAsFirstCore<U, V>(
Func<T, U, V> function,
Matrix<U> second,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- second Matrix<U>
- A matrix whose elements serve as the second argument to the function.
- result Matrix<V>
- The matrix that is to hold the result. May be null.
Type Parameters
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of this matrix and second.
Exceptions
Argument | function is null. -or- second is null. |
Dimension | The dimensions of second do not equal the dimensions of this matrix. |
MapAsFirstCore<U, V>(Func<T, U, V>, Vector<U>, Dimension, Matrix<V>)
Applies a function to the corresponding elements of a matrix and a vector broadcast
along the specified dimension.
protected virtual Matrix<V> MapAsFirstCore<U, V>(
Func<T, U, V> function,
Vector<U> second,
Dimension broadcastDimension,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- second Vector<U>
- A vector whose elements, broadcast in the dimension specified by broadcastDimension, serve as the second argument to the function.
- broadcastDimension Dimension
- A value that specifies whether the elements in second should be broadcast across rows or columns.
- result Matrix<V>
- The matrix that is to hold the result. May be null.
Type Parameters
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of this matrix and second.
Exceptions
Argument | function is null. -or- second is null. |
Dimension | The dimensions of second do not equal the dimensions of this matrix. |