SymmetricMatrix<T>.AddSymmetricOuterProduct Method

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2

Overload List

AddSymmetricOuterProduct(T, Matrix<T>, Matrix<T>) Updates a symmetric matrix with the scaled outer product of a vector and its transpose.
AddSymmetricOuterProduct(T, Vector<T>, Vector<T>) Updates a symmetric matrix with the scaled outer product of a vector and a transposed vector.

AddSymmetricOuterProduct(T, Matrix<T>, Matrix<T>)

Updates a symmetric matrix with the scaled outer product of a vector and its transpose.
C#
public SymmetricMatrix<T> AddSymmetricOuterProduct(
	T factor,
	Matrix<T> matrix1,
	Matrix<T> matrix2
)

Parameters

factor  T
The scale factor.
matrix1  Matrix<T>
A Vector<T>.
matrix2  Matrix<T>
A Vector<T>.

Return Value

SymmetricMatrix<T>
A reference to this instance.

Remarks

The symmetric outer product of two vectors A and B is defined as ABT + BAT. Where an outer product of two vectors is in general not symmetrical, adding the transpose ensures that the result is symmetrical.

The length of matrix1 must equal the number of rows and columns of this instance.

This method uses the level 3 BLAS routine DSYR2K.

Exceptions

ArgumentNullException

matrix1 is null.

-or-

matrix2 is null.

DimensionMismatchException

The length of matrix1 or matrix2 does not equal the number of rows in this SymmetricMatrix<T>.

AddSymmetricOuterProduct(T, Vector<T>, Vector<T>)

Updates a symmetric matrix with the scaled outer product of a vector and a transposed vector.
C#
public SymmetricMatrix<T> AddSymmetricOuterProduct(
	T factor,
	Vector<T> left,
	Vector<T> right
)

Parameters

factor  T
The scale factor.
left  Vector<T>
A Vector<T>.
right  Vector<T>
A Vector<T>.

Return Value

SymmetricMatrix<T>
A reference to this instance.

Remarks

The symmetric outer product of two vectors A and B is defined as ABT + BAT. Where an outer product of two vectors is in general not symmetrical, adding the transpose ensures that the result is symmetrical.

The length of left must equal the number of rows and columns of this instance.

This method uses the level 2 BLAS routine DSYR2.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left or right does not equal the number of rows in this SymmetricMatrix<T>.

See Also