Matrix<T>.Subtraction Operator

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

Subtraction(T, Matrix<T>) Subtracts a matrix from a scalar.
Subtraction(Matrix<T>, T) Subtracts a scalar from a matrix.
Subtraction(Matrix<T>, Matrix<T>) Subtracts two matrices.

Subtraction(T, Matrix<T>) Operator

Subtracts a matrix from a scalar.
C#
public static Matrix<T> operator -(
	T value,
	Matrix<T> matrix
)

Parameters

value  T
The constant.
matrix  Matrix<T>
A matrix.

Return Value

Matrix<T>
A matrix whose elements are the difference between the corresponding elements of matrix and value.

Exceptions

ArgumentNullExceptionmatrix is null

Subtraction(Matrix<T>, T) Operator

Subtracts a scalar from a matrix.
C#
public static Matrix<T> operator -(
	Matrix<T> matrix,
	T value
)

Parameters

matrix  Matrix<T>
A matrix.
value  T
The constant.

Return Value

Matrix<T>
A matrix whose elements are the difference of the corresponding elements of matrix and value.

Exceptions

ArgumentNullExceptionmatrix is null

Subtraction(Matrix<T>, Matrix<T>) Operator

Subtracts two matrices.
C#
public static Matrix<T> operator -(
	Matrix<T> left,
	Matrix<T> right
)

Parameters

left  Matrix<T>
The matrix to subtract from.
right  Matrix<T>
The matrix to subtract.

Return Value

Matrix<T>
A matrix whose elements are equal to the corresponding element of left minus the corresponding element of right.

Exceptions

ArgumentNullExceptionleft is null

-or-

right is null

DimensionMismatchExceptionleft and right do not have the same length.

See Also