DenseMatrix<T>.AddOuterProductInPlace Method

Definition

Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Updates a matrix with an outer product of two vectors.

Overload List

AddOuterProductInPlace(Vector<T>) Updates a matrix with the outer product of a vector and itself.
AddOuterProductInPlace(T, Vector<T>) Updates a matrix with the scaled outer product of a vector and itself.
AddOuterProductInPlace(Vector<T>, Vector<T>) Updates a matrix with the outer product of two vectors.
AddOuterProductInPlace(T, Vector<T>, Vector<T>) Updates a matrix with the scaled outer product of two vectors.

AddOuterProductInPlace(Vector<T>)

Updates a matrix with the outer product of a vector and itself.
C#
public DenseMatrix<T> AddOuterProductInPlace(
	Vector<T> vector
)

Parameters

vector  Vector<T>
A Vector<T>.

Return Value

DenseMatrix<T>
A reference to this instance.

Remarks

The matrix must be square. The length of the vector vector must equal the number of rows and columns of this matrix. Otherwise, an exception of type DimensionMismatchException is thrown.

This operation is sometimes called vector rank-1 update.

Exceptions

DimensionMismatchException

The length of vector does not equal the number of rows and columns of the matrix.

AddOuterProductInPlace(T, Vector<T>)

Updates a matrix with the scaled outer product of a vector and itself.
C#
public DenseMatrix<T> AddOuterProductInPlace(
	T factor,
	Vector<T> vector
)

Parameters

factor  T
The scale factor.
vector  Vector<T>
A Vector<T>.

Return Value

DenseMatrix<T>
A reference to this instance.

Remarks

The matrix must be square. The length of the vector vector must equal the number of rows and columns of this matrix. Otherwise, an exception of type DimensionMismatchException is thrown.

This operation is sometimes called vector rank-1 update.

Exceptions

ArgumentNullException

vector is null.

DimensionMismatchException

The length of vector does not equal the number of rows and columns of the matrix.

AddOuterProductInPlace(Vector<T>, Vector<T>)

Updates a matrix with the outer product of two vectors.
C#
public DenseMatrix<T> AddOuterProductInPlace(
	Vector<T> left,
	Vector<T> right
)

Parameters

left  Vector<T>
The first (column) vector.
right  Vector<T>
The second (row) vector.

Return Value

DenseMatrix<T>
A reference to this instance.

Remarks

The length of the vector left must equal the number of rows of this matrix. The length of the vector right must equal the number of columns of this matrix. If either condition is violated, an exception of type DimensionMismatchException is thrown.

This operation is sometimes called left rank-1 update.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left does not equal the number of rows in this matrix, or the length of left does not equal the number of columns.

AddOuterProductInPlace(T, Vector<T>, Vector<T>)

Updates a matrix with the scaled outer product of two vectors.
C#
public DenseMatrix<T> AddOuterProductInPlace(
	T factor,
	Vector<T> left,
	Vector<T> right
)

Parameters

factor  T
The scale factor.
left  Vector<T>
The first (column) vector.
right  Vector<T>
The second (row) vector.

Return Value

DenseMatrix<T>
A reference to this instance.

Remarks

The length of the vector left must equal the number of rows of this matrix. The length of the vector right must equal the number of columns of this matrix. If either condition is violated, an exception of type DimensionMismatchException is thrown.

This operation is sometimes called left rank-1 update.

Exceptions

ArgumentNullException

left is null.

-or-

right is null.

DimensionMismatchException

The length of left does not equal the number of rows in this matrix, or the length of left does not equal the number of columns.

See Also