Linear Algebra Operations Extensions.Multiply In Place Method
Definition
Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Multiply | Scales a vector by a constant. |
Multiply | Evaluates the product of a scalar and a vector. |
MultiplyInPlace<T>(ILinearAlgebraOperations<T>, Int32, T, SpanSlice<T>)
Scales a vector by a constant.
public static void MultiplyInPlace<T>(
this ILinearAlgebraOperations<T> operations,
int n,
T a,
SpanSlice<T> x
)
Parameters
- operations ILinearAlgebraOperations<T>
- n Int32
- a T
- x SpanSlice<T>
Type Parameters
- T
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ILinearAlgebraOperations<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
uses unrolled loops for increment equal to one.
Further Details:
jack dongarra, linpack, 3/11/78. modified 3/93 to return if incx .le. 0. modified 12/3/93, array(1) declarations changed to array(*)
Authors: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.
Date: November 2011
MultiplyInPlace<T, TStorage>(ILinearAlgebraOperations<T>, Int32, T, TStorage)
Evaluates the product of a scalar and a vector.
public static void MultiplyInPlace<T, TStorage>(
this ILinearAlgebraOperations<T> operations,
int n,
T alpha,
TStorage x
)
where TStorage : Object, IStorageSlice<T>
Parameters
- operations ILinearAlgebraOperations<T>
- The linear algebra operations instance used to perform the calculation.
- n Int32
- The number of elements in the vector x.
- 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. The elements of x are overwritten with the result.
Type Parameters
- T
- TStorage