Skip to content

num::givens_rotation

Defined in header <container/small_matrix.hpp>

struct givens_rotation;

Plane rotation used to eliminate one component of a two-vector.

Members

member description
real c = 1
real s = 0
static constexpr givens_rotation from(real a, real b) noexcept Construct \(G=\begin{bmatrix}c&s\\-s&c\end{bmatrix}\).
constexpr void apply(real &x, real &y) const noexcept Apply G to the pair (x,y) in place.
constexpr void apply_t(real &x, real &y) const noexcept Apply G^T to the pair (x,y) in place.
constexpr small_matrix<2, 2> matrix() const noexcept Materialize the rotation as a 2x2 matrix.