|
akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
|
Computes A = U Sigma V^* from the eigendecomposition of A^* A. More...
#include <svd.hpp>
Public Types | |
| using | T = matrix_scalar_t< Mat > |
| using | Real = real_type_t< T > |
| using | Complex = std::conditional_t< linalg::Complex< T >, T, std::complex< Real > > |
Public Member Functions | |
| constexpr | SVD (const Mat &A) |
| Compute singular triplets for A. | |
Public Attributes | |
| Matrix< Complex, Cols, Cols > | VT |
| SVD member variables. | |
| Matrix< Complex, Rows, Rows > | U |
| left singular vectors | |
| Matrix< Real, Rows, Cols > | S |
| singular values | |
| bool | converged |
| converged | |
Static Public Attributes | |
| static constexpr std::size_t | Rows = mat_rows_v<Mat> |
| static constexpr std::size_t | Cols = mat_cols_v<Mat> |
Computes A = U Sigma V^* from the eigendecomposition of A^* A.
Right singular vectors come from A^* A; each product A*v_i yields its singular value and left singular vector. Singular triplets are sorted by decreasing singular value.
| Mat | Input matrix type with at least as many rows as columns. |
| using linalg::SVD< Mat >::Complex = std::conditional_t<linalg::Complex<T>, T, std::complex<Real> > |
| using linalg::SVD< Mat >::Real = real_type_t<T> |
| using linalg::SVD< Mat >::T = matrix_scalar_t<Mat> |
|
inlineconstexpr |
Compute singular triplets for A.
| [in] | A | Input matrix with Rows >= Cols. |
Definition at line 38 of file svd.hpp.
References linalg::mat_rows_v.
|
staticconstexpr |
| bool linalg::SVD< Mat >::converged |
|
staticconstexpr |
| Matrix<Real, Rows, Cols> linalg::SVD< Mat >::S |
| Matrix<Complex, Rows, Rows> linalg::SVD< Mat >::U |
| Matrix<Complex, Cols, Cols> linalg::SVD< Mat >::VT |