MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
givens.hpp File Reference
#include <cmath>
#include <mtl/functor/scalar/conj.hpp>
#include <mtl/math/pow2_scaling.hpp>

Namespaces

namespace  mtl

Functions

template<typename Matrix, typename Vector>
void mtl::apply_stored_rotation (Matrix &H, const Vector &c, const Vector &s, typename Matrix::size_type i, typename Matrix::size_type k)
 Apply a previously stored Givens rotation to column k of Hessenberg H at rows i, i+1: [H(i,k); H(i+1,k)] <- [c s; -conj(s) c] [H(i,k); H(i+1,k)].
template<typename Matrix, typename VecG, typename VecC, typename VecS>
void mtl::apply_givens_rotation (Matrix &H, VecG &g, VecC &c, VecS &s, typename Matrix::size_type k)
 Compute new Givens rotation for column k of Hessenberg H, apply it to H and RHS vector g, and store the rotation in c, s.