Matrix<T>.AddCore Method

Definition

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

Overload List

AddCore(T, Matrix<T>)

Adds a scalar to a matrix in-place.
C#
protected virtual Matrix<T> AddCore(
	T value,
	Matrix<T>? result
)

Parameters

value  T
The constant.
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 value.

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

Adds two matrices.
C#
protected virtual Matrix<T> AddCore(
	TransposeOperation operation,
	Matrix<T> other,
	TransposeOperation otherOperation,
	Matrix<T>? result
)

Parameters

operation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on this instance before adding.
other  Matrix<T>
The second matrix.
otherOperation  TransposeOperation
A TransposeOperation value that indicates which operation, if any, should be performed on the matrix other before adding.
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 other.

Exceptions

DimensionMismatchException

This matrix and other do not have the same length.

See Also