Matrix.ElementwiseDivide Method

Definition

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

Overload List

ElementwiseDivide<T>(Matrix<T>, Matrix<T>) Divides a matrix element-wise by another matrix.
ElementwiseDivide<T>(T, Matrix<T>) Divides a scalar by each element of a matrix.
ElementwiseDivide<T>(Matrix<T>, Vector<T>, Dimension) Divides the elements of a matrix by the elements of a vector broadcast along the specified dimension.
ElementwiseDivide<T>(Vector<T>, Dimension, Vector<T>) Divides the elements of two broadcast vectors along the specified dimension.

ElementwiseDivide<T>(Matrix<T>, Matrix<T>)

Divides a matrix element-wise by another matrix.
C#
public static Matrix<T> ElementwiseDivide<T>(
	Matrix<T> left,
	Matrix<T> right
)

Parameters

left  Matrix<T>
A matrix.
right  Matrix<T>
A matrix.

Type Parameters

T

Return Value

Matrix<T>
A new matrix whose elements are equal to the quotient of the elements of left divided right .

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

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

ElementwiseDivide<T>(T, Matrix<T>)

Divides a scalar by each element of a matrix.
C#
public static Matrix<T> ElementwiseDivide<T>(
	T left,
	Matrix<T> right
)

Parameters

left  T
A scalar.
right  Matrix<T>
A matrix.

Type Parameters

T

Return Value

Matrix<T>
A new matrix whose elements are equal to the quotient of the elements of left divided right .

Exceptions

ArgumentNullException

right is null.

DimensionMismatchException

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

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

Divides the elements of a matrix by the elements of a vector broadcast along the specified dimension.
C#
public static Matrix<T> ElementwiseDivide<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 quotient 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.

ElementwiseDivide<T>(Vector<T>, Dimension, Vector<T>)

Divides the elements of two broadcast vectors along the specified dimension.
C#
public static Matrix<T> ElementwiseDivide<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 quotient of the corresponding elements of left and right.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

See Also