Vector<T>.Add Scaled Product In Place Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
Overload List
Add | Adds the scaled product of a matrix and a Vector<T> to this Vector<T>. |
Add | Adds the scaled product of a matrix and a vector in-place to a vector. |
AddScaledProductInPlace(T, LinearOperator<T>, Vector<T>)
public virtual Vector<T> AddScaledProductInPlace(
T factor,
LinearOperator<T> matrix,
Vector<T> vector
)
Parameters
- factor T
- The scale factor for the matrix-vector product.
- matrix LinearOperator<T>
- A Matrix<T>.
- vector Vector<T>
- A vector.
Return Value
Vector<T>A reference to this instance.
Remarks
Using this method is more efficient than evaluating the equivalent expression using overloaded operators. In the latter case, three intermediate vectors are created. This method doesn't create any intermediate vectors.
Exceptions
Argument | matrix is null. -or- vector is null. |
Dimension | The number of rows of matrix does not equal the length of this instance. -or- The number of columns of matrix does not equal the length of vector. |
AddScaledProductInPlace(T, LinearOperator<T>, TransposeOperation, Vector<T>)
Adds the scaled product of a matrix and a vector in-place to a vector.
public Vector<T> AddScaledProductInPlace(
T factor,
LinearOperator<T> leftFactor,
TransposeOperation operation,
Vector<T> rightFactor
)
Parameters
- factor T
- The scale factor for the matrix-vector product.
- leftFactor LinearOperator<T>
- A matrix that acts as the left operand of the multiplication.
- operation TransposeOperation
- The operation to be performed on leftFactor before multiplying.
- rightFactor Vector<T>
- The right operand of the multiplication.
Return Value
Vector<T>A reference to this instance.