SymmetricMatrix<T>.AddSymmetricOuterProduct Method

Definition

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

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

ArgumentNullExceptionmatrix1 is null.

-or-

matrix2 is null.

DimensionMismatchExceptionThe 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

ArgumentNullExceptionleft is null.

-or-

right is null.

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

See Also