vectorsMatrices.hh
Go to the documentation of this file.
240 inline Point<typename Combtype<F,Real>::type,dim> operator*(const Real x, const Point<F,dim>& y)
246 inline Point<typename Combtype<F,Cmplx>::type,dim> operator*(const Cmplx x, const Point<F,dim>& y)
362 Mapping(std::enable_if<std::is_floating_point<FieldTs>::value, FieldTs>::type... data) : data_{data...} {
465 Mapping<typename Combtype<G,F>::type, DimY, DimZ> operator*(const Mapping<G, DimX, DimZ>& m) const;
531 Point<typename Combtype<F,H>::type, DimY> Mapping<F, DimY, DimX>::operator*(const Point<H, DimX>& p) const
Point< Cmplx, dim > operator*(const Cmplx n) const
Scaling operator with a complex number.
Definition: vectorsMatrices.hh:148
Mapping< F, DimX, DimY > inverse() const
Returns the inverse of the matrix.
void rank1Product(const Point< F, DimX > x, const Point< F, DimY > y)
Computes x yT and adds the result to the matrix.
Datatype< F >::type type
Definition: vectorsMatrices.hh:622
static std::string name()
Definition: vectorsMatrices.hh:656
Point< H, DimY > mapPoint(const Point< H, DimX > &b) const
Definition: vectorsMatrices.hh:459
Mapping< F, DimY, DimX > & operator*=(const Mapping< F, DimY, DimX > &m)
Multiplication operator ( *this = operator()(*this, m); )
Point< Cmplx, dim > operator/(const Cmplx n) const
Unscaling operator with a complex number.
Definition: vectorsMatrices.hh:159
Realtype< F >::type type
Definition: vectorsMatrices.hh:220
F determinant() const
Returns the determinant of the matrix (only valid for square matrices)
Introduction of a point type which is Real or Cmplx for dimension 1 and Point<Real,...
Definition: vectorsMatrices.hh:684
Mapping< F, DimY, DimX > & scaleCols(const Point< F, DimX > &s)
Scales the columns with the respective entries in s.
Introduction of a mapping type which is Real or Cmplx for dimension 1 and Mapping<Real,...
Definition: vectorsMatrices.hh:642
Point< typename Combtype< F, H >::type, DimY > operator*(const Point< H, DimX > &p) const
Returns a mapped Point.
Definition: vectorsMatrices.hh:531
const concepts::Real conj(const concepts::Real &v)
Returns the conjugate complex of a real value.
Definition: operations.hh:83
Mapping(const Point< F, DimY > first, const Point< F, DimY > second, const Point< F, DimY > third)
Constructor for a 3D mapping.
Mapping< F, DimY-1, DimX-1 > subMatrix(uint i, uint j) const
Returns the submatrix where the ith and jth column are erased.
Point< F, dim > operator-(const Point< F, dim > &p) const
Subtraction operator.
Definition: vectorsMatrices.hh:121
concepts::Real arg(const concepts::Point< concepts::Real, 2 > &p)
Returns the phase angle of a real 2D vector.
Point< F, dim > operator/(const Real n) const
Unscaling operator with a real number.
Definition: vectorsMatrices.hh:164
const concepts::Real norm(const concepts::Real &v)
Returns the square of a real value.
Definition: operations.hh:90
Point< typename Combtype< F, Real >::type, dim > operator*(const Real x, const Point< F, dim > &y)
Definition: vectorsMatrices.hh:240
const F & operator()(uint i, uint j) const
Returns an entry of the matrix.
Definition: vectorsMatrices.hh:437
F operator*(const UnitNd< dim > &b) const
Point(const uchar *pgm, const Real x, const Real y, const Real z=0.0)
Constructor with a processed map.
#define conceptsAssert(cond, exc)
Assert that a certain condition is fulfilled.
Definition: exceptions.hh:394
void operator()(const Point< H, dimy > &y, Point< J, dimx > &x) const
Application operator.
Definition: vectorsMatrices.hh:557
#define DEBUGL(doit, msg)
Mapping< F, DimY, DimY > prodTranspose() const
Returns the product with the transpose of the matrix.
Mapping< typename Combtype< G, F >::type, DimY, DimZ > operator*(const Mapping< G, DimX, DimZ > &m) const
Multiplication operator.
Point< F, dim > operator*(const Real n) const
Scaling operator with a real number.
Definition: vectorsMatrices.hh:153
Mapping< F, DimY, DimX > & operator+=(const Mapping< F, DimY, DimX > &M)
Addition operator.
Mapping< F, DimX, DimY > transpose() const
Returns the transpose of the matrix.
Point< F, dim > & operator+=(const Point< F, dim > &p)
Addition operator.
Definition: vectorsMatrices.hh:104
Point< F, dim > & operator=(const Point< F, dim2 > &b)
Assignment operator.
Definition: vectorsMatrices.hh:83
std::ostream & operator<<(std::ostream &os, const Level< dim > &c)
std::ostream & info(std::ostream &os) const
F dot(const Point< F, dim > &b) const
Inner product, i.e. for complex arguments: this * conjugate(b)
Mapping(const Point< F, DimY > first, const Point< F, DimY > second)
Constructor for a 2D mapping.
Realtype< F >::type type
Definition: vectorsMatrices.hh:616
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
Mapping< F, DimY, DimX > adjugate() const
Returns the adjugate of the matrix (only valid for square matrices) [f \mbox{adj}(M) = M^{-1}\det(M) ...
Point< F, 3 > operator^(const Point< F, 3 > &b) const
Outer product (for 3D)
Point< F, dim > & ortho(const Point< F, dim > &a)
Change vector to the by 90 degrees (clockwise) rotated vector a (only 2D)
Point< F, dim > ortho() const
Returns a by 90 degrees (clockwise) rotated vector (only 2D)
F & operator()(uint i, uint j)
Returns an entry of the matrix (for read / write access)
Definition: vectorsMatrices.hh:446
Point< F, dim > operator+(const Point< F, dim > &p) const
Addition operator.
Definition: vectorsMatrices.hh:110
std::ostream & info(std::ostream &os) const
void mapTranspose(const Point< H, DimY > &y, Point< H, DimX > &x) const
Computes x = AT y.
Definition: vectorsMatrices.hh:540
Taking for a complex type the appropiate real type and for a real type itself.
Definition: typedefs.hh:100
void memorycpy(F *dest, const G *src, size_t n)
Copies n entries from src to dest (faster than std::memcpy)
Definition: vectorsMatrices.hh:31
Point< F, dim > & ortho()
Rotates the vector by 90 degrees (clockwise) (only 2D)
Point< F, dim > & operator-=(const Point< F, dim > &p)
Subtraction operator.
Definition: vectorsMatrices.hh:115
bool operator==(const Point< F, dim > &x, const Point< F, dim > &y)
Definition: vectorsMatrices.hh:231
Definition: operations.hh:76
void max(const Point< F, dim > &a, const Point< F, dim > &b)
Sets the vector to the elementwise maximum of a and b.
Definition: vectorsMatrices.hh:694
Point(const F e0, const F e1, const F e2=0)
Constructor for a 2D or a 3D Point.
Definition: vectorsMatrices.hh:70
void lincomb(const Point< F, dim > &a, const Point< F, dim > &b, const F ca=1.0, const F cb=1.0)
Assign the vector the linear combination of a and b.
Definition: vectorsMatrices.hh:688
static std::string name()
Definition: vectorsMatrices.hh:663
Mapping< F, DimY, DimX > & scaleRows(const Point< F, DimY > &s)
Scales the rows with the respective entries in s.
const uint lin_(uint i, uint j) const
index in stack array of entry (i,j) of row-based matrix
Definition: vectorsMatrices.hh:524
Mapping< typename Combtype< G, F >::type, DimY, DimX > operator*(const G n) const
Scaling operator.
void min(const Point< F, dim > &a, const Point< F, dim > &b)
Sets the vector to the elementwise minimum of a and b.