Vector.Outer Product Into<T> Method
Returns a matrix that is the outer product of two vectors.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0
C#
A dense matrix that is the outer product of left and right.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0
public static DenseMatrix<T> OuterProductInto<T>(
Vector<T> left,
Vector<T> right,
Matrix<T>? result = null
)
Parameters
- left Vector<T>
- The first (column) vector.
- right Vector<T>
- The second (row) vector.
- result Matrix<T> (Optional)
- Optional. The matrix that is to hold the result.
Type Parameters
- T
Return Value
DenseMatrix<T>A dense matrix that is the outer product of left and right.
Remarks
If result is not null, then the length of the vector left must equal the number of rows of result. and the length of the vector right must equal the number of columns of result. If either condition is violated, an exception of type DimensionMismatchException is thrown.
Exceptions
Argument | left is null. -or- right is null. |
Dimension | The length of left does not equal the number of rows in result -or- The length of left does not equal the number of columns in result. |