concepts::Point< F, dim > Class Template Reference
Basic class for a Point or a vector. More...
#include <vectorsMatrices.hh>
Public Member Functions | |
F | dot (const Point< F, dim > &b) const |
Inner product, i.e. for complex arguments: this * conjugate(b) More... | |
std::ostream & | info (std::ostream &os) const |
Real | l2 () const |
Returns the Euclidian norm of the vector. More... | |
Real | l2_2 () const |
Returns the square of the Euclidian norm of the vector. More... | |
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. More... | |
Real | linfty () const |
Returns the Maximum norm of the vector. More... | |
void | max (const Point< F, dim > &a, const Point< F, dim > &b) |
Sets the vector to the elementwise maximum of a and b. More... | |
void | min (const Point< F, dim > &a, const Point< F, dim > &b) |
Sets the vector to the elementwise minimum of a and b. More... | |
operator const F * () const | |
Returns a pointer to the data. More... | |
operator F* () | |
Returns a pointer to the data. More... | |
Point< Cmplx, dim > | operator* (const Cmplx n) const |
Scaling operator with a complex number. More... | |
F | operator* (const Point< F, dim > &b) const |
Inner product. More... | |
Point< F, dim > | operator* (const Real n) const |
Scaling operator with a real number. More... | |
F | operator* (const UnitNd< dim > &b) const |
template<class G > | |
Point< F, dim > & | operator*= (const G n) |
Scaling operator. More... | |
Point< F, dim > | operator+ (const Point< F, dim > &p) const |
Addition operator. More... | |
Point< F, dim > & | operator+= (const Point< F, dim > &p) |
Addition operator. More... | |
Point< F, dim > | operator- (const Point< F, dim > &p) const |
Subtraction operator. More... | |
Point< F, dim > & | operator-= (const Point< F, dim > &p) |
Subtraction operator. More... | |
Point< Cmplx, dim > | operator/ (const Cmplx n) const |
Unscaling operator with a complex number. More... | |
Point< F, dim > | operator/ (const Real n) const |
Unscaling operator with a real number. More... | |
template<class G > | |
Point< F, dim > & | operator/= (const G n) |
Unscaling operator. More... | |
template<uint dim2> | |
Point< F, dim > & | operator= (const Point< F, dim2 > &b) |
Assignment operator. More... | |
F & | operator[] (const uint i) |
Index operator. More... | |
const F & | operator[] (const uint i) const |
Index operator. More... | |
F | operator^ (const Point< F, 2 > &b) const |
Outer product (for 2D) More... | |
Point< F, 3 > | operator^ (const Point< F, 3 > &b) const |
Outer product (for 3D) More... | |
Point< F, dim > & | ortho () |
Rotates the vector by 90 degrees (clockwise) (only 2D) More... | |
Point< F, dim > | ortho () const |
Returns a by 90 degrees (clockwise) rotated vector (only 2D) More... | |
Point< F, dim > & | ortho (const Point< F, dim > &a) |
Change vector to the by 90 degrees (clockwise) rotated vector a (only 2D) More... | |
Point () | |
Constructor. More... | |
Point (const F e0, const F e1, const F e2=0) | |
Constructor for a 2D or a 3D Point. More... | |
template<uint dim2> | |
Point (const Point< F, dim2 > &p) | |
Copy constructor. More... | |
template<class G > | |
Point (const Point< G, dim > &p) | |
Copy constructor. More... | |
Point (const uchar *pgm, const Real x, const Real y, const Real z=0.0) | |
Constructor with a processed map. More... | |
Point (F x) | |
Constructor. More... | |
Point< F, dim > & | scale (const Point< F, dim > &n) |
Scaling. More... | |
Private Attributes | |
F | data_ [dim] |
Detailed Description
template<class F, uint dim>
class concepts::Point< F, dim >
Basic class for a Point or a vector.
The template parameters make it possible to use this class for 2D and 3D Points and vectors with real or complex valued entries.
Definition at line 46 of file vectorsMatrices.hh.
Constructor & Destructor Documentation
◆ Point() [1/6]
|
inline |
◆ Point() [2/6]
|
inline |
Copy constructor.
Definition at line 54 of file vectorsMatrices.hh.
◆ Point() [3/6]
|
inline |
Copy constructor.
Definition at line 59 of file vectorsMatrices.hh.
◆ Point() [4/6]
|
inline |
◆ Point() [5/6]
|
inline |
Constructor for a 2D or a 3D Point.
Definition at line 70 of file vectorsMatrices.hh.
◆ Point() [6/6]
concepts::Point< F, dim >::Point | ( | const uchar * | pgm, |
const Real | x, | ||
const Real | y, | ||
const Real | z = 0.0 |
||
) |
Constructor with a processed map.
Member Function Documentation
◆ dot()
F concepts::Point< F, dim >::dot | ( | const Point< F, dim > & | b | ) | const |
Inner product, i.e. for complex arguments: this * conjugate(b)
◆ info()
std::ostream& concepts::Point< F, dim >::info | ( | std::ostream & | os | ) | const |
◆ l2()
|
inline |
Returns the Euclidian norm of the vector.
Definition at line 182 of file vectorsMatrices.hh.
◆ l2_2()
Real concepts::Point< F, dim >::l2_2 | ( | ) | const |
Returns the square of the Euclidian norm of the vector.
◆ lincomb()
void concepts::Point< F, dim >::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.
◆ linfty()
Real concepts::Point< F, dim >::linfty | ( | ) | const |
Returns the Maximum norm of the vector.
◆ max()
void concepts::Point< F, dim >::max | ( | const Point< F, dim > & | a, |
const Point< F, dim > & | b | ||
) |
Sets the vector to the elementwise maximum of a and b.
◆ min()
void concepts::Point< F, dim >::min | ( | const Point< F, dim > & | a, |
const Point< F, dim > & | b | ||
) |
Sets the vector to the elementwise minimum of a and b.
◆ operator const F *()
|
inline |
Returns a pointer to the data.
Definition at line 101 of file vectorsMatrices.hh.
◆ operator F*()
|
inline |
Returns a pointer to the data.
Definition at line 99 of file vectorsMatrices.hh.
◆ operator*() [1/4]
|
inline |
Scaling operator with a complex number.
Definition at line 148 of file vectorsMatrices.hh.
◆ operator*() [2/4]
F concepts::Point< F, dim >::operator* | ( | const Point< F, dim > & | b | ) | const |
Inner product.
◆ operator*() [3/4]
|
inline |
Scaling operator with a real number.
Definition at line 153 of file vectorsMatrices.hh.
◆ operator*() [4/4]
F concepts::Point< F, dim >::operator* | ( | const UnitNd< dim > & | b | ) | const |
◆ operator*=()
|
inline |
Scaling operator.
Definition at line 134 of file vectorsMatrices.hh.
◆ operator+()
|
inline |
Addition operator.
Definition at line 110 of file vectorsMatrices.hh.
◆ operator+=()
|
inline |
Addition operator.
Definition at line 104 of file vectorsMatrices.hh.
◆ operator-()
|
inline |
Subtraction operator.
Definition at line 121 of file vectorsMatrices.hh.
◆ operator-=()
|
inline |
Subtraction operator.
Definition at line 115 of file vectorsMatrices.hh.
◆ operator/() [1/2]
|
inline |
Unscaling operator with a complex number.
Definition at line 159 of file vectorsMatrices.hh.
◆ operator/() [2/2]
|
inline |
Unscaling operator with a real number.
Definition at line 164 of file vectorsMatrices.hh.
◆ operator/=()
|
inline |
Unscaling operator.
Definition at line 142 of file vectorsMatrices.hh.
◆ operator=()
|
inline |
Assignment operator.
Definition at line 83 of file vectorsMatrices.hh.
◆ operator[]() [1/2]
|
inline |
Index operator.
Definition at line 94 of file vectorsMatrices.hh.
◆ operator[]() [2/2]
|
inline |
Index operator.
Definition at line 90 of file vectorsMatrices.hh.
◆ operator^() [1/2]
F concepts::Point< F, dim >::operator^ | ( | const Point< F, 2 > & | b | ) | const |
Outer product (for 2D)
◆ operator^() [2/2]
Point<F, 3> concepts::Point< F, dim >::operator^ | ( | const Point< F, 3 > & | b | ) | const |
Outer product (for 3D)
◆ ortho() [1/3]
Point<F, dim>& concepts::Point< F, dim >::ortho | ( | ) |
Rotates the vector by 90 degrees (clockwise) (only 2D)
◆ ortho() [2/3]
Point<F, dim> concepts::Point< F, dim >::ortho | ( | ) | const |
Returns a by 90 degrees (clockwise) rotated vector (only 2D)
◆ ortho() [3/3]
Point<F, dim>& concepts::Point< F, dim >::ortho | ( | const Point< F, dim > & | a | ) |
Change vector to the by 90 degrees (clockwise) rotated vector a
(only 2D)
◆ scale()
|
inline |
Scaling.
Definition at line 170 of file vectorsMatrices.hh.
Member Data Documentation
◆ data_
|
private |
Definition at line 209 of file vectorsMatrices.hh.
The documentation for this class was generated from the following file:
- basics/vectorsMatrices.hh