|
akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
|
Compact representation of a real or complex Householder reflector. More...
#include <householder.hpp>
Public Member Functions | |
| constexpr | HouseholderVector (const Vector< T, N > &x) |
| Construct a compact Householder reflector for x. | |
Public Attributes | |
| Vector< T, N > | v |
| Reflector direction vector. | |
| real_type_t< T > | beta |
Real coefficient in I - beta * v * v^*. | |
Compact representation of a real or complex Householder reflector.
The stored v and real coefficient beta represent P = I - beta * v * v^T over a real field and P = I - beta * v * v^* over a complex field. Construction follows the Golub and Van Loan algorithm and selects a numerically stable leading coordinate. Applying the reflector maps the input toward a multiple of the first coordinate vector. For a non-axis real input, that multiple has the opposite sign to the leading input coordinate to avoid cancellation.
For N == 1, the representation is the identity reflector (v = [1], beta = 0). A zero complex input similarly requires no reflector.
| T | Real or complex field scalar. |
| N | Positive compile-time vector dimension. |
Definition at line 35 of file householder.hpp.
|
inlineconstexpr |
Construct a compact Householder reflector for x.
| [in] | x | Vector to reduce toward the first coordinate axis. |
Definition at line 41 of file householder.hpp.
| real_type_t<T> linalg::HouseholderVector< T, N >::beta |
Real coefficient in I - beta * v * v^*.
Definition at line 46 of file householder.hpp.
| Vector<T, N> linalg::HouseholderVector< T, N >::v |
Reflector direction vector.
Definition at line 45 of file householder.hpp.