KASKADE 7 development version
Loading...
Searching...
No Matches
Kaskade::CG_Detail Namespace Reference

Classes

struct  ChooseRegularization
struct  NoRegularization
struct  Regularization

Functions

template<class Scalar>
void stev (char jobz, int n, Scalar *diag, Scalar *subdiag, typename ScalarTraits< Scalar >::Real *w, Scalar *z=nullptr)
 Computes all eigenvalues (and optionally eigenvectors) of a symmetric tridiagonal matrix via LAPACK *stev.

Function Documentation

◆ stev()

template<class Scalar>
void Kaskade::CG_Detail::stev ( char jobz,
int n,
Scalar * diag,
Scalar * subdiag,
typename ScalarTraits< Scalar >::Real * w,
Scalar * z = nullptr )

Computes all eigenvalues (and optionally eigenvectors) of a symmetric tridiagonal matrix via LAPACK *stev.

The matrix is given by its diagonal diag and subdiagonal subdiag (the superdiagonal equals the subdiagonal, as the matrix is symmetric). On return, diag is overwritten with the eigenvalues in ascending order; subdiag is destroyed.

Parameters
jobz'N' (eigenvalues only) or 'V' (eigenvalues and eigenvectors, then also requires a workspace z of size n*n for the eigenvectors)
nthe matrix dimension
diagthe diagonal entries on entry, the eigenvalues (ascending) on exit
subdiagthe subdiagonal entries (length n-1) on entry, destroyed on exit
woutput buffer for the eigenvalues (ascending); may coincide with diag
zworkspace of size n*n for the eigenvectors if jobz=='V', may be null for 'N'

This low-level wrapper is used by the CG condition estimate to compute the Ritz values of the Lanczos tridiagonal matrix. The scalar type is dispatched at compile time via if constexpr to the LAPACK double/float routine; only real LAPACK scalar types are supported. The implementation lives in cgImplementation.cpp.

Referenced by Kaskade::CGBase< X, Xstar, CGImplementationType::STANDARD, TimerPolicy >::cond().