Matrix.AddInto Method

Definition

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

Overload List

AddInto<T>(Matrix<T>, T, Matrix<T>) Adds a matrix and a scalar.
AddInto<T>(Matrix<T>, Matrix<T>, Matrix<T>) Adds two matrices.
AddInto<T>(T, Matrix<T>, Matrix<T>) Adds a matrix and a scalar.
AddInto<T>(Matrix<T>, Vector<T>, Dimension, Matrix<T>) Adds a matrix and a vector broadcast along the specified dimension.
AddInto<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation, Matrix<T>) Adds two matrices after applying the specified operation to the operands.

AddInto<T>(Matrix<T>, T, Matrix<T>)

Adds a matrix and a scalar.
C#
public static Matrix<T> AddInto<T>(
	Matrix<T> matrix,
	T value,
	Matrix<T> result
)

Parameters

matrix  Matrix<T>
A matrix.
value  T
The constant.
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 sum of the corresponding elements of matrix and value.

Exceptions

ArgumentNullExceptionmatrix is null.

AddInto<T>(Matrix<T>, Matrix<T>, Matrix<T>)

Adds two matrices.
C#
public static Matrix<T> AddInto<T>(
	Matrix<T> left,
	Matrix<T> right,
	Matrix<T> result
)

Parameters

left  Matrix<T>
The first matrix.
right  Matrix<T>
The second 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 the sum of the corresponding elements of left and right.

Exceptions

ArgumentNullExceptionleft is null

-or-

right is null

DimensionMismatchException The dimensions of left and right are not compatible.

AddInto<T>(T, Matrix<T>, Matrix<T>)

Adds a matrix and a scalar.
C#
public static Matrix<T> AddInto<T>(
	T value,
	Matrix<T> matrix,
	Matrix<T> result
)

Parameters

value  T
The constant.
matrix  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 the sum of the corresponding elements of matrix and value.

Exceptions

ArgumentNullExceptionmatrix is null

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

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

Parameters

left  Matrix<T>
The first matrix.
right  Vector<T>
The second matrix.
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 sum of the corresponding elements of left and right.

Exceptions

ArgumentNullExceptionleft is null

-or-

right is null

DimensionMismatchException The dimensions of left and right are not compatible.

AddInto<T>(Matrix<T>, TransposeOperation, Matrix<T>, TransposeOperation, Matrix<T>)

Adds two matrices after applying the specified operation to the operands.
C#
public static Matrix<T> AddInto<T>(
	Matrix<T> left,
	TransposeOperation leftOperation,
	Matrix<T> right,
	TransposeOperation rightOperation,
	Matrix<T> result
)

Parameters

left  Matrix<T>
The first matrix.
leftOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on the matrix left before adding.
right  Matrix<T>
The second matrix.
rightOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on the matrix right before adding.
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 sum of the corresponding elements of left and right.

Exceptions

ArgumentNullExceptionleft is null

-or-

right is null

DimensionMismatchException THe dimensions of left and right as transformed by leftOperation and rightOperation, respectively, are not compatible.

See Also