Matrix.SubtractInto Method

Definition

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

Overload List

SubtractInto<T>(Matrix<T>, T, Matrix<T>) Subtracts two matrices.
SubtractInto<T>(Matrix<T>, Matrix<T>, Matrix<T>) Subtracts one matrix from another.
SubtractInto<T>(T, Matrix<T>, Matrix<T>) Subtracts a matrix from a scalar.
SubtractInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>) Subtracts a vector broadcast along the specified dimension from a matrix.

SubtractInto<T>(Matrix<T>, T, Matrix<T>)

Subtracts two matrices.
C#
public static Matrix<T> SubtractInto<T>(
	Matrix<T> matrix,
	T value,
	Matrix<T> result
)

Parameters

matrix  Matrix<T>
The matrix to subtract from.
value  T
The value to subtract.
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 corresponding element of matrix minus value.

Exceptions

ArgumentNullExceptionmatrix is null

-or-

result is null

DimensionMismatchExceptionmatrix and result do not have the same length.

SubtractInto<T>(Matrix<T>, Matrix<T>, Matrix<T>)

Subtracts one matrix from another.
C#
public static Matrix<T> SubtractInto<T>(
	Matrix<T> left,
	Matrix<T> right,
	Matrix<T> result
)

Parameters

left  Matrix<T>
The matrix to subtract from.
right  Matrix<T>
The matrix to subtract.
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 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.

SubtractInto<T>(T, Matrix<T>, Matrix<T>)

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

Parameters

value  T
The value to subtract from.
matrix  Matrix<T>
The matrix to subtract.
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 corresponding element of value minus the corresponding element of matrix.

Exceptions

ArgumentNullExceptionmatrix is null
DimensionMismatchExceptionmatrix and result do not have the same length.

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

Subtracts a vector broadcast along the specified dimension from a matrix.
C#
public static Matrix<T> SubtractInto<T>(
	Matrix<T> left,
	Vector<T> right,
	Dimension broadcastDimension,
	Matrix<T> result
)

Parameters

left  Matrix<T>
The matrix to subtract from.
right  Vector<T>
The vector to broadcast and subtract.
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 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