ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains classes and procedures for affine transformation of multivariate samples. More...
Data Types | |
interface | getAffinity |
Generate and return an affine-transformation of the input sample of shape (1:ndim) or (1:ndim, 1:nsam) or (1:nsam, 1:ndim) based on the specified values for the translation tlate and tranformations tform along the specified axis dim .More... | |
interface | setAffinity |
Return an affine-transformation of the input sample of shape (1:ndim) or (1:ndim, 1:nsam) or (1:nsam, 1:ndim) based on the specified values for the translation tlate and tranformations tform along the specified axis dim .More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_sampleAffinity" |
This module contains classes and procedures for affine transformation of multivariate samples.
In Euclidean geometry, an affine transformation or affinity (from the Latin, affinis, connected with) is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles.
If \(X\) is the point set of an affine space, then every affine transformation on \(X\) can be represented as the composition of a linear transformation on \(X\) and a translation of \(X\).
An affine map is the composition of two functions: a translation and a linear map.
Ordinary vector algebra uses matrix multiplication to represent linear maps, and vector addition to represent translations.
Formally, in the finite-dimensional case, if the linear map is represented as a multiplication by an invertible matrix \(A\) and the translation as the addition of a vector \(\mathbf{b}\), an affine map \(f\) acting on a vector \(\mathbf{x}\) can be represented as,
\begin{equation} \mathbf{y} = f(\mathbf{x}) = A\mathbf{x} + \mathbf{b} ~. \end{equation}
Using an augmented matrix and an augmented vector, it is possible to represent both the translation and the linear map using a single matrix multiplication.
The technique requires that all vectors be augmented with a 1 at the end, and all matrices be augmented with an extra row of zeros at the bottom, an extra column—the translation vector—to the right, and a 1 in the lower right corner.
If \(A\) is a matrix,
\begin{equation} \begin{bmatrix} \mathbf{y} \\ 1 \end{bmatrix} = \left[ \begin{array}{ccc|c} &A&&\mathbf{b} \\ 0&\cdots&0&1 \end{array} \right] \begin{bmatrix} \mathbf{x} \\ 1 \end{bmatrix} \end{equation}
is equivalent to the following
\begin{equation} \mathbf{y} = A\mathbf{x} + \mathbf{b} ~. \end{equation}
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
character(*, SK), parameter pm_sampleAffinity::MODULE_NAME = "@pm_sampleAffinity" |
Definition at line 109 of file pm_sampleAffinity.F90.