|
akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
|
AffineMap class definition. More...
#include <affine_map.hpp>
Public Types | |
| using | T = linalg::matrix_scalar_t< Mat > |
| alias to extract underlying type of affine set | |
| using | DomVec = linalg::Vector< T, N > |
| alias for underlying vector spanning R^n (domain) | |
| using | AmbientVec = linalg::Vector< T, M > |
| alias for underlying vector spanning R^m (codomain) | |
Public Member Functions | |
| constexpr | AffineMap () |
| CTOR. | |
| constexpr | AffineMap (const Mat &U_in) |
| CTOR. | |
| constexpr | AffineMap (const Mat &U_in, const AmbientVec &c_in) |
| CTOR. | |
| constexpr | AffineMap (const linalg::Matrix< T, M+1, N+1 > &H) |
| CTOR. | |
| template<linalg::MatrixContainer OtherMat> requires (std::same_as<T, linalg::matrix_scalar_t<OtherMat>> && linalg::mat_rows_v<OtherMat> == N) | |
| constexpr auto | compose (const AffineMap< OtherMat > &other) const |
| compose function | |
| constexpr auto | inverse () const |
| inverse mapping | |
| constexpr auto | linear_part () const |
| linear part | |
| constexpr auto | translation () const |
| translation | |
| constexpr bool | operator== (const AffineMap< Mat > &other) const |
| equality comparison overload | |
| constexpr bool | operator!= (const AffineMap< Mat > &other) const |
| inequality comparison overload | |
| constexpr auto | operator() (const DomVec &x) const |
| transform point to coords | |
Static Public Attributes | |
| static constexpr std::size_t | M = linalg::mat_rows_v<Mat> |
| helpers to extracting M x N matrix | |
| static constexpr std::size_t | N = linalg::mat_cols_v<Mat> |
AffineMap class definition.
forward declaration of affine map
Valid mapping which transforms one affine set to another.
f(x) = U x + c
Applies linear transform via U and then translation by vector c
Definition at line 63 of file affine_map.hpp.
| using affine::AffineMap< Mat >::AmbientVec = linalg::Vector<T, M> |
alias for underlying vector spanning R^m (codomain)
Definition at line 76 of file affine_map.hpp.
| using affine::AffineMap< Mat >::DomVec = linalg::Vector<T, N> |
alias for underlying vector spanning R^n (domain)
Definition at line 73 of file affine_map.hpp.
| using affine::AffineMap< Mat >::T = linalg::matrix_scalar_t<Mat> |
alias to extract underlying type of affine set
Definition at line 66 of file affine_map.hpp.
|
inlineexplicitconstexpr |
CTOR.
empty map
Definition at line 83 of file affine_map.hpp.
Referenced by affine::AffineMap< Mat >::inverse().
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
CTOR.
| matrix | of type T M x N elements |
| vector | of type T M elements |
Definition at line 98 of file affine_map.hpp.
|
inlineexplicitconstexpr |
CTOR.
| matrix | of type T (M + 1) x (N + 1) elements |
Definition at line 106 of file affine_map.hpp.
|
inlineconstexpr |
compose function
Compose a sequence of affine maps as such: f circ g = f(g(x))
g(x) = A_g x + b_g f(x) = A_f x + b_f f(g(x)) = A_f (A_g x + b_g) + b_f = (A_f A_g) x + (A_f b_g + b_f)
| valid | reference to an affine map object |
Definition at line 127 of file affine_map.hpp.
References affine::AffineMap< Mat >::linear_part(), linalg::mat_rows_v, and affine::AffineMap< Mat >::translation().
|
inlineconstexpr |
inverse mapping
Apply the inverse of the linear transformation matrix U and back out the translation by the inverse.
f(x) = U x + c f^{-1}(f(x)) = id or x
f^{-1}(x) = U^{-1} x - U^{-1} c f^{-1}(f(x)) = U^{-1}(U x + c) - U^{-1} c == x
Definition at line 148 of file affine_map.hpp.
References affine::AffineMap< Mat >::AffineMap(), affine::AffineMap< Mat >::M, linalg::mat_rows_v, and affine::AffineMap< Mat >::N.
|
inlineconstexpr |
linear part
Definition at line 160 of file affine_map.hpp.
Referenced by affine::AffineMap< Mat >::compose().
|
inlineconstexpr |
inequality comparison overload
| affine | set |
Definition at line 187 of file affine_map.hpp.
|
inlineconstexpr |
transform point to coords
| point | in R^n |
Definition at line 198 of file affine_map.hpp.
|
inlineconstexpr |
equality comparison overload
| affine | set |
Definition at line 176 of file affine_map.hpp.
|
inlineconstexpr |
translation
Definition at line 167 of file affine_map.hpp.
Referenced by affine::AffineMap< Mat >::compose().
|
staticconstexpr |
helpers to extracting M x N matrix
Definition at line 69 of file affine_map.hpp.
Referenced by affine::AffineMap< Mat >::inverse().
|
staticconstexpr |
Definition at line 70 of file affine_map.hpp.
Referenced by affine::AffineMap< Mat >::inverse().