TRIQS/nda 1.3.0
Multi-dimensional array library for C++
|
#include <nda/lapack/gelss_worker.hpp>
Specialized worker class for solving linear least squares problems while enforcing a certain hermitian symmetry.
This is a more specialized version of nda::lapack::gelss_worker that is tailored to perform tail fitting for scalar- or matrix-valued functions defined on a Matsubara frequency mesh satisfying the symmetry \( \left[ f(-i\omega_n) \right]_{ij} = \left[ f(i\omega_n) \right]_{ji}^* \).
The least squares problem to be solved is given by
\[ \mathbf{A}_E \mathbf{X} = \begin{bmatrix} \mathbf{A} \\ \mathbf{A}^* \end{bmatrix} \mathbf{X} = \begin{bmatrix} \mathbf{B} \\ \tilde{\mathbf{B}} \end{bmatrix} = \mathbf{B}_E \; , \]
where the original problem \( \mathbf{A} \mathbf{X} = \mathbf{B} \) has been extended by \( \mathbf{A}^* \mathbf{X} = \tilde{\mathbf{B}} \) to account for the symmetry given above.
The calculated solution \( \mathbf{X} \) is explictly symmetrized at the end to ensure that the symmetry is satisfied.
See triqs::mesh::tail_fitter
for more information.
Definition at line 197 of file gelss_worker.hpp.
Public Member Functions | |
gelss_worker_hermitian (matrix_const_view< dcomplex > A) | |
Construct a new worker object for a given matrix \( \mathbf{A} \). | |
int | n_var () const |
Get the number of variables of the given problem. | |
auto | operator() (matrix_const_view< dcomplex > B, std::optional< long > inner_matrix_dim={}) const |
Solve the least squares problem for a given right hand side matrix \( \mathbf{B} \). | |
array< double, 1 > const & | S_vec () const |
Get the singular values of the original matrix \( A \). | |
|
inline |
Construct a new worker object for a given matrix \( \mathbf{A} \).
A | Matrix \( \mathbf{A} \) used in the least squares problem. |
Definition at line 225 of file gelss_worker.hpp.
|
inline |
Get the number of variables of the given problem.
Definition at line 213 of file gelss_worker.hpp.
|
inline |
Solve the least squares problem for a given right hand side matrix \( \mathbf{B} \).
The inner matrix dimension \( d \) specifies the shape of the matrix that \( f(i\omega_n) \) returns. It is used to make sure that the symmetry is satisfied. For scalar-valued functions, \( d = 1 \).
B | Right hand side matrix. |
inner_matrix_dim | Inner matrix dimension \( d \). |
std::pair<matrix<dcomplex>, double>
containing the solution matrix \( \mathbf{X} \) and the error \( \epsilon \). Definition at line 238 of file gelss_worker.hpp.
|
inlinenodiscard |
Get the singular values of the original matrix \( A \).
Definition at line 219 of file gelss_worker.hpp.