MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::textbook_reflection< T > Struct Template Reference

A textbook Householder reflector (#559): H = I - (2/vtv)*v*v^T with v NOT normalized, and H*x = alpha*e_1. More...

#include <householder.hpp>

Public Attributes

vec::dense_vector< T > v
T vtv
 v^T v; not positive (zero, or NaN) means "skip this column"
T alpha
 Hx = alpha*e_1, alpha = -sign(x(0))||x||.

Detailed Description

template<typename T>
struct mtl::textbook_reflection< T >

A textbook Householder reflector (#559): H = I - (2/vtv)*v*v^T with v NOT normalized, and H*x = alpha*e_1.

Supports structured bindings: auto [v, vtv, alpha] = householder(x, tag::textbook_reflector{});

Member Data Documentation

◆ alpha

template<typename T>
T mtl::textbook_reflection< T >::alpha

Hx = alpha*e_1, alpha = -sign(x(0))||x||.

◆ v

template<typename T>
vec::dense_vector<T> mtl::textbook_reflection< T >::v

◆ vtv

template<typename T>
T mtl::textbook_reflection< T >::vtv

v^T v; not positive (zero, or NaN) means "skip this column"


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