Matrix<T>.AddScaledAsLeftCore Method

Definition

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

Overload List

AddScaledAsLeftCore(T, Matrix<T>, Matrix<T>) Adds two matrices.
AddScaledAsLeftCore(T, Vector<T>, Dimension, Matrix<T>) Adds a matrix and a vector broadcast along the specified dimension.
AddScaledAsLeftCore(TransposeOperation, T, Matrix<T>, TransposeOperation, Matrix<T>) Adds a multiple of a matrix to this instance and returns the result.

AddScaledAsLeftCore(T, Matrix<T>, Matrix<T>)

Adds two matrices.
C#
protected virtual Matrix<T> AddScaledAsLeftCore(
	T factor,
	Matrix<T> right,
	Matrix<T> result
)

Parameters

factor  T
The scale factor for right.
right  Matrix<T>
The right operand.
result  Matrix<T>
The matrix that is to hold the result. May be null.

Return Value

Matrix<T>
A matrix whose elements are the sum of the corresponding elements of this matrix and factor times right.

Exceptions

DimensionMismatchException This matrix and right do not have the same length.

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

Adds a matrix and a vector broadcast along the specified dimension.
C#
protected virtual Matrix<T> AddScaledAsLeftCore(
	T factor,
	Vector<T> right,
	Dimension broadcastDimension,
	Matrix<T> result
)

Parameters

factor  T
The scale factor for right.
right  Vector<T>
The right operand.
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.

Return Value

Matrix<T>
A matrix whose elements are the sum of the corresponding elements of this matrix and factor times right.

Exceptions

DimensionMismatchException This matrix and right do not have the same length.

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

Adds a multiple of a matrix to this instance and returns the result.
C#
protected virtual Matrix<T> AddScaledAsLeftCore(
	TransposeOperation leftOperation,
	T factor,
	Matrix<T> right,
	TransposeOperation rightOperation,
	Matrix<T> result
)

Parameters

leftOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on this instance before adding.
factor  T
Multiplier for the matrix right.
right  Matrix<T>
A Matrix<T>.
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.

Return Value

Matrix<T>
A Matrix<T> that is the sum of the specified form of this matrix and the matrix right.

Remarks

This method does not change this instance. The dimensions of the two matrices must be compatible. Otherwise an exception of type DimensionMismatchException is thrown.

Exceptions

ArgumentNullExceptionright is null.
DimensionMismatchExceptionThe dimensions of this instance and the matrix right are not compatible for the specified operation.

See Also