7.9 KiB
[linalg.algs.blas2.symherrank1]
29 Numerics library [numerics]
29.9 Basic linear algebra algorithms [linalg]
29.9.14 BLAS 2 algorithms [linalg.algs.blas2]
29.9.14.7 Symmetric or Hermitian Rank-1 (outer product) update of a matrix [linalg.algs.blas2.symherrank1]
[Note 1:
These functions correspond to the BLAS functionsxSYR, xSPR, xHER, and xHPR[bib].
They have overloads taking a scaling factor alpha, because it would be impossible to express the updateA=AâxxT otherwise.
â end note]
The following elements apply to all functions in [linalg.algs.blas2.symherrank1].
Mandates:
If InOutMat has layout_blas_packed layout, then the layout's Triangle template argument has the same type as the function's Triangle template argument;
compatible-static-extents<decltype(A), decltype(A)>(0, 1) is true; and
compatible-static-extents<decltype(A), decltype(x)>(0, 0) is true.
Preconditions:
A.extent(0) equals A.extent(1), and
A.extent(0) equals x.extent(0).
Complexity: O(x.extent(0)Ãx.extent(0)).
template<class Scalar, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void symmetric_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t); template<class ExecutionPolicy, class Scalar, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec, Scalar alpha, InVec x, InOutMat A, Triangle t);
These functions perform a symmetric rank-1 update of the symmetric matrix A, taking into account the Triangle parameter that applies to A ([linalg.general]).
Effects: Computes a matrix Aâ² such thatAâ²=A+αxxT, where the scalar α is alpha, and assigns each element of Aâ² to the corresponding element of A.
template<[in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void symmetric_matrix_rank_1_update(InVec x, InOutMat A, Triangle t); template<class ExecutionPolicy, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
These functions perform a symmetric rank-1 update of the symmetric matrix A, taking into account the Triangle parameter that applies to A ([linalg.general]).
Effects: Computes a matrix Aâ² such that Aâ²=A+xxT and assigns each element of Aâ² to the corresponding element of A.
template<class Scalar, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void hermitian_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t); template<class ExecutionPolicy, class Scalar, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, Scalar alpha, InVec x, InOutMat A, Triangle t);
These functions perform a Hermitian rank-1 update of the Hermitian matrix A, taking into account the Triangle parameter that applies to A ([linalg.general]).
Effects: Computes Aâ² such thatAâ²=A+αxxH, where the scalar α is alpha, and assigns each element of Aâ² to the corresponding element of A.
template<[in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void hermitian_matrix_rank_1_update(InVec x, InOutMat A, Triangle t); template<class ExecutionPolicy, [in-vector](linalg.helpers.concepts#concept:in-vector "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InVec, [possibly-packed-inout-matrix](linalg.helpers.concepts#concept:possibly-packed-inout-matrix "29.9.7.5 Argument concepts [linalg.helpers.concepts]") InOutMat, class Triangle> void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
These functions perform a Hermitian rank-1 update of the Hermitian matrix A, taking into account the Triangle parameter that applies to A ([linalg.general]).
Effects: Computes a matrix Aâ² such that Aâ²=A+xxH and assigns each element of Aâ² to the corresponding element of A.