Matrix.Elementwise Multiply Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Elementwise | Multiplies the elements of a matrix by the corresponding elements of another matrix. |
Elementwise | Multiplies the elements of a matrix and a vector broadcast along the specified dimension elementwise. |
Elementwise | Multiplies the elements of two broadcast vectors. |
ElementwiseMultiply<T>(Matrix<T>, Matrix<T>)
Multiplies the elements of a matrix by the corresponding
elements of another matrix.
public static Matrix<T> ElementwiseMultiply<T>(
Matrix<T> left,
Matrix<T> right
)
Parameters
Type Parameters
- T
Return Value
Matrix<T>A new matrix whose elements are equal to the products of the elements of left and right .
Exceptions
Argument | left is null. -or- right is null. |
Dimension | The length of left does not equal the length of right. |
ElementwiseMultiply<T>(Matrix<T>, Vector<T>, Dimension)
Multiplies the elements of a matrix and a vector broadcast along the specified dimension
elementwise.
public static Matrix<T> ElementwiseMultiply<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 product 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. |
ElementwiseMultiply<T>(Vector<T>, Dimension, Vector<T>)
Multiplies the elements of two broadcast vectors.
public static Matrix<T> ElementwiseMultiply<T>(
Vector<T> left,
Dimension leftBroadcastDimension,
Vector<T> right
)
Parameters
- left Vector<T>
- A vector.
- 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 product of the corresponding elements of left and right.
Exceptions
Argument | left is null. -or- right is null. |