Vector.Elementwise Multiply Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.7.0
Overload List
| Elementwise | Multiplies the elements of a vector by the corresponding elements of another vector. |
| Elementwise | Multiplies the elements of a vector by the corresponding elements of another vector. |
ElementwiseMultiply<T>(Vector<T>, Vector<T>)
Multiplies the elements of a vector by the corresponding
elements of another vector.
public static Vector<T> ElementwiseMultiply<T>(
Vector<T> left,
Vector<T> right
)
Parameters
Type Parameters
- T
Return Value
Vector<T>A new vector 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>(Vector<T>, Vector<T>, SparseElementwiseMode)
Multiplies the elements of a vector by the corresponding
elements of another vector.
public static Vector<T> ElementwiseMultiply<T>(
Vector<T> left,
Vector<T> right,
SparseElementwiseMode mode
)
Parameters
- left Vector<T>
- The first vector.
- right Vector<T>
- The second vector.
- mode SparseElementwiseMode
- The sparse element-wise arithmetic mode. This parameter affects sparse operands only.
Type Parameters
- T
Return Value
Vector<T>A new vector whose elements are equal to the products of the elements of left and right.
Remarks
The operation chooses the result representation. Sparse structural modes return sparse results when their result pattern is sparse. In Strict mode, sparse operands are treated as logical dense vectors and the result may be dense.
Exceptions
| Argument | left is null. -or- right is null. |
| Argument | mode is not a valid SparseElementwiseMode value. |
| Dimension | The length of left does not equal the length of right. |