#include <vectorsMatrices.hh>
Public Member Functions | |
Mapping () | |
Mapping (const Mapping< F, DimY, DimX > &m) | |
Copy constructor. | |
template<class H > | |
Mapping (const Mapping< H, DimY, DimX > &m) | |
template<class G > | |
Mapping (G x) | |
template<class... FieldTs> | |
Mapping (FieldTs... data) | |
Mapping (const Point< F, DimY > first) | |
Mapping (const Point< F, DimY > first, const Point< F, DimY > second) | |
Mapping (const Point< F, DimY > first, const Point< F, DimY > second, const Point< F, DimY > third) | |
Mapping (const UnitNd< DimY > &n) | |
F | determinant () const |
Returns the determinant of the matrix (only valid for square matrices) | |
Mapping< F, DimY, DimX > | adjugate () const |
Mapping< F, DimY-1, DimX-1 > | subMatrix (uint i, uint j) const |
F | trace () const |
Returns the trace (only valid for square matrices) | |
Mapping< F, DimX, DimY > | inverse () const |
Returns the inverse of the matrix. | |
const F & | operator() (uint i, uint j) const |
Returns an entry of the matrix. | |
F & | operator() (uint i, uint j) |
Returns an entry of the matrix (for read / write access) | |
template<class H > | |
Point< typename Combtype< F, H >::type, DimY > | operator* (const Point< H, DimX > &p) const |
Returns a mapped Point. | |
template<class H > | |
Point< H, DimY > | mapPoint (const Point< H, DimX > &b) const |
template<class G , uint DimZ> | |
Mapping< typename Combtype< G, F >::type, DimY, DimZ > | operator* (const Mapping< G, DimX, DimZ > &m) const |
Multiplication operator. | |
Mapping< F, DimY, DimX > & | operator*= (const F n) |
Scaling operator. | |
Mapping< F, DimY, DimX > & | operator*= (const Mapping< F, DimY, DimX > &m) |
Multiplication operator ( *this = operator()(*this, m); ) | |
template<class G > | |
Mapping< typename Combtype< G, F >::type, DimY, DimX > | operator* (const G n) const |
Scaling operator. | |
Mapping< F, DimY, DimX > & | operator+= (const Mapping< F, DimY, DimX > &M) |
Addition operator. | |
Mapping< F, DimY, DimX > & | scaleRows (const Point< F, DimY > &s) |
Scales the rows with the respective entries in s . | |
Mapping< F, DimY, DimX > & | scaleCols (const Point< F, DimX > &s) |
Scales the columns with the respective entries in s . | |
Mapping< F, DimX, DimY > | transpose () const |
Returns the transpose of the matrix. | |
Mapping< F, DimY, DimY > | prodTranspose () const |
Returns the product with the transpose of the matrix. | |
Point< F, DimY > | column (const uint i) const |
Returns a column of the matrix. | |
void | zeros () |
Fills the matrix with zeros. | |
template<class H > | |
void | mapTranspose (const Point< H, DimY > &y, Point< H, DimX > &x) const |
void | rank1Product (const Point< F, DimX > x, const Point< F, DimY > y) |
Computes x yT and adds the result to the matrix. | |
template<class H , class J , uint dimy, uint dimx> | |
void | operator() (const Point< H, dimy > &y, Point< J, dimx > &x) const |
std::ostream & | info (std::ostream &os) const |
Basic class for a 2D or 3D map. The template parameters make it possible to use this class for real or complex values. The main use is to represent linear maps in 2D or 3D.
Definition at line 313 of file vectorsMatrices.hh.
|
inline |
Default constructor. The elements of the matrix are left uninitialized.
Definition at line 318 of file vectorsMatrices.hh.
Copy constructor.
Definition at line 321 of file vectorsMatrices.hh.
|
inline |
Constructor. Useful to generate a Mapping<Cmplx,DimX,DimY> out of a Mapping<Real,DimX,DimY>.
Definition at line 331 of file vectorsMatrices.hh.
|
inline |
Constructor. All elements are initialized to x.
Definition at line 344 of file vectorsMatrices.hh.
|
inline |
Constructor with variadic templates. Can be sed to construct matrices of any size by giving the entries as parameters, e.g. Mapping<Real,2,2>(1.,2.,3.,4.) creates a 2x2 matrix, while Mapping<Real,2,2>(1.,2.,3.) will produce an assertion as the number of entries (i.e. 3) mismatches the dimension 2x2.
Definition at line 359 of file vectorsMatrices.hh.
concepts::Mapping< F, DimY, DimX >::Mapping | ( | const Point< F, DimY > | first | ) |
Constructor for a 1D.
first | First column of the matrix |
concepts::Mapping< F, DimY, DimX >::Mapping | ( | const Point< F, DimY > | first, |
const Point< F, DimY > | second | ||
) |
Constructor for a 2D mapping.
first | First column of the matrix |
second | Second column of the matrix |
concepts::Mapping< F, DimY, DimX >::Mapping | ( | const Point< F, DimY > | first, |
const Point< F, DimY > | second, | ||
const Point< F, DimY > | third | ||
) |
Constructor for a 3D mapping.
first | First column of the matrix |
second | Second column of the matrix |
third | Third column of the matrix |
concepts::Mapping< F, DimY, DimX >::Mapping | ( | const UnitNd< DimY > & | n | ) |
Constructor for rotation
n | Normal vector of the rotation |
Returns the adjugate of the matrix (only valid for square matrices) [f \mbox{adj}(M) = M^{-1}\det(M) \f]
|
inline |
Definition at line 459 of file vectorsMatrices.hh.
|
inline |
Computes x = AT y
H | can be F or any more general class that can operate on instances of F. |
Definition at line 540 of file vectorsMatrices.hh.
void concepts::Mapping< F, DimY, DimX >::operator() | ( | const Point< H, dimy > & | y, |
Point< J, dimx > & | x | ||
) | const |
Application operator. Computes x = A y where A is the matrix. If the dimensions do not match the matrix A is extended by the identity matrix.
Definition at line 557 of file vectorsMatrices.hh.
|
inline |
Returns an entry of the matrix (for read / write access)
Definition at line 446 of file vectorsMatrices.hh.
|
inline |
Returns an entry of the matrix.
Definition at line 437 of file vectorsMatrices.hh.
Point< typename Combtype< F, H >::type, DimY > concepts::Mapping< F, DimY, DimX >::operator* | ( | const Point< H, DimX > & | p | ) | const |
Returns a mapped Point.
Definition at line 531 of file vectorsMatrices.hh.
Returns the submatrix where the ith and jth column are erased
|
inline |
Fills the matrix with zeros.
Definition at line 497 of file vectorsMatrices.hh.