akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
linalg::Hessenberg< Mat > Struct Template Reference

Reduces A to upper Hessenberg form H = U^* A U. More...

#include <hessenberg.hpp>

Inheritance diagram for linalg::Hessenberg< Mat >:
[legend]

Public Types

using OperatorBase = Endomorphism< Mat, Hessenberg< Mat > >
 alias from base class
 
- Public Types inherited from linalg::Endomorphism< Mat, Hessenberg< Mat > >
using T = matrix_scalar_t< Mat >
 alias helpers for types
 
using ScalarT = real_type_t< T >
 
using ComplexT = std::complex< ScalarT >
 

Public Member Functions

constexpr Hessenberg (const Mat &A)
 Reduce A by two-sided Householder similarities.
 
constexpr auto H () const
 Extract the upper Hessenberg matrix.
 
constexpr auto U () const
 Reconstruct the orthogonal or unitary similarity basis.
 
constexpr auto operator() (std::size_t i, std::size_t j) const
 Read an entry of the Hessenberg matrix.
 
- Public Member Functions inherited from linalg::Endomorphism< Mat, Hessenberg< Mat > >
constexpr const T & operator() (std::size_t i, std::size_t j) const
 get element at (i,j) index
 
constexpr T & operator() (std::size_t i, std::size_t j)
 get element at (i,j) index
 
constexpr Hessenberg< Mat > & self ()
 self
 
constexpr const Hessenberg< Mat > & self () const
 self
 

Public Attributes

Vector< T, N > beta
 Vector member variables.
 

Additional Inherited Members

- Static Public Attributes inherited from linalg::Endomorphism< Mat, Hessenberg< Mat > >
static constexpr std::size_t N
 helper to extract N
 

Detailed Description

template<SquareMatrix Mat>
struct linalg::Hessenberg< Mat >

Reduces A to upper Hessenberg form H = U^* A U.

forward declaration of hessenberg matrix

Householder similarities eliminate entries below the first subdiagonal. Packed reflector tails reconstruct the orthogonal or unitary basis U.

Template Parameters
MatSquare real or complex matrix type.

Definition at line 21 of file hessenberg.hpp.

Member Typedef Documentation

◆ OperatorBase

template<SquareMatrix Mat>
using linalg::Hessenberg< Mat >::OperatorBase = Endomorphism<Mat, Hessenberg<Mat> >

alias from base class

Definition at line 23 of file hessenberg.hpp.

Constructor & Destructor Documentation

◆ Hessenberg()

template<SquareMatrix Mat>
constexpr linalg::Hessenberg< Mat >::Hessenberg ( const Mat &  A)
inlineexplicitconstexpr

Reduce A by two-sided Householder similarities.

Parameters
[in]ASquare input matrix to reduce to upper Hessenberg form.

Definition at line 34 of file hessenberg.hpp.

References linalg::as_col_vector(), linalg::Hessenberg< Mat >::beta, linalg::conjugate_transpose(), linalg::constexpr_for(), linalg::get_col(), linalg::mat_rows_v, linalg::Endomorphism< Mat, Hessenberg< Mat > >::N, and linalg::transpose().

Member Function Documentation

◆ H()

template<SquareMatrix Mat>
constexpr auto linalg::Hessenberg< Mat >::H ( ) const
inlineconstexpr

Extract the upper Hessenberg matrix.

Returns
Matrix<T, N, N> with zeros below the first subdiagonal.

Definition at line 80 of file hessenberg.hpp.

References linalg::mat_rows_v, and linalg::Endomorphism< Mat, Hessenberg< Mat > >::N.

◆ operator()()

template<SquareMatrix Mat>
constexpr auto linalg::Hessenberg< Mat >::operator() ( std::size_t  i,
std::size_t  j 
) const
inlineconstexpr

Read an entry of the Hessenberg matrix.

Parameters
[in]iZero-based row index.
[in]jZero-based column index.
Returns
Scalar T; zero below the first subdiagonal.

Definition at line 128 of file hessenberg.hpp.

References linalg::mat_rows_v.

◆ U()

template<SquareMatrix Mat>
constexpr auto linalg::Hessenberg< Mat >::U ( ) const
inlineconstexpr

Member Data Documentation

◆ beta

template<SquareMatrix Mat>
Vector<T, N> linalg::Hessenberg< Mat >::beta

Vector member variables.

beta vector from householder reflections

Definition at line 134 of file hessenberg.hpp.

Referenced by linalg::Hessenberg< Mat >::Hessenberg(), and linalg::Hessenberg< Mat >::U().


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