Matrix.Add Method
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Add<T>(Matrix<T>, T) | Adds a matrix and a scalar. |
Add<T>(Matrix<T>, Matrix<T>) | Adds two matrices. |
Add<T>(T, Matrix<T>) | Adds a matrix and a scalar. |
Add<T>(Matrix<T>, Vector<T>, Dimension) | Adds a matrix and a vector broadcast along the specified dimension. |
Add<T>(Vector<T>, Dimension, Vector<T>) | Adds two broadcast vectors to form a matrix. |
Add<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation) | Adds two matrices after applying the specified operation to the operands. |
Add<T>(Matrix<T>, T)
Adds a matrix and a scalar.
public static Matrix<T> Add<T>(
Matrix<T> matrix,
T value
)
Parameters
- matrix Matrix<T>
- A matrix.
- value T
- The constant.
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 |
Add<T>(Matrix<T>, Matrix<T>)
Adds two matrices.
public static Matrix<T> Add<T>(
Matrix<T> left,
Matrix<T> right
)
Parameters
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 | left and right do not have the same length. |
Add<T>(T, Matrix<T>)
Adds a matrix and a scalar.
public static Matrix<T> Add<T>(
T value,
Matrix<T> matrix
)
Parameters
- value T
- The constant.
- matrix Matrix<T>
- A matrix.
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 |
Add<T>(Matrix<T>, Vector<T>, Dimension)
Adds a matrix and a vector broadcast along the specified dimension.
public static Matrix<T> Add<T>(
Matrix<T> left,
Vector<T> right,
Dimension broadcastDimension
)
Parameters
- left Matrix<T>
- A matrix.
- right Vector<T>
- A vector.
- broadcastDimension Dimension
- A value that specifies whether the elements in right should be broadcast across rows or columns.
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 | left and right do not have the same dimension. |
Add<T>(Vector<T>, Dimension, Vector<T>)
Adds two broadcast vectors to form a matrix.
public static Matrix<T> Add<T>(
Vector<T> left,
Dimension leftBroadcastDimension,
Vector<T> right
)
Parameters
- left Vector<T>
- A matrix.
- leftBroadcastDimension Dimension
- A value that specifies whether the elements in left should be broadcast across rows or columns.
- right Vector<T>
- A vector.
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 |
Add<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation)
Adds two matrices after applying the specified operation to the operands.
public static Matrix<T> Add<T>(
Matrix<T> left,
TransposeOperation leftOperation,
Matrix<T> right,
TransposeOperation rightOperation
)
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.
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. |