TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
nda::lapack::gelss_worker_hermitian

#include <nda/lapack/gelss_worker.hpp>

Detailed Description

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 \).
 

Constructor & Destructor Documentation

◆ gelss_worker_hermitian()

nda::lapack::gelss_worker_hermitian::gelss_worker_hermitian ( matrix_const_view< dcomplex > A)
inline

Construct a new worker object for a given matrix \( \mathbf{A} \).

Parameters
AMatrix \( \mathbf{A} \) used in the least squares problem.

Definition at line 225 of file gelss_worker.hpp.

Member Function Documentation

◆ n_var()

int nda::lapack::gelss_worker_hermitian::n_var ( ) const
inline

Get the number of variables of the given problem.

Returns
Number of columns of the matrix \( \mathbf{A} \).

Definition at line 213 of file gelss_worker.hpp.

◆ operator()()

auto nda::lapack::gelss_worker_hermitian::operator() ( matrix_const_view< dcomplex > B,
std::optional< long > inner_matrix_dim = {} ) const
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 \).

Parameters
BRight hand side matrix.
inner_matrix_dimInner matrix dimension \( d \).
Returns
A std::pair<matrix<dcomplex>, double> containing the solution matrix \( \mathbf{X} \) and the error \( \epsilon \).

Definition at line 238 of file gelss_worker.hpp.

◆ S_vec()

array< double, 1 > const & nda::lapack::gelss_worker_hermitian::S_vec ( ) const
inlinenodiscard

Get the singular values of the original matrix \( A \).

Returns
1-dimensional nda::array containing the singular values.

Definition at line 219 of file gelss_worker.hpp.


The documentation for this struct was generated from the following file: