Matrix.ElementwiseMultiplyInto Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4

Overload List

ElementwiseMultiplyInto<T>(Matrix<T>, Matrix<T>, Matrix<T>) Multiplies a matrix element-wise by another matrix.
ElementwiseMultiplyInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>) Multiplies the elements of a matrix and a vector broadcast along the specified dimension elementwise.
ElementwiseMultiplyInto<T>(Vector<T>, Dimension, Vector<T>, Matrix<T>) Multiplies the elements of two broadcast vectors along the specified dimension elementwise.

ElementwiseMultiplyInto<T>(Matrix<T>, Matrix<T>, Matrix<T>)

Multiplies a matrix element-wise by another matrix.
C#
public static Matrix<T> ElementwiseMultiplyInto<T>(
	Matrix<T> left,
	Matrix<T> right,
	Matrix<T>? result
)

Parameters

left  Matrix<T>
A matrix.
right  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 equal to the products of the elements of left and right .

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left does not equal the length of right.

ElementwiseMultiplyInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>)

Multiplies the elements of a matrix and a vector broadcast along the specified dimension elementwise.
C#
public static Matrix<T> ElementwiseMultiplyInto<T>(
	Matrix<T> left,
	Vector<T> right,
	Dimension broadcastDimension,
	Matrix<T>? result
)

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.
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 product of the corresponding elements of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

left and right do not have the same dimension.

ElementwiseMultiplyInto<T>(Vector<T>, Dimension, Vector<T>, Matrix<T>)

Multiplies the elements of two broadcast vectors along the specified dimension elementwise.
C#
public static Matrix<T> ElementwiseMultiplyInto<T>(
	Vector<T> left,
	Dimension leftBroadcastDimension,
	Vector<T> right,
	Matrix<T>? result
)

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.
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 product of the corresponding elements of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The dimensions of result are not compatible with the length of left or right.

See Also