Matrix.Add Into 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
Add | Adds a matrix and a scalar. |
Add | Adds two matrices. |
Add | Adds a matrix and a scalar. |
Add | Adds a matrix and a vector broadcast along the specified dimension. |
Add | Adds two matrices after applying the specified operation to the operands. |
AddInto<T>(Matrix<T>, T, Matrix<T>)
Adds a matrix and a scalar.
public static Matrix<T> AddInto<T>(
Matrix<T> matrix,
T value,
Matrix<T>? result
)
Parameters
- matrix Matrix<T>
- A matrix.
- value T
- The constant.
- 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 the sum of the corresponding elements of matrix and value.
Exceptions
Argument | matrix is null. |
AddInto<T>(Matrix<T>, Matrix<T>, Matrix<T>)
Adds two matrices.
public static Matrix<T> AddInto<T>(
Matrix<T> left,
Matrix<T> right,
Matrix<T>? result
)
Parameters
- left Matrix<T>
- The first matrix.
- right Matrix<T>
- The second matrix.
- 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 the sum of the corresponding elements of left and right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | The dimensions of left and right are not compatible. |
AddInto<T>(T, Matrix<T>, Matrix<T>)
Adds a matrix and a scalar.
public static Matrix<T> AddInto<T>(
T value,
Matrix<T> matrix,
Matrix<T>? result
)
Parameters
- value T
- The constant.
- matrix Matrix<T>
- A matrix.
- 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 the sum of the corresponding elements of matrix and value.
Exceptions
Argument | matrix is null. |
AddInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>)
Adds a matrix and a vector broadcast along the specified dimension.
public static Matrix<T> AddInto<T>(
Matrix<T> left,
Vector<T> right,
Dimension broadcastDimension,
Matrix<T>? result
)
Parameters
- left Matrix<T>
- The first matrix.
- right Vector<T>
- The second matrix.
- 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 the sum of the corresponding elements of left and right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | The dimensions of left and right are not compatible. |
AddInto<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation, Matrix<T>)
Adds two matrices after applying the specified operation to the operands.
public static Matrix<T> AddInto<T>(
Matrix<T> left,
TransposeOperation leftOperation,
Matrix<T> right,
TransposeOperation rightOperation,
Matrix<T>? result
)
Parameters
- left Matrix<T>
- The first matrix.
- leftOperation TransposeOperation
- A TransposeOperation value that indicates which operation, if any, should be performed on the matrix left before adding.
- right Matrix<T>
- The second matrix.
- rightOperation TransposeOperation
- A TransposeOperation value that indicates which operation, if any, should be performed on the matrix right before adding.
- 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 the sum of the corresponding elements of left and right.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | THe dimensions of left and right as transformed by leftOperation and rightOperation, respectively, are not compatible. |