LinearAlgebraOperationsExtensions Class

Contains extension methods that perform linear algebra operations on 1D arrays, array slices, and 2D arrays.

Definition

Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
C#
public static class LinearAlgebraOperationsExtensions
Inheritance
Object  →  LinearAlgebraOperationsExtensions

Methods

AbsoluteMaxIndex<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>)

Finds the index of element having max.

AbsoluteMaxIndex<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage) Returns the index of the element of a vector with maximum absolute value.
BandMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, TransposeOperation, Int32, Int32, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpanSlice<T>, T, SpanSlice<T>)

Performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*AT*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m by n band matrix, with kl sub-diagonals and ku super-diagonals.

BandMultiplyAndAddInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, TransposeOperation, Int32, Int32, Int32, Int32, T, TStorage2D, TStorage, T, TStorage) Sum of the product of a general band matrix and vector and a scaled vector.
BandSymmetricMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpanSlice<T>, T, SpanSlice<T>)

Performs the matrix-vector operation y := alpha*A*x + beta*y, where alpha and beta are scalars, x and y are n element vectors and A is an n by n symmetric band matrix, with k super-diagonals.

BandSymmetricMultiplyAndAddInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, Int32, T, TStorage2D, TStorage, T, TStorage) Product of a symmetric band matrix and a vector.
BandTriangularMultiplyInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, ReadOnlySpan2D<T>, SpanSlice<T>)

Performs one of the matrix-vector operations x := A*x, or x := AT*x, where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals.

BandTriangularMultiplyInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, TStorage2D, TStorage) Product of a triangular band matrix and a vector.
BandTriangularSolveInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, ReadOnlySpan2D<T>, SpanSlice<T>)

Solves one of the systems of equations A*x = b, or AT*x = b, where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular band matrix, with ( k + 1 ) diagonals.

BandTriangularSolveInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, TStorage2D, TStorage) Solves a triangular band system of equations.
ConjugateDotProduct<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>) Returns the inner product of two vectors.
ConjugateDotProduct<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage) Returns the inner product of two vectors.
ConjugateRankUpdate<T>(ILinearAlgebraOperations<T>, Int32, Int32, T, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>, Span2D<T>) Performs a rank one update of a matrix.
ConjugateRankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, Int32, Int32, T, TStorage, TStorage, TStorage2D) Performs a rank one update of a matrix.
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.
DotProduct<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>)

Forms the dot product of two vectors.

DotProduct<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage) Returns the inner product of two vectors.
FullMatrixNorm<T>(ILinearAlgebraOperations<T>, MatrixNorm, Int32, Int32, ReadOnlySpan2D<T>)

Returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real matrix A.

FullMatrixNorm<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixNorm, Int32, Int32, TStorage2D) Computes the norm of a general rectangular matrix.
HermitianMatrixNorm<T>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, Int32, ReadOnlySpan2D<T>) Computes the norm of a Hermitian matrix.
HermitianMatrixNorm<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, Int32, TStorage2D) Computes the norm of a Hermitian matrix.
HermitianMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpanSlice<T>, T, SpanSlice<T>) Product of a hermitian matrix and a vector.
HermitianMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpan2D<T>, T, Span2D<T>) Sum of the product of a hermitian and a general matrix and a scaled matrix.
HermitianMultiplyAndAddInPlace<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D) Sum of the product of a hermitian and a general matrix and a scaled matrix.
HermitianMultiplyAndAddInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage2D, TStorage, T, TStorage) Product of a hermitian matrix and a vector.
HermitianRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpanSlice<T>, Span2D<T>) Performs a rank one update of a hermitian.
HermitianRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>, Span2D<T>) Performs a hermitian rank two update of a hermitian matrix.
HermitianRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, ReadOnlySpan2D<T>, T, Span2D<T>) Performs a rank k update of a hermitian matrix.
HermitianRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpan2D<T>, T, Span2D<T>) Performs a rank 2k update of a hermitian matrix.
HermitianRankUpdate<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, TStorage2D, T, TStorage2D) Performs a rank k update of a hermitian matrix.
HermitianRankUpdate<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D) Performs a rank 2k update of a hermitian matrix.
HermitianRankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage, TStorage2D) Performs a rank one update of a hermitian.
HermitianRankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage, TStorage, TStorage2D) Performs a hermitian rank two update of a hermitian matrix.
MultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, Int32, T, ReadOnlySpanSlice<T>, SpanSlice<T>)

Constant times a vector plus a vector.

MultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, TransposeOperation, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpanSlice<T>, T, SpanSlice<T>)

Performs one of the matrix-vector operations y := alpha*A*x + beta*y, or y := alpha*AT*x + beta*y, where alpha and beta are scalars, x and y are vectors and A is an m by n matrix.

MultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, TransposeOperation, TransposeOperation, Int32, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpan2D<T>, T, Span2D<T>)

Performs one of the matrix-matrix operations C := alpha*op( A )*op( B ) + beta*C, where op( X ) is one of op( X ) = X or op( X ) = XT, alpha and beta are scalars, and A, B and C are matrices, with op( A ) an m by k matrix, op( B ) a k by n matrix and C an m by n matrix.

MultiplyAndAddInPlace<T, TStorage>(ILinearAlgebraOperations<T>, Int32, T, TStorage, TStorage) Evaluates a vector plus the product of a scalar and a vector
MultiplyAndAddInPlace<T, TStorage2D>(ILinearAlgebraOperations<T>, TransposeOperation, TransposeOperation, Int32, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D) Sum of the product of two general matrices and a scaled matrix.
MultiplyAndAddInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, TransposeOperation, Int32, Int32, T, TStorage2D, TStorage, T, TStorage) Sum of the product of a general matrix and vector and a scaled vector.
MultiplyInPlace<T>(ILinearAlgebraOperations<T>, Int32, T, SpanSlice<T>)

Scales a vector by a constant.

MultiplyInPlace<T, TStorage>(ILinearAlgebraOperations<T>, Int32, T, TStorage) Evaluates the product of a scalar and a vector.
OneNorm<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>)

Takes the sum of the absolute values.

OneNorm<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage) Returns the sum of the absolute values of the elements of a vector.
RankUpdate<T>(ILinearAlgebraOperations<T>, Int32, Int32, T, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>, Span2D<T>)

Performs the rank 1 operation A := alpha*x*y**T + A, where alpha is a scalar, x is an m element vector, y is an n element vector and A is an m by n matrix.

RankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, Int32, Int32, T, TStorage, TStorage, TStorage2D) Performs a rank one update of a matrix.
RealOneNorm<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>) Returns the sum of the absolute values of the elements of a vector.
RealOneNorm<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage) Returns the sum of the absolute values of the elements of a vector.
Rotate<T>(ILinearAlgebraOperations<T>, Int32, SpanSlice<T>, SpanSlice<T>, T, T)

Applies a plane rotation.

Rotate<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage, T, T) Applies a Givens plane rotation.
Swap<T>(ILinearAlgebraOperations<T>, Int32, SpanSlice<T>, SpanSlice<T>)

Swaps the elements of two vectors.

Swap<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage, TStorage) Exchanges the elements of two vectors.
SymmetricMatrixNorm<T>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, Int32, ReadOnlySpan2D<T>)

Returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a real symmetric matrix A.

SymmetricMatrixNorm<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, Int32, TStorage2D) Computes the norm of a symmetric matrix.
SymmetricMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpanSlice<T>, T, SpanSlice<T>)

Performs the matrix-vector operation y := alpha*A*x + beta*y, where alpha and beta are scalars, x and y are n element vectors and A is an n by n symmetric matrix.

SymmetricMultiplyAndAddInPlace<T>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpan2D<T>, T, Span2D<T>)

Performs one of the matrix-matrix operations C := alpha*A*B + beta*C, or C := alpha*B*A + beta*C, where alpha and beta are scalars, A is a symmetric matrix and B and C are m by n matrices.

SymmetricMultiplyAndAddInPlace<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D) Sum of the product of a symmetric and a general matrix and a scaled matrix.
SymmetricMultiplyAndAddInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage2D, TStorage, T, TStorage) Product of a symmetric matrix and a vector.
SymmetricRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpanSlice<T>, Span2D<T>)

Performs the symmetric rank 1 operation A := alpha*x*x**T + A, where alpha is a real scalar, x is an n element vector and A is an n by n symmetric matrix.

SymmetricRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, ReadOnlySpanSlice<T>, ReadOnlySpanSlice<T>, Span2D<T>)

Performs the symmetric rank 2 operation A := alpha*x*y**T + alpha*y*x**T + A, where alpha is a scalar, x and y are n element vectors and A is an n by n symmetric matrix.

SymmetricRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, ReadOnlySpan2D<T>, T, Span2D<T>)

Performs one of the symmetric rank k operations C := alpha*A*AT + beta*C, or C := alpha*AT*A + beta*C, where alpha and beta are scalars, C is an n by n symmetric matrix and A is an n by k matrix in the first case and a k by n matrix in the second case.

SymmetricRankUpdate<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, ReadOnlySpan2D<T>, ReadOnlySpan2D<T>, T, Span2D<T>)

Performs one of the symmetric rank 2k operations C := alpha*A*BT + alpha*B*AT + beta*C, or C := alpha*AT*B + alpha*BT*A + beta*C, where alpha and beta are scalars, C is an n by n symmetric matrix and A and B are n by k matrices in the first case and k by n matrices in the second case.

SymmetricRankUpdate<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, TStorage2D, T, TStorage2D) Performs a rank k update of a symmetric matrix.
SymmetricRankUpdate<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, Int32, Int32, T, TStorage2D, TStorage2D, T, TStorage2D) Performs a rank k update of a symmetric matrix.
SymmetricRankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage, TStorage2D) Performs a rank one update of a symmetric matrix.
SymmetricRankUpdate<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, Int32, T, TStorage, TStorage, TStorage2D) Performs a symmetric rank two update of a symmetric matrix.
TriangularMatrixNorm<T>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, MatrixDiagonal, Int32, Int32, ReadOnlySpan2D<T>)

Returns the value of the one norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a trapezoidal or triangular matrix A.

TriangularMatrixNorm<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixNorm, MatrixTriangle, MatrixDiagonal, Int32, Int32, TStorage2D) Computes the norm of a triangular matrix.
TriangularMultiplyInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, ReadOnlySpan2D<T>, SpanSlice<T>)

Performs one of the matrix-vector operations x := A*x, or x := AT*x, where x is an n element vector and A is an n by n unit, or non-unit, upper or lower triangular matrix.

TriangularMultiplyInPlace<T>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, T, ReadOnlySpan2D<T>, Span2D<T>)

Performs one of the matrix-matrix operations B := alpha*op( A )*B, or B := alpha*B*op( A ), where alpha is a scalar, B is an m by n matrix, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of op( A ) = A or op( A ) = AT.

TriangularMultiplyInPlace<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, T, TStorage2D, TStorage2D) Product of a triangular and a general matrix.
TriangularMultiplyInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, TStorage2D, TStorage) Product of a triangular matrix and a vector.
TriangularSolveInPlace<T>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, ReadOnlySpan2D<T>, SpanSlice<T>)

Solves one of the systems of equations A*x = b, or AT*x = b, where b and x are n element vectors and A is an n by n unit, or non-unit, upper or lower triangular matrix.

TriangularSolveInPlace<T>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, T, ReadOnlySpan2D<T>, Span2D<T>)

Solves one of the matrix equations op( A )*X = alpha*B, or X*op( A ) = alpha*B, where alpha is a scalar, X and B are m by n matrices, A is a unit, or non-unit, upper or lower triangular matrix and op( A ) is one of op( A ) = A or op( A ) = AT.

TriangularSolveInPlace<T, TStorage2D>(ILinearAlgebraOperations<T>, MatrixOperationSide, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, Int32, T, TStorage2D, TStorage2D) Solution of a triangular linear system with multiple right-hand sides.
TriangularSolveInPlace<T, TStorage, TStorage2D>(ILinearAlgebraOperations<T>, MatrixTriangle, TransposeOperation, MatrixDiagonal, Int32, TStorage2D, TStorage) Solves a triangular system of equations.
TwoNorm<T>(ILinearAlgebraOperations<T>, Int32, ReadOnlySpanSlice<T>)

            Returns the euclidean norm of a vector via the function
            name, so that
               DNRM2 := sqrt( x'*x )
            

TwoNorm<T, TStorage>(ILinearAlgebraOperations<T>, Int32, TStorage) Returns the square root of sum of the squares of the elements of a vector.

See Also