Linear Algebra Operations.Multiply And Add In Place Method
Definition
Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
Overload List
Multiply | Evaluates a vector plus the product of a scalar and a vector |
Multiply | Sum of the product of two general matrices and a scaled matrix. |
Multiply | Sum of the product of a general matrix and vector and a scaled vector. |
MultiplyAndAddInPlace<T, TStorage>(Int32, T, TStorage, TStorage)
Evaluates a vector plus the product of a scalar and a vector
public static void MultiplyAndAddInPlace<T, TStorage>(
int n,
T alpha,
TStorage x,
TStorage y
)
where TStorage : Object, IStorageSlice<T>
Parameters
- n Int32
- The number of elements in the vectors x and y.
- alpha T
- The scalar value used to multiply the elements of x.
- x TStorage
- A reference to a one-dimensional array containing the elements of the vector x.
- y TStorage
- A reference to a one-dimensional array containing the elements of the vector y. The elements of y are overwritten with the result.
Type Parameters
- T
- TStorage
MultiplyAndAddInPlace<T, TStorage, TStorage2D>(TransposeOperation, Int32, Int32, T, TStorage2D, TStorage, T, TStorage)
Sum of the product of a general matrix and vector and a scaled vector.
public static void MultiplyAndAddInPlace<T, TStorage, TStorage2D>(
TransposeOperation transposeOperation,
int m,
int n,
T alpha,
TStorage2D a,
TStorage x,
T beta,
TStorage y
)
where TStorage : Object, IStorageSlice<T>
where TStorage2D : Object, IStorage2D<T>
Parameters
- transposeOperation TransposeOperation
- Specifies the operation to be performed on the matrix a.
- m Int32
- The number of rows in the matrix a.
- n Int32
- The number of columns in the matrix a.
- alpha T
- The scalar used to multiply the matrix-vector product.
- a TStorage2D
- A span that contains the elements of the matrix.
- x TStorage
- A reference to a one-dimensional array containing the elements of the vector x.
- beta T
- The scalar used to multiply y.
- y TStorage
- A reference to a one-dimensional array containing the elements of the vector y. The elements of y are overwritten with the result.
Type Parameters
- T
- TStorage
- TStorage2D
Remarks
This method is similar to the BLAS routine DGEMV.
MultiplyAndAddInPlace<T, TStorage2D>(TransposeOperation, TransposeOperation, Int32, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D)
Sum of the product of two general matrices and a scaled matrix.
public static void MultiplyAndAddInPlace<T, TStorage2D>(
TransposeOperation transA,
TransposeOperation transB,
int m,
int n,
int k,
T alpha,
TStorage2D a,
TStorage2D b,
T beta,
TStorage2D c
)
where TStorage2D : Object, IStorage2D<T>
Parameters
- transA TransposeOperation
- Specifies the operation to be performed on the matrix a.
- transB TransposeOperation
- Specifies the operation to be performed on the matrix b.
- m Int32
- The number of rows in the matrix a transformed as specified by transA, and the matrix c.
- n Int32
- The number of columns in the matrix b transformed as specified by transB, and the matrix c.
- k Int32
- The number of columns in the matrix a transformed as specified by transA, and the number of rows of the matrix b transformed as specified by transB.
- alpha T
- The scalar used to multiply the matrix-vector product.
- a TStorage2D
- A span that contains the elements of the first matrix.
- b TStorage2D
- A span that contains the elements of the second matrix.
- beta T
- The scalar used to multiply c.
- c TStorage2D
- A span that contains the elements of the third matrix.
Type Parameters
- T
- TStorage2D