A Cartesian vector in D-dimensions.
More...
#include <IMP/algebra/VectorD.h>
|
typedef const double * | CoordinateConstIterator |
|
typedef double * | CoordinateIterator |
|
|
| VectorD (const Floats &f) |
|
template<class It > |
| VectorD (It b, It e) |
|
| VectorD (double x) |
| Initialize the 1-vector from its value.
|
|
| VectorD (double x, double y) |
| Initialize a 2-vector from separate x,y values.
|
|
| VectorD (double x, double y, double z) |
| Initialize a 3-vector from separate x,y,z values.
|
|
| VectorD (double x0, double x1, double x2, double x3) |
| Initialize a 4-vector from separate w,x,y,z values.
|
|
| VectorD () |
| Default constructor.
|
|
CoordinateIterator | coordinates_begin () |
|
CoordinateConstIterator | coordinates_begin () const |
|
CoordinateIterator | coordinates_end () |
|
CoordinateConstIterator | coordinates_end () const |
|
Floats | get_coordinates () const |
|
unsigned int | get_dimension () const |
|
double | get_magnitude () const |
|
double | get_scalar_product (const VectorD< D > &o) const |
|
double | get_squared_magnitude () const |
|
VectorD | get_unit_vector () const |
|
double | operator[] (unsigned int i) const |
|
double & | operator[] (unsigned int i) |
|
template<int D>
class IMP::algebra::VectorD< D >
Store a vector of Cartesian coordinates. It supports all expected mathematical operators, including using * for the dot product.
- See Also
- Vector3D
-
Vector2D
See geometric primitives for more information.
Definition at line 48 of file VectorD.h.
- Exceptions
-
- Note
- Only use this from python.
Definition at line 101 of file VectorD.h.
template<int D>
template<class It >
The distance between b and e must be equal to D.
Definition at line 112 of file VectorD.h.
Returns a unit vector pointing at the same direction as this vector.
- Note
- If the magnitude of this vector is smaller than 1e-12 (an arbitrarily selected small number), returns a unit vector pointing at a random direction
Definition at line 204 of file VectorD.h.
Return the ith Cartesian coordinate. In 3D use [0] to get the x coordinate etc.
Definition at line 171 of file VectorD.h.
Return the ith Cartesian coordinate. In 3D use [0] to get the x coordinate etc.
Definition at line 178 of file VectorD.h.
The documentation for this class was generated from the following file: