|
numerics
|
Givens plane rotation: G = [c, s; -s, c]. More...
#include <small_matrix.hpp>
Public Member Functions | |
| constexpr void | apply (real &x, real &y) const noexcept |
| Apply G from the left: [x; y] <- G * [x; y]. | |
| constexpr void | apply_t (real &x, real &y) const noexcept |
| Apply G^T (inverse rotation): [x; y] <- G^T * [x; y]. | |
| constexpr SmallMatrix< 2, 2 > | as_matrix () const noexcept |
| Return the 2x2 rotation matrix. | |
Static Public Member Functions | |
| static constexpr GivensRotation | from (real a, real b) noexcept |
Public Attributes | |
| real | c |
| real | s |
Givens plane rotation: G = [c, s; -s, c].
Constructed so that G * [a; b]^T = [r; 0] with r = hypot(a, b).
Definition at line 144 of file small_matrix.hpp.
Apply G from the left: [x; y] <- G * [x; y].
Definition at line 158 of file small_matrix.hpp.
References c, num::ipow(), and s.
Apply G^T (inverse rotation): [x; y] <- G^T * [x; y].
Definition at line 165 of file small_matrix.hpp.
References c, num::ipow(), and s.
|
inlineconstexprnoexcept |
Return the 2x2 rotation matrix.
Definition at line 172 of file small_matrix.hpp.
|
inlinestaticconstexprnoexcept |
Compute (c,s) such that G*[a;b] = [r;0], r = hypot(a,b). Stable for any (a,b) including b==0.
Definition at line 149 of file small_matrix.hpp.
References num::ipow().
| real num::GivensRotation::c |
Definition at line 145 of file small_matrix.hpp.
Referenced by apply(), apply_t(), and as_matrix().
| real num::GivensRotation::s |
Definition at line 145 of file small_matrix.hpp.
Referenced by apply(), apply_t(), and as_matrix().