|
| Vector3 (double_t x=0, double_t y=0, double_t z=0) |
|
double_t | x () const |
|
double_t | y () const |
|
double_t | z () const |
|
double_t | r () const |
|
double_t | theta () const |
|
double_t | phi () const |
|
Vector3 | rXY () const |
|
void | setX (double_t scalar) |
|
void | setY (double_t scalar) |
|
void | setZ (double_t scalar) |
|
void | setR (double_t scalar) |
|
void | setTheta (double_t scalar) |
|
void | setPhi (double_t scalar) |
|
void | setXYZ (double_t x, double_t y, double_t z) |
|
void | setRThetaZ (double_t r, double_t theta, double_t z) |
|
void | setRThetaPhi (double_t r, double_t theta, double_t phi) |
|
Vector3 & | operator^= (const Vector3 &u) |
|
| NVector (const std::vector< double_t > &data) |
| Construct a vector using a std::vector . \( x_k \) represents data[k] . More...
|
|
| NVector (std::initializer_list< double_t > list) |
| Construct a vector using an initializer list {} . More...
|
|
| NVector (size_t dim=0) |
| Construct a vector of a given size. More...
|
|
| NVector (const NVector< double_t > &u) |
| Construct a vector by using copy() method. More...
|
|
virtual | ~NVector ()=default |
|
virtual std::string | str () const |
| Creates a string representing the vector. More...
|
|
size_t | dim () const |
| Dimension of the vector. More...
|
|
std::vector< double_t > | array () const |
| Creates an array with this vector. More...
|
|
NVector< double_t > & | operator+= (const NVector< double_t > &u) |
|
NVector< double_t > & | operator-= (const NVector< double_t > &u) |
|
virtual NVector< double_t > & | operator*= (double_ts) |
|
virtual NVector< double_t > & | operator/= (double_ts) |
|
NVector< double_t > & | operator= (const NVector< double_t > &u) |
| Copy source object on this object using copy() . More...
|
|
double_t | max () const |
| Maximum of the coordinates of the vector \( (x_0, x_1, .. x_{(n-1)}) \). More...
|
|
double_t | min () const |
| Minimum of the coordinates of the vector \( (x_0, x_1, .. x_{(n-1)}) \). More...
|
|
size_t | maxIndex () const |
| Index of maximum of the coordinates of vector \( (x_0, x_1, ..., x_{(n-1)}) \). More...
|
|
size_t | minIndex () const |
| Index of minimum of the coordinates of vector \( (x_0, x_1, ..., x_{(n-1)}) \). More...
|
|
double_t | maxAbs () const |
| Maximum of the coordinates of the vector \( (|x_0|, |x_1|, ..., |x_{(n-1)}|) \). More...
|
|
double_t | minAbs () const |
| Minimum of the coordinates of the vector \( (|x_0|, |x_1|, ..., |x_{(n-1)}|) \). More...
|
|
size_t | maxAbsIndex () const |
| Index of maximum of the coordinates of vector \( (|x_0|, |x_1|, ..., |x_{(n-1)}|) \). More...
|
|
size_t | minAbsIndex () const |
| Index of minimum of the coordinates of vector \( (|x_0|, |x_1|, ..., |x_{(n-1)}|) \). More...
|
|
NVector< double_t > & | swap (size_t k1, size_t k2) |
| Permutation of two elements. More...
|
|
NVector< double_t > & | shift (long iterations) |
| Shifts this vector iterations times. More...
|
|
NVector< double_t > & | fill (double_ts) |
| Fill vector with a scalar. For example fill(3) will set \( (3, 3, 3, ..., 3) \). More...
|
|
double_t & | operator() (long k) |
| Simple access operator. More...
|
|
double_t | operator() (long k) const |
|
NVector< double_t > | operator() (size_t k1, size_t k2) const |
| Manipulate sub-vector. More...
|
|
NVector< double_t > & | operator() (size_t k1, size_t k2) |
| Manipulate sub-vector. More...
|
|
iterator | begin () |
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
Class representing 3D Euclidean space.
- Copyright
- Dahoux Sami 2018 All rights reserved.
- Date
- 04/05/2018
- Author
- samiBendou
Featuring cross product, coordinate transforms and rotations. We will use the following 3D systems of coordinates :
- \form#114 Cartesian coordinates.
- \form#115 Cylindrical coordinates. We have the following transformations :
\[ \begin{align*} & r_{xy} & = & \sqrt{x^2 + y^2} \\ & \theta & = & atan(y / x) \\ & z & = & z \\ \end{align*} \]
- \form#117 Spherical coordinates. We have the following transformations :
\[ \begin{align*} & r & = & \sqrt{x^2 + y^2 + z^2} \\ & \theta & = & atan(y / x) \\ & \phi & = & atan(r_{xy} / z) \\ \end{align*} \]
The u is stored in cartesian coordinates. Getting and
setting components generally implies a constant time calculation to translate between cartesian
and other formats.
The `Vector3` class doesn't support function operator `NVector::operator()()`.