Matrix.Subtract Into Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Subtract | Subtracts two matrices. |
Subtract | Subtracts one matrix from another. |
Subtract | Subtracts a matrix from a scalar. |
Subtract | Subtracts a vector broadcast along the specified dimension from a matrix. |
SubtractInto<T>(Matrix<T>, T, Matrix<T>)
Subtracts two matrices.
public static Matrix<T> SubtractInto<T>(
Matrix<T> matrix,
T value,
Matrix<T>? result
)
Parameters
- matrix Matrix<T>
- The matrix to subtract from.
- value T
- The value to subtract.
- result Matrix<T>
- The matrix that is to hold the result. May be null.
Type Parameters
- T
Return Value
Matrix<T>A matrix whose elements are equal to the corresponding element of matrix minus value.
Exceptions
Argument | matrix is null. -or- result is null. |
Dimension | matrix and result do not have the same length. |
SubtractInto<T>(Matrix<T>, Matrix<T>, Matrix<T>)
Subtracts one matrix from another.
public static Matrix<T> SubtractInto<T>(
Matrix<T> left,
Matrix<T> right,
Matrix<T>? result
)
Parameters
- left Matrix<T>
- The matrix to subtract from.
- right Matrix<T>
- The matrix to subtract.
- result Matrix<T>
- The matrix that is to hold the result. May be null.
Type Parameters
- T
Return Value
Matrix<T>A matrix whose elements are equal to the corresponding element of left minus the corresponding element of right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | left and right do not have the same length. |
SubtractInto<T>(T, Matrix<T>, Matrix<T>)
Subtracts a matrix from a scalar.
public static Matrix<T> SubtractInto<T>(
T value,
Matrix<T> matrix,
Matrix<T>? result
)
Parameters
- value T
- The value to subtract from.
- matrix Matrix<T>
- The matrix to subtract.
- result Matrix<T>
- The matrix that is to hold the result. May be null.
Type Parameters
- T
Return Value
Matrix<T>A matrix whose elements are equal to the corresponding element of value minus the corresponding element of matrix.
Exceptions
Argument | matrix is null. |
Dimension | matrix and result do not have the same length. |
SubtractInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>)
Subtracts a vector broadcast along the specified dimension from a matrix.
public static Matrix<T> SubtractInto<T>(
Matrix<T> left,
Vector<T> right,
Dimension broadcastDimension,
Matrix<T>? result
)
Parameters
- left Matrix<T>
- The matrix to subtract from.
- right Vector<T>
- The vector to broadcast and subtract.
- broadcastDimension Dimension
- A value that specifies whether the elements in right should be broadcast across rows or columns.
- result Matrix<T>
- The matrix that is to hold the result. May be null.
Type Parameters
- T
Return Value
Matrix<T>A matrix whose elements are equal to the corresponding element of left minus the corresponding element of right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | left and right do not have the same length. |