OpenMPCD
|
2-dimensional vector. More...
#include <Vector2D.hpp>
Public Types | |
typedef TypeTraits< T >::RealType | RealType |
The real-value type matching T. More... | |
Public Member Functions | |
OPENMPCD_CUDA_HOST_AND_DEVICE | Vector2D () |
Constructs a vector from the default values of the T type. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE | Vector2D (const T x_, const T y_) |
Constructs a vector from its coordinates. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getX () const |
Returns the x coordinate. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getY () const |
Returns the y coordinate. More... | |
const OPENMPCD_CUDA_HOST_AND_DEVICE T | dot (const Vector2D &rhs) const |
Returns the scalar product of this vector with the given vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE RealType | getMagnitudeSquared () const |
Returns the square of the magnitude of this vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE RealType | getMagnitude () const |
Returns the magnitude of this vector. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getCosineOfAngle (const Vector2D &rhs) const |
Returns the cosine of the angle between this vector and the given one. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE T | getAngle (const Vector2D &rhs) const |
Returns the the angle between this vector and the given one. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE bool | operator== (const Vector2D &rhs) const |
Equality operator. More... | |
OPENMPCD_CUDA_HOST_AND_DEVICE bool | operator!= (const Vector2D &rhs) const |
Inequality operator. More... | |
2-dimensional vector.
T | The underlying floating-point type. |
Definition at line 34 of file Vector2D.hpp.
typedef TypeTraits<T>::RealType OpenMPCD::Vector2D< T >::RealType |
The real-value type matching T.
Definition at line 37 of file Vector2D.hpp.
|
inline |
Constructs a vector from the default values of the T
type.
Definition at line 45 of file Vector2D.hpp.
|
inline |
Constructs a vector from its coordinates.
[in] | x_ | The x-coordinate. |
[in] | y_ | The y-coordinate. |
Definition at line 56 of file Vector2D.hpp.
|
inline |
Returns the scalar product of this vector with the given vector.
The scalar product is defines such that the left-hand-side's components are complex-conjugated prior to multiplication with the right-hand-side's components.
[in] | rhs | The right-hand-side. |
Definition at line 91 of file Vector2D.hpp.
|
inline |
Returns the the angle between this vector and the given one.
[in] | rhs | The right-hand-side vector. |
Definition at line 153 of file Vector2D.hpp.
|
inline |
Returns the cosine of the angle between this vector and the given one.
Result | The result type. |
[in] | rhs | The right-hand-side vector. |
Definition at line 124 of file Vector2D.hpp.
|
inline |
Returns the magnitude of this vector.
Definition at line 109 of file Vector2D.hpp.
|
inline |
Returns the square of the magnitude of this vector.
Definition at line 100 of file Vector2D.hpp.
|
inline |
Returns the x coordinate.
Definition at line 66 of file Vector2D.hpp.
|
inline |
Returns the y coordinate.
Definition at line 75 of file Vector2D.hpp.
|
inline |
Inequality operator.
[in] | rhs | The right-hand-side vector. |
Definition at line 180 of file Vector2D.hpp.
|
inline |
Equality operator.
[in] | rhs | The right-hand-side vector. |
Definition at line 169 of file Vector2D.hpp.