Matrix.Map Into Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Map | Applies a function to the elements of a matrix. |
Map | Applies a function to the corresponding elements of two matrices and returns the result in a third matrix. |
Map | Applies a function to the corresponding elements of two matrices and returns the result in a third matrix. |
Map | Applies a function to the corresponding elements of two matrices and returns the result in a third matrix. |
Map | Applies a function to the corresponding elements of two broadcast vectors and returns the result in a third matrix. |
MapInto<T, U>(Func<T, U>, Matrix<T>, Matrix<U>)
public static Matrix<U> MapInto<T, U>(
Func<T, U> function,
Matrix<T> matrix,
Matrix<U>? result
)
Parameters
- function Func<T, U>
- A delegate that represents a function of one variable
- matrix Matrix<T>
- A matrix whose elements to apply function to.
- result Matrix<U>
- The matrix that is to hold the result. May be null.
Type Parameters
- T
- U
Return Value
Matrix<U>The matrix result.
Exceptions
Argument | function is null. |
MapInto<T, U, V>(Func<T, U, V>, Matrix<T>, Matrix<U>, Matrix<V>)
public static Matrix<V> MapInto<T, U, V>(
Func<T, U, V> function,
Matrix<T> first,
Matrix<U> second,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- first Matrix<T>
- A matrix whose elements serve as the first argument to the function.
- 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
- T
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of first and second.
Exceptions
Argument | function is null. -or- first is null. -or- second is null. |
Dimension | The number of rows of first does not equal the number of rows of second. -or- The number of columns of first does not equal the number of columns of second. |
MapInto<T, U, V>(Func<T, U, V>, Matrix<T>, Vector<U>, Dimension, Matrix<V>)
public static Matrix<V> MapInto<T, U, V>(
Func<T, U, V> function,
Matrix<T> first,
Vector<U> second,
Dimension broadcastDimension,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- first Matrix<T>
- A matrix whose elements serve as the first argument to the function.
- 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
- T
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of first and second.
Exceptions
Argument | function is null. -or- first is null. -or- second is null. |
Dimension | The number of rows of first does not equal the number of rows of second. -or- The number of columns of first does not equal the number of columns of second. |
MapInto<T, U, V>(Func<T, U, V>, Vector<T>, Dimension, Matrix<U>, Matrix<V>)
public static Matrix<V> MapInto<T, U, V>(
Func<T, U, V> function,
Vector<T> first,
Dimension broadcastDimension,
Matrix<U> second,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- first Vector<T>
- A vector whose elements, broadcast in the dimension specified by broadcastDimension, serve as the first argument to the function.
- broadcastDimension Dimension
- A value that specifies whether the elements in first should be broadcast across rows or columns.
- 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
- T
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of first and second.
Exceptions
Argument | function is null. -or- first is null. -or- second is null. |
Dimension | The number of rows of first does not equal the number of rows of second. -or- The number of columns of first does not equal the number of columns of second. |
MapInto<T, U, V>(Func<T, U, V>, Vector<T>, Dimension, Vector<U>, Matrix<V>)
public static Matrix<V> MapInto<T, U, V>(
Func<T, U, V> function,
Vector<T> first,
Dimension firstBroadcastDimension,
Vector<U> second,
Matrix<V>? result
)
Parameters
- function Func<T, U, V>
- A delegate that represents a function of two variables
- first Vector<T>
- A vector whose elements, broadcast in the dimension specified by firstBroadcastDimension, serve as the first argument to the function.
- firstBroadcastDimension Dimension
- A value that specifies whether the elements in first should be broadcast across rows or columns.
- second Vector<U>
- A vector 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
- T
- U
- V
Return Value
Matrix<V>The result of applying function to the corresponding elements of first and second.
Exceptions
Argument | function is null. -or- first is null. -or- second is null. |
Dimension | The number of rows of first does not equal the number of rows of second. -or- The number of columns of first does not equal the number of columns of second. |