LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
|
Vector3d
is a vector in ℝ³ with components stored in double precision.
More...
#include <Vector3d.h>
Public Member Functions | |
Vector3d () | |
The default constructor creates a zero vector. | |
Vector3d (double x, double y, double z) | |
This constructor creates a vector with the given components. | |
bool | operator== (Vector3d const &v) const |
bool | operator!= (Vector3d const &v) const |
double const * | getData () const |
data returns a pointer to the 3 components of this vector. | |
double | operator() (int i) const |
The function call operator returns the i -th component of this vector. | |
double | x () const |
double | y () const |
double | z () const |
double | dot (Vector3d const &v) const |
dot returns the inner product of this vector and v . | |
double | getSquaredNorm () const |
getSquaredNorm returns the inner product of this vector with itself. | |
double | getNorm () const |
getNorm returns the L2 norm of this vector. | |
bool | isZero () const |
isZero returns true if all the components of this vector are zero. | |
double | normalize () |
normalize scales this vector to have unit norm and returns its norm prior to scaling. | |
bool | isNormalized () const |
isNormalized returns true if this vectors norm is very close to 1. | |
Vector3d | cross (Vector3d const &v) const |
cross returns the cross product of this vector and v . | |
Vector3d | operator- () const |
The unary minus operator negates every component of this vector. | |
Vector3d | operator* (double s) const |
The multiplication operator returns the component-wise product of this vector with scalar s . | |
Vector3d | operator/ (double s) const |
The division operator returns the component-wise quotient of this vector with scalar s . | |
Vector3d | operator+ (Vector3d const &v) const |
The addition operator returns the sum of this vector and v . | |
Vector3d | operator- (Vector3d const &v) const |
The subtraction operator returns the difference between this vector and v . | |
Vector3d & | operator*= (double s) |
Vector3d & | operator/= (double s) |
Vector3d & | operator+= (Vector3d const &v) |
Vector3d & | operator-= (Vector3d const &v) |
Vector3d | cwiseProduct (Vector3d const &v) const |
cwiseProduct returns the component-wise product of this vector and v . | |
Vector3d | rotatedAround (UnitVector3d const &k, Angle a) const |
rotatedAround returns a copy of this vector, rotated around the unit vector k by angle a according to the right hand rule. | |
Vector3d
is a vector in ℝ³ with components stored in double precision.
Definition at line 51 of file Vector3d.h.
|
inline |
The default constructor creates a zero vector.
Definition at line 54 of file Vector3d.h.
|
inline |
This constructor creates a vector with the given components.
Definition at line 57 of file Vector3d.h.
cross
returns the cross product of this vector and v
.
Definition at line 108 of file Vector3d.h.
cwiseProduct
returns the component-wise product of this vector and v
.
Definition at line 157 of file Vector3d.h.
|
inline |
dot
returns the inner product of this vector and v
.
Definition at line 80 of file Vector3d.h.
|
inline |
data
returns a pointer to the 3 components of this vector.
Definition at line 68 of file Vector3d.h.
|
inline |
getNorm
returns the L2 norm of this vector.
Definition at line 88 of file Vector3d.h.
|
inline |
getSquaredNorm
returns the inner product of this vector with itself.
Definition at line 85 of file Vector3d.h.
|
inline |
isNormalized
returns true if this vectors norm is very close to 1.
Definition at line 103 of file Vector3d.h.
|
inline |
isZero
returns true if all the components of this vector are zero.
Definition at line 93 of file Vector3d.h.
double lsst::sphgeom::Vector3d::normalize | ( | ) |
normalize
scales this vector to have unit norm and returns its norm prior to scaling.
It will accurately normalize any vector with finite components except for (0, 0, 0), including those with norms that overflow. Trying to normalize (0, 0, 0) will cause a std::runtime_error to be thrown.
Definition at line 49 of file Vector3d.cc.
|
inline |
Definition at line 63 of file Vector3d.h.
|
inline |
The function call operator returns the i
-th component of this vector.
Definition at line 71 of file Vector3d.h.
|
inline |
The multiplication operator returns the component-wise product of this vector with scalar s
.
Definition at line 123 of file Vector3d.h.
|
inline |
Definition at line 151 of file Vector3d.h.
The addition operator returns the sum of this vector and v
.
Definition at line 138 of file Vector3d.h.
Definition at line 153 of file Vector3d.h.
|
inline |
The unary minus operator negates every component of this vector.
Definition at line 115 of file Vector3d.h.
The subtraction operator returns the difference between this vector and v
.
Definition at line 145 of file Vector3d.h.
Definition at line 154 of file Vector3d.h.
|
inline |
The division operator returns the component-wise quotient of this vector with scalar s
.
Definition at line 131 of file Vector3d.h.
|
inline |
Definition at line 152 of file Vector3d.h.
|
inline |
Definition at line 59 of file Vector3d.h.
Vector3d lsst::sphgeom::Vector3d::rotatedAround | ( | UnitVector3d const & | k, |
Angle | a ) const |
rotatedAround
returns a copy of this vector, rotated around the unit vector k by angle a according to the right hand rule.
Definition at line 133 of file Vector3d.cc.
|
inline |
Definition at line 73 of file Vector3d.h.
|
inline |
Definition at line 75 of file Vector3d.h.
|
inline |
Definition at line 77 of file Vector3d.h.