Linear Algebra Operations Extensions.Copy 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
Copy<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>, SpanSlice<T>) | Copies a vector, x, to a vector, y. |
Copy<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, ReadOnlySpan2D<T>, Span2D<T>) | Copies all or part of a two-dimensional matrix A to another matrix B. |
Copy<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage) | Copies a vector. |
Copy<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, TStorage2D, TStorage2D) | Copies part of a matrix to another. |
Copy<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>, SpanSlice<T>)
Copies a vector, x, to a vector, y.
public static void Copy<T>(
this ILinearAlgebraOperations<T> operations,
int n,
ReadOnlySpanSlice<T> x,
SpanSlice<T> y
)
Parameters
- operations ILinearAlgebraOperations<T>
- n Int32
- x ReadOnlySpanSlice<T>
- y 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 increments equal to one.
Further Details:
jack dongarra, linpack, 3/11/78. 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
Copy<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage)
Copies a vector.
public static void Copy<T, TStorage>(
this ILinearAlgebraOperations<T> operations,
int n,
TStorage x,
TStorage y
)
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 vectors x and y.
- 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 elements of x.
Type Parameters
- T
- TStorage
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).Copy<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, ReadOnlySpan2D<T>, Span2D<T>)
Copies all or part of a two-dimensional matrix A to another matrix B.
public static void Copy<T>(
this ILinearAlgebraOperations<T> operations,
MatrixTriangle storedTriangle,
int m,
int n,
ReadOnlySpan2D<T> a,
Span2D<T> b
)
Parameters
- operations ILinearAlgebraOperations<T>
- The object that performs the operation.
- storedTriangle MatrixTriangle
Specifies the part of the matrix A to be copied to B. = 'U': Upper triangular part = 'L': Lower triangular part Otherwise: All of the matrix A
- m Int32
The number of rows of the matrix A. M >= 0.
- n Int32
The number of columns of the matrix A. N >= 0.
- a ReadOnlySpan2D<T>
Dimension (LDA,N) The m by n matrix A. If UPLO = 'U', only the upper triangle or trapezoid is accessed; if UPLO = 'L', only the lower triangle or trapezoid is accessed.
The leading dimension of the array A. LDA >= max(1,M).
- b Span2D<T>
Dimension (LDB,N) On exit, B = A in the locations specified by UPLO.
The leading dimension of the array B. LDB >= max(1,M).
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
This method corresponds to the LAPACK routine DLACPY.
Copy<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, TStorage2D, TStorage2D)
Copies part of a matrix to another.
public static void Copy<T, TStorage2D>(
this ILinearAlgebraOperations<T> operations,
MatrixTriangle storedTriangle,
int m,
int n,
TStorage2D a,
TStorage2D b
)
where TStorage2D : Object, IStorage2D<T>
Parameters
- operations ILinearAlgebraOperations<T>
- The linear algebra operations instance used to perform the calculation.
- storedTriangle MatrixTriangle
- A MatrixTriangle value that specifies which part of the matrix to copy.
- m Int32
- An integer specifying the number of rows of the matrix a. Must be greater than or equal to zero.
- n Int32
- An integer specifying the number of columns of the matrix a. Must be greater than or equal to zero.
- a TStorage2D
- T array specifying the m-by-n source matrix.
- b TStorage2D
- T array specifying the m-by-n destination matrix.
Type Parameters
- T
- TStorage2D
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
This method corresponds to the LAPACK routine ?LACPY.