4-element vector that represents rotation in 3D. More...
#include <vnl_fwd.h>

Public Types | |
| enum | |
| typedef vnl_vector_fixed< T, n > | self |
| typedef size_t | size_type |
| typedef T | element_type |
| Type defs for iterators. More... | |
| typedef T * | iterator |
| Type defs for iterators. More... | |
| typedef T const * | const_iterator |
| Const iterator type. More... | |
| typedef vnl_c_vector< T >::abs_t | abs_t |
Public Member Functions | |
| vnl_quaternion ()=default | |
| Constructor for null quaternion. More... | |
| vnl_quaternion (T x, T y, T z, T r) | |
| Construct quaternion from components x,y,z,r. More... | |
| vnl_quaternion (T theta_X, T theta_Y, T theta_Z) | |
| Construct quaternion from Euler Angles,. More... | |
| vnl_quaternion (vnl_vector_fixed< T, 3 > const &axis, double angle) | |
| Construct quaternion from axis and angle of rotation. More... | |
| vnl_quaternion (vnl_matrix_fixed< T, 3, 3 > const &transform) | |
| Construct quaternion from 3x3 row-major matrix. More... | |
| vnl_quaternion (vnl_vector_fixed< T, 3 > const &vec) | |
| Construct quaternion from a 3D vector. More... | |
| vnl_quaternion (vnl_vector_fixed< T, 4 > const &vec) | |
| Construct quaternion from a 4D vector. More... | |
| vnl_quaternion (vnl_quaternion< T > const &from) | |
| Copy constructor – Creates a copy of from quaternion. More... | |
| ~vnl_quaternion ()=default | |
| Free internal array. More... | |
| vnl_quaternion & | operator= (vnl_quaternion< T > const &rhs) |
| Overloads assignment operator to copy rhs quaternion into lhs quaternion. More... | |
| T & | x () |
| Imaginary component, parallel to axis of rotation. More... | |
| T & | y () |
| Imaginary component, parallel to axis of rotation. More... | |
| T & | z () |
| Imaginary component, parallel to axis of rotation. More... | |
| T & | r () |
| Real component. More... | |
| T | x () const |
| Imaginary component, parallel to axis of rotation. More... | |
| T | y () const |
| Imaginary component, parallel to axis of rotation. More... | |
| T | z () const |
| Imaginary component, parallel to axis of rotation. More... | |
| T | r () const |
| Real component. More... | |
| T | real () const |
| Copies and returns the real part. More... | |
| vnl_vector_fixed< T, 3 > | imaginary () const |
| Copies and returns the imaginary part. More... | |
| vnl_vector_fixed< T, 3 > | axis () const |
| Axis of rotation. More... | |
| double | angle () const |
| Angle of rotation. More... | |
| vnl_matrix_fixed< T, 3, 3 > | rotation_matrix_transpose () const |
| 3x3 rotation matrix. More... | |
| vnl_matrix_fixed< T, 4, 4 > | rotation_matrix_transpose_4 () const |
| 4x4 rotation matrix. More... | |
| vnl_quaternion< T > | conjugate () const |
| Same real, opposite img part. More... | |
| vnl_quaternion< T > | inverse () const |
| Inverse for nonzero quat. More... | |
| vnl_quaternion< T > | operator * (vnl_quaternion< T > const &) const |
| Returns the product of two quaternions. More... | |
| vnl_vector_fixed< T, 3 > | rotate (vnl_vector_fixed< T, 3 > const &) const |
| Rotate 3D v. More... | |
| vnl_vector_fixed< T, 3 > | rotation_euler_angles () const |
| Rotation representation in Euler angles. More... | |
| unsigned int | size () const |
| Length of the vector. More... | |
| void | put (unsigned int i, T const &v) |
| Put value at given position in vector. More... | |
| T | get (unsigned int i) const |
| Get value at element i. More... | |
| vnl_vector_fixed & | fill (T const &v) |
| Set all values to v. More... | |
| vnl_vector_fixed & | copy_in (T const *ptr) |
| Sets elements to ptr[i]. More... | |
| void | copy_out (T *ptr) const |
| Copy elements to ptr[i]. More... | |
| vnl_vector_fixed & | set (T const *ptr) |
| Sets elements to ptr[i]. More... | |
| T & | operator() (unsigned int i) |
| Return reference to the element at specified index. More... | |
| T const & | operator() (unsigned int i) const |
| Return reference to the element at specified index. More... | |
| T & | operator[] (const size_t i) |
| Return the i-th element. More... | |
| const T & | operator[] (const size_t i) const |
| Return the i-th element. More... | |
| T const * | data_block () const |
| Access the contiguous block storing the elements in the vector. More... | |
| T * | data_block () |
| Access the contiguous block storing the elements in the vector. More... | |
| vnl_vector_ref< T > | as_ref () |
| Explicit conversion to a vnl_vector_ref. More... | |
| const vnl_vector_ref< T > | as_ref () const |
| Explicit conversion to a vnl_vector_ref. More... | |
| operator const vnl_vector_ref< T > () const | |
| Cheap conversion to vnl_vector_ref. More... | |
| iterator | begin () |
| Iterator pointing to start of data. More... | |
| const_iterator | begin () const |
| Iterator pointing to start of data. More... | |
| iterator | end () |
| Iterator pointing to element beyond end of data. More... | |
| const_iterator | end () const |
| Iterator pointing to element beyond end of data. More... | |
| vnl_vector_fixed< T, n > | apply (T(*f)(T)) |
| Apply f to each element. More... | |
| vnl_vector_fixed< T, n > | apply (T(*f)(const T &)) |
| Apply f to each element. More... | |
| vnl_vector_fixed< T, n > & | operator+= (T s) |
| vnl_vector_fixed< T, n > & | operator+= (const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > & | operator+= (const vnl_vector< T > &v) |
| vnl_vector_fixed< T, n > & | operator-= (T s) |
| vnl_vector_fixed< T, n > & | operator-= (const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > & | operator-= (const vnl_vector< T > &v) |
| vnl_vector_fixed< T, n > & | operator *= (T s) |
| vnl_vector_fixed< T, n > & | operator/= (T s) |
| vnl_vector_fixed< T, n > | operator- () const |
| vnl_vector< T > | extract (unsigned int len, unsigned int start=0) const |
| Returns a subvector specified by the start index and length. O(n). More... | |
| vnl_vector< T > | as_vector () const |
| Convert to a vnl_vector. More... | |
| vnl_vector_fixed & | update (vnl_vector< T > const &, unsigned int start=0) |
| Replaces elements with index beginning at start, by values of v. O(n). More... | |
| abs_t | squared_magnitude () const |
| Return sum of squares of elements. More... | |
| abs_t | magnitude () const |
| Return magnitude (length) of vector. More... | |
| abs_t | one_norm () const |
| Return sum of absolute values of the elements. More... | |
| abs_t | two_norm () const |
| Return sqrt of sum of squares of values of elements. More... | |
| abs_t | inf_norm () const |
| Return largest absolute element value. More... | |
| vnl_vector_fixed< T, n > & | normalize () |
| Normalise by dividing through by the magnitude. More... | |
| abs_t | rms () const |
| Root Mean Squares of values. More... | |
| T | min_value () const |
| Smallest value. More... | |
| T | max_value () const |
| Largest value. More... | |
| unsigned | arg_min () const |
| Location of smallest value. More... | |
| unsigned | arg_max () const |
| Location of largest value. More... | |
| T | mean () const |
| Mean of values in vector. More... | |
| T | sum () const |
| Sum of values in a vector. More... | |
| vnl_vector_fixed & | flip () |
| Reverse the order of the elements. More... | |
| void | assert_size (unsigned sz) const |
| Check that size()==sz if not, abort();. More... | |
| void | assert_finite () const |
| Check that this is finite if not, abort();. More... | |
| bool | is_finite () const |
| Return true if it's finite. More... | |
| bool | is_zero () const |
| Return true iff all the entries are zero. More... | |
| bool | empty () const |
| Return true iff the size is zero. More... | |
| bool | operator_eq (vnl_vector_fixed< T, n > const &v) const |
| Return true if *this == v. More... | |
| bool | operator_eq (vnl_vector< T > const &v) const |
| Return true if *this == v. More... | |
| bool | read_ascii (std::istream &s) |
| Read from text stream. More... | |
| void | print (std::ostream &s) const |
| Display the vector. More... | |
Static Public Member Functions | |
| static void | add (const T *a, const T *b, T *r) |
| static void | add (const T *a, T b, T *r) |
| static void | sub (const T *a, const T *b, T *r) |
| static void | sub (const T *a, T b, T *r) |
| static void | sub (T a, const T *b, T *r) |
| static void | mul (const T *a, const T *b, T *r) |
| static void | mul (const T *a, T b, T *r) |
| static void | div (const T *a, const T *b, T *r) |
| static void | div (const T *a, T b, T *r) |
Protected Attributes | |
| T | data_ [n] |
Private Types | |
| typedef vnl_vector_fixed< T, 4 > | Base |
Related Functions | |
(Note that these are not member functions.) | |
| template<class T > | |
| std::istream & | operator>> (std::istream &is, vnl_quaternion< T > &q) |
| operator<<. More... | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &os, vnl_quaternion< T > const &q) |
| operator<<. More... | |
| template<class T > | |
| void | x_write (std::ostream &os, vnl_quaternion< T > const &v, std::string name="vnl_quaternion") |
| XML save vnl_quaternion to stream. More... | |
| template<class T > | |
| void | x_write_tree (std::ostream &os, vnl_quaternion< T > const &v, std::string name="vnl_quaternion") |
| XML save vnl_quaternion as a 2-level tree to stream. More... | |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator- (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | operator- (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | operator- (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator- (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| vnl_vector_fixed< T, n > | operator- (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b) |
| void | vsl_b_write (vsl_b_ostream &os, const vnl_vector_fixed< T, n > &v) |
| Binary save vnl_vector_fixed to stream. More... | |
| void | vsl_b_read (vsl_b_istream &is, vnl_vector_fixed< T, n > &v) |
| Binary load vnl_vector_fixed from stream. More... | |
| void | vsl_print_summary (std::ostream &os, const vnl_vector_fixed< T, n > &b) |
| Print human readable summary of object to a stream. More... | |
| vnl_vector_fixed< std::complex< T >, n > | vnl_complexify (vnl_vector_fixed< T, n > const &R) |
| Return complexified version of real fixed vector R. More... | |
| vnl_vector_fixed< std::complex< T >, n > | vnl_complexify (vnl_vector_fixed< T, n > const &R, vnl_vector_fixed< T, n > const &I) |
| Return complex fixed vector R+j*I from two real fixed vectors R and I. More... | |
| T | vnl_cross_2d (const vnl_vector_fixed< T, 2 > &v1, const vnl_vector_fixed< T, 2 > &v2) |
| Compute the 2-D cross product. More... | |
| T | vnl_cross_2d (vnl_vector_fixed< T, 2 > const &v1, vnl_vector< T > const &v2) |
| Compute the 2-D cross product. More... | |
| T | vnl_cross_2d (vnl_vector< T > const &v1, vnl_vector_fixed< T, 2 > const &v2) |
| Compute the 2-D cross product. More... | |
| double | vnl_cross_2d (vnl_double_2 const &v1, vnl_double_2 const &v2) |
| Cross product of two 2-vectors. More... | |
| float | vnl_cross_2d (vnl_float_2 const &v1, vnl_float_2 const &v2) |
| Cross product of two 2-vectors. More... | |
| vnl_vector_fixed< T, 3 > | vnl_cross_3d (const vnl_vector_fixed< T, 3 > &v1, const vnl_vector_fixed< T, 3 > &v2) |
| Compute the 3-D cross product. More... | |
| vnl_vector_fixed< T, n > | vnl_cross_3d (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| Compute the 3-D cross product. More... | |
| vnl_vector_fixed< T, n > | vnl_cross_3d (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| Compute the 3-D cross product. More... | |
| vnl_double_3 | vnl_cross_3d (vnl_double_3 const &v1, vnl_double_3 const &v2) |
| Cross product of two 3-vectors. More... | |
| vnl_float_3 | vnl_cross_3d (vnl_float_3 const &v1, vnl_float_3 const &v2) |
| Cross product of two 3-vectors. More... | |
| vnl_vector_fixed< T, N > | operator * (vnl_diag_matrix_fixed< T, N > const &D, vnl_vector_fixed< T, N > const &A) |
| Multiply a vnl_diag_matrix_fixed by a vnl_vector_fixed. n flops. More... | |
| vnl_vector_fixed< T, N > | operator * (vnl_vector_fixed< T, N > const &A, vnl_diag_matrix_fixed< T, N > const &D) |
| Multiply a vnl_vector_fixed by a vnl_diag_matrix_fixed. n flops. More... | |
| vnl_vector_fixed< T, n > | operator * (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator * (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator * (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator * (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| vnl_vector_fixed< T, N > | vnl_imag (vnl_vector_fixed< std::complex< T >, N > const &C) |
| Vector of imaginary parts of vnl_vector_fixed<std::complex<T>, N >. More... | |
| vnl_double_3 | operator+ (const vnl_double_3 &a, const vnl_double_3 &b) |
| The binary addition operator. More... | |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator+ (const T &s, const vnl_vector_fixed< T, n > &v) |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | operator+ (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | operator+ (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator+ (T s, const vnl_vector_fixed_ref_const< T, n > &v) |
| vnl_vector_fixed< T, n > | operator+ (const vnl_vector_fixed_ref_const< T, n > &a, const vnl_vector_fixed_ref_const< T, n > &b) |
| VNL_EXPORT std::ostream & | vnl_matlab_print (std::ostream &, vnl_vector_fixed< T, n > const &, char const *variable_name=nullptr, vnl_matlab_print_format=vnl_matlab_print_format_default) |
| print a vnl_vector_fixed<T>. More... | |
| VNL_EXPORT vnl_matrix_fixed< T, m, n > | outer_product (vnl_vector_fixed< T, m > const &a, vnl_vector_fixed< T, n > const &b) |
| vnl_matrix< T > | outer_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_matrix< T > | outer_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| VNL_EXPORT bool | operator< (vnl_vector_fixed< T, n > const &lhs, vnl_vector_fixed< T, n > const &rhs) |
| Define a complete ordering on vnl_vector_fixed. More... | |
| vnl_vector_fixed< T, N > | vnl_real (vnl_vector_fixed< std::complex< T >, N > const &C) |
| Vector of real parts of vnl_vector_fixed<std::complex<T>, N >. More... | |
| vnl_vector_fixed< T, n > | operator/ (const vnl_vector_fixed< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | operator/ (const vnl_vector_fixed_ref_const< T, n > &v, T s) |
| vnl_vector_fixed< T, n > | element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | element_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | element_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector_fixed< T, n > | element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| vnl_vector< T > | element_quotient (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| vnl_vector< T > | element_quotient (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| T | dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | dot_product (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | dot_product (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| T | angle (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | angle (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | angle (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| T | vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| T | vnl_vector_ssd (const vnl_vector_fixed< T, n > &a, const vnl_vector< T > &b) |
| T | vnl_vector_ssd (const vnl_vector< T > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator== (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator== (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b) |
| bool | operator== (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b) |
| bool | operator!= (const vnl_vector_fixed< T, n > &a, const vnl_vector_fixed< T, n > &b) |
| bool | operator!= (vnl_vector_fixed< T, n > const &a, vnl_vector< T > const &b) |
| bool | operator!= (vnl_vector< T > const &a, vnl_vector_fixed< T, n > const &b) |
| std::ostream & | operator<< (std::ostream &ostr, const vnl_vector_fixed< T, n > &v) |
| std::ostream & | operator<< (std::ostream &o, const vnl_vector_fixed_ref_const< T, n > &v) |
| std::istream & | operator>> (std::istream &ostr, vnl_vector_fixed< T, n > &v) |
| std::istream & | operator>> (std::istream &i, const vnl_vector_fixed_ref< T, n > &v) |
| void | x_write (std::ostream &os, vnl_vector_fixed< T, n > const &v, std::string name="vnl_vector_fixed") |
| XML save vnl_vector_fixed to stream. More... | |
| void | x_write_tree (std::ostream &os, vnl_vector_fixed< T, n > const &v, std::string name="vnl_vector_fixed") |
| XML save vnl_vector_fixed as a 2-level tree to stream. More... | |
4-element vector that represents rotation in 3D.
vnl_quaternion is a 4-element vector with 1 real and 3 imaginary components:
where theta and k are respectively the angle and axis of rotation.
3D vectors can be thought of as pure imaginary quaternions, and so a quaternion is represented as a vnl_vector_fixed<T,4> with the imaginary part before the real part for 1-1 alignment.
Unit quaternions (i.e., for which
) provide a more efficient representation for rotation than the usual orthonormal matrix that has nine parameters and six orthonormal constraints. The unit quaternion has only one unit magnitude constraint. Composing rotations with quaternions results in fewer multiplications and less error. To insure valid rotation results, the nearest unit quaternion is computed, and this is much easier than finding the nearest orthonormal matrix. Transforming vectors with a quaternion requires more operations compared to multiplication with the equivalent orthonormal matrix.
|
inherited |
Definition at line 365 of file vnl_vector_fixed.h.
|
private |
Definition at line 66 of file vnl_quaternion.h.
|
inherited |
Const iterator type.
Definition at line 296 of file vnl_vector_fixed.h.
|
inherited |
Type defs for iterators.
Definition at line 286 of file vnl_vector_fixed.h.
|
inherited |
Type defs for iterators.
Definition at line 288 of file vnl_vector_fixed.h.
|
inherited |
Definition at line 93 of file vnl_vector_fixed.h.
|
inherited |
Definition at line 94 of file vnl_vector_fixed.h.
|
inherited |
Definition at line 96 of file vnl_vector_fixed.h.
|
default |
Constructor for null quaternion.
| vnl_quaternion< T >::vnl_quaternion | ( | T | tx, |
| T | ty, | ||
| T | tz, | ||
| T | rea | ||
| ) |
Construct quaternion from components x,y,z,r.
Creates a quaternion from its ordered components.
x, y, z denote the imaginary part, which are the coordinates of the rotation axis multiplied by the sine of half the angle of rotation. r denotes the real part, or the cosine of half the angle of rotation. Default is to create a null quaternion, corresponding to a null rotation or an identity transform, which has undefined rotation axis.
Definition at line 55 of file vnl_quaternion.hxx.
| vnl_quaternion< T >::vnl_quaternion | ( | T | theta_X, |
| T | theta_Y, | ||
| T | theta_Z | ||
| ) |
Construct quaternion from Euler Angles,.
Construct quaternion from Euler Angles.
That is a rotation about the X axis, followed by Y, followed by the Z axis, using a fixed reference frame.
Definition at line 157 of file vnl_quaternion.hxx.
| vnl_quaternion< T >::vnl_quaternion | ( | vnl_vector_fixed< T, 3 > const & | axis, |
| double | angle | ||
| ) |
Construct quaternion from axis and angle of rotation.
Creates a quaternion from the normalized axis direction and the angle of rotation in radians.
Definition at line 66 of file vnl_quaternion.hxx.
|
explicit |
Construct quaternion from 3x3 row-major matrix.
Creates a quaternion from a rotation matrix.
Its orthonormal basis vectors are the matrix rows.
Definition at line 105 of file vnl_quaternion.hxx.
| vnl_quaternion< T >::vnl_quaternion | ( | vnl_vector_fixed< T, 3 > const & | vec | ) |
Construct quaternion from a 3D vector.
Creates a quaternion from a vector.
3D vector is converted into an imaginary quaternion with same (x, y, z) components.
Definition at line 80 of file vnl_quaternion.hxx.
| vnl_quaternion< T >::vnl_quaternion | ( | vnl_vector_fixed< T, 4 > const & | vec | ) |
Construct quaternion from a 4D vector.
Creates a quaternion from a vector.
4D vector is assumed to be a 4-element quaternion, to provide casting between vector and quaternion
Definition at line 92 of file vnl_quaternion.hxx.
|
inline |
Copy constructor – Creates a copy of from quaternion.
Definition at line 97 of file vnl_quaternion.h.
|
inlinedefault |
Free internal array.
|
inlinestaticinherited |
Definition at line 466 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 472 of file vnl_vector_fixed.h.
| double vnl_quaternion< T >::angle | ( | ) | const |
Angle of rotation.
Queries the rotation angle of the quaternion.
Returned angle lies in [0, 2*pi]
Definition at line 196 of file vnl_quaternion.hxx.
|
inherited |
Apply f to each element.
Returns a new vector with the result.
Definition at line 60 of file vnl_vector_fixed.hxx.
|
inherited |
Apply f to each element.
Returns a new vector with the result.
Definition at line 70 of file vnl_vector_fixed.hxx.
|
inlineinherited |
Location of largest value.
Definition at line 401 of file vnl_vector_fixed.h.
|
inlineinherited |
Location of smallest value.
Definition at line 398 of file vnl_vector_fixed.h.
|
inlineinherited |
Explicit conversion to a vnl_vector_ref.
This is a cheap conversion for those functions that have an interface for vnl_vector but not for vnl_vector_fixed. There is also a conversion operator that should work most of the time.
Definition at line 268 of file vnl_vector_fixed.h.
|
inlineinherited |
Explicit conversion to a vnl_vector_ref.
This is a cheap conversion for those functions that have an interface for vnl_vector but not for vnl_vector_fixed. There is also a conversion operator that should work most of the time.
Definition at line 275 of file vnl_vector_fixed.h.
|
inlineinherited |
Convert to a vnl_vector.
Definition at line 359 of file vnl_vector_fixed.h.
|
inlineinherited |
Check that this is finite if not, abort();.
This function does or tests nothing if NDEBUG is defined
Definition at line 419 of file vnl_vector_fixed.h.
|
inlineinherited |
Check that size()==sz if not, abort();.
This function does or tests nothing if NDEBUG is defined
Definition at line 415 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, 3 > vnl_quaternion< T >::axis | ( | ) | const |
Axis of rotation.
Queries the direction of the rotation axis of the quaternion.
A null quaternion will return zero for angle and k direction for axis.
Definition at line 205 of file vnl_quaternion.hxx.
|
inlineinherited |
Iterator pointing to start of data.
Definition at line 290 of file vnl_vector_fixed.h.
|
inlineinherited |
Iterator pointing to start of data.
Definition at line 298 of file vnl_vector_fixed.h.
| vnl_quaternion< T > vnl_quaternion< T >::conjugate | ( | ) | const |
Same real, opposite img part.
Returns the conjugate of given quaternion, having same real and opposite imaginary parts.
Definition at line 255 of file vnl_quaternion.hxx.
|
inlineinherited |
Sets elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 211 of file vnl_vector_fixed.h.
|
inlineinherited |
Copy elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 220 of file vnl_vector_fixed.h.
|
inherited |
Access the contiguous block storing the elements in the vector.
O(1). data_block()[0] is the first element of the vector
Definition at line 50 of file vnl_vector_fixed.hxx.
|
inherited |
Access the contiguous block storing the elements in the vector.
O(1). data_block()[0] is the first element of the vector
Definition at line 55 of file vnl_vector_fixed.hxx.
|
inlinestaticinherited |
Definition at line 508 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 514 of file vnl_vector_fixed.h.
|
inlineinherited |
Return true iff the size is zero.
Definition at line 433 of file vnl_vector_fixed.h.
|
inlineinherited |
Iterator pointing to element beyond end of data.
Definition at line 293 of file vnl_vector_fixed.h.
|
inlineinherited |
Iterator pointing to element beyond end of data.
Definition at line 300 of file vnl_vector_fixed.h.
|
inlineinherited |
Returns a subvector specified by the start index and length. O(n).
Definition at line 352 of file vnl_vector_fixed.h.
|
inlineinherited |
Set all values to v.
Definition at line 202 of file vnl_vector_fixed.h.
|
inherited |
Reverse the order of the elements.
Element i swaps with element size()-1-i
Definition at line 91 of file vnl_vector_fixed.hxx.
|
inherited |
Get value at element i.
Definition at line 156 of file vnl_vector_fixed.hxx.
|
inline |
Copies and returns the imaginary part.
Definition at line 135 of file vnl_quaternion.h.
|
inlineinherited |
Return largest absolute element value.
Definition at line 380 of file vnl_vector_fixed.h.
| vnl_quaternion< T > vnl_quaternion< T >::inverse | ( | ) | const |
Inverse for nonzero quat.
Returns the inverse of given quaternion.
For unit quaternion representing rotation, the inverse is the same as the conjugate.
Definition at line 265 of file vnl_quaternion.hxx.
|
inherited |
Return true if it's finite.
Definition at line 100 of file vnl_vector_fixed.hxx.
|
inherited |
Return true iff all the entries are zero.
Definition at line 112 of file vnl_vector_fixed.hxx.
|
inlineinherited |
Return magnitude (length) of vector.
Definition at line 371 of file vnl_vector_fixed.h.
|
inlineinherited |
Largest value.
Definition at line 395 of file vnl_vector_fixed.h.
|
inlineinherited |
Mean of values in vector.
Definition at line 404 of file vnl_vector_fixed.h.
|
inlineinherited |
Smallest value.
Definition at line 392 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 496 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 502 of file vnl_vector_fixed.h.
|
inlineinherited |
Normalise by dividing through by the magnitude.
Definition at line 383 of file vnl_vector_fixed.h.
|
inlineinherited |
Return sum of absolute values of the elements.
Definition at line 374 of file vnl_vector_fixed.h.
| vnl_quaternion< T > vnl_quaternion< T >::operator * | ( | vnl_quaternion< T > const & | rhs | ) | const |
Returns the product of two quaternions.
Multiplication of two quaternions is not symmetric and has fewer operations than multiplication of orthonormal matrices. If object is rotated by r1, then by r2, then the composed rotation (r2 o r1) is represented by the quaternion (q2 * q1), or by the matrix (m1 * m2). Note that matrix composition is reversed because matrices and vectors are represented row-wise.
Definition at line 282 of file vnl_quaternion.hxx.
|
inlineinherited |
Definition at line 318 of file vnl_vector_fixed.h.
|
inlineinherited |
Cheap conversion to vnl_vector_ref.
Sometimes, such as with templated functions, the compiler cannot use this user-defined conversion. For those cases, use the explicit as_ref() method instead.
Definition at line 281 of file vnl_vector_fixed.h.
|
inherited |
Return reference to the element at specified index.
There are assert style boundary checks - #define NDEBUG to turn them off.
Definition at line 20 of file vnl_vector_fixed.hxx.
|
inherited |
Return reference to the element at specified index.
There are assert style boundary checks - #define NDEBUG to turn them off.
Definition at line 30 of file vnl_vector_fixed.hxx.
|
inlineinherited |
Definition at line 312 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 324 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 330 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 344 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 315 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 327 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 337 of file vnl_vector_fixed.h.
|
inlineinherited |
Definition at line 321 of file vnl_vector_fixed.h.
|
inline |
Overloads assignment operator to copy rhs quaternion into lhs quaternion.
Definition at line 103 of file vnl_quaternion.h.
|
inherited |
Return the i-th element.
Definition at line 40 of file vnl_vector_fixed.hxx.
|
inherited |
Return the i-th element.
Definition at line 45 of file vnl_vector_fixed.hxx.
|
inlineinherited |
Return true if *this == v.
Definition at line 436 of file vnl_vector_fixed.h.
|
inlineinherited |
Return true if *this == v.
Definition at line 445 of file vnl_vector_fixed.h.
|
inherited |
Display the vector.
Output each element separated by a single space.
Definition at line 146 of file vnl_vector_fixed.hxx.
|
inlineinherited |
Put value at given position in vector.
Definition at line 189 of file vnl_vector_fixed.h.
|
inline |
Real component.
Use this accessor to both get and set the component.
Definition at line 116 of file vnl_quaternion.h.
|
inline |
Real component.
Use this accessor to get the component.
Definition at line 129 of file vnl_quaternion.h.
|
inherited |
Read from text stream.
Definition at line 125 of file vnl_vector_fixed.hxx.
|
inline |
Copies and returns the real part.
Definition at line 132 of file vnl_quaternion.h.
|
inlineinherited |
Root Mean Squares of values.
Definition at line 389 of file vnl_vector_fixed.h.
| vnl_vector_fixed< T, 3 > vnl_quaternion< T >::rotate | ( | vnl_vector_fixed< T, 3 > const & | v | ) | const |
Rotate 3D v.
Rotates 3D vector v with source quaternion and stores the rotated vector back into v.
The quaternion must be normalised first.
For speed and greater accuracy, first convert quaternion into an orthonormal matrix, then use matrix multiplication to rotate many vectors.
Definition at line 299 of file vnl_quaternion.hxx.
| vnl_vector_fixed< T, 3 > vnl_quaternion< T >::rotation_euler_angles | ( | ) | const |
Rotation representation in Euler angles.
The angles returned will be [theta_X,theta_Y,theta_Z] where the final rotation is found be first applying theta_X radians about the X axis, then theta_Y about the Y-axis, etc. The axes stay in a fixed reference frame. The quaternion mut be normalised first.
The angles returned will be [theta_X,theta_Y,theta_Z] where the final rotation is found be first applying theta_X radians about the X axis, then theta_Y about the Y-axis, etc. The axes stay in a fixed reference frame.
Definition at line 171 of file vnl_quaternion.hxx.
| vnl_matrix_fixed< T, 3, 3 > vnl_quaternion< T >::rotation_matrix_transpose | ( | ) | const |
3x3 rotation matrix.
Converts a normalized quaternion into a square rotation matrix with dimension dim.
The orthonormal vectors are the rows of the matrix, not its columns
This is the reverse counterpart of constructing a quaternion from a transformation matrix. WARNING this is inconsistent with the quaternion docs and q.rotate()
Definition at line 224 of file vnl_quaternion.hxx.
| vnl_matrix_fixed< T, 4, 4 > vnl_quaternion< T >::rotation_matrix_transpose_4 | ( | ) | const |
4x4 rotation matrix.
Definition at line 246 of file vnl_quaternion.hxx.
|
inlineinherited |
Sets elements to ptr[i].
Note: ptr[i] must be valid for i=0..size()-1
Definition at line 228 of file vnl_vector_fixed.h.
|
inlineinherited |
|
inlineinherited |
Return sum of squares of elements.
Definition at line 368 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 478 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 484 of file vnl_vector_fixed.h.
|
inlinestaticinherited |
Definition at line 490 of file vnl_vector_fixed.h.
|
inlineinherited |
Sum of values in a vector.
Definition at line 407 of file vnl_vector_fixed.h.
|
inlineinherited |
Return sqrt of sum of squares of values of elements.
Definition at line 377 of file vnl_vector_fixed.h.
|
inherited |
Replaces elements with index beginning at start, by values of v. O(n).
Definition at line 80 of file vnl_vector_fixed.hxx.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to both get and set the component.
Definition at line 107 of file vnl_quaternion.h.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to get the component.
Definition at line 120 of file vnl_quaternion.h.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to both get and set the component.
Definition at line 110 of file vnl_quaternion.h.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to get the component.
Definition at line 123 of file vnl_quaternion.h.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to both get and set the component.
Definition at line 113 of file vnl_quaternion.h.
|
inline |
Imaginary component, parallel to axis of rotation.
Use this accessor to get the component.
Definition at line 126 of file vnl_quaternion.h.
|
related |
Definition at line 779 of file vnl_vector_fixed.h.
|
related |
Definition at line 788 of file vnl_vector_fixed.h.
|
related |
Definition at line 797 of file vnl_vector_fixed.h.
|
related |
Definition at line 735 of file vnl_vector_fixed.h.
|
related |
Definition at line 744 of file vnl_vector_fixed.h.
|
related |
Definition at line 753 of file vnl_vector_fixed.h.
|
related |
Definition at line 667 of file vnl_vector_fixed.h.
|
related |
Definition at line 678 of file vnl_vector_fixed.h.
|
related |
Definition at line 690 of file vnl_vector_fixed.h.
|
related |
Definition at line 701 of file vnl_vector_fixed.h.
|
related |
Definition at line 712 of file vnl_vector_fixed.h.
|
related |
Definition at line 724 of file vnl_vector_fixed.h.
|
related |
Multiply a vnl_diag_matrix_fixed by a vnl_vector_fixed. n flops.
Definition at line 337 of file vnl_diag_matrix_fixed.h.
|
related |
Multiply a vnl_vector_fixed by a vnl_diag_matrix_fixed. n flops.
Definition at line 346 of file vnl_diag_matrix_fixed.h.
|
related |
Definition at line 479 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 488 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 573 of file vnl_vector_fixed.h.
|
related |
Definition at line 583 of file vnl_vector_fixed.h.
|
related |
Definition at line 859 of file vnl_vector_fixed.h.
|
related |
Definition at line 868 of file vnl_vector_fixed.h.
|
related |
Definition at line 877 of file vnl_vector_fixed.h.
|
related |
The binary addition operator.
Definition at line 37 of file vnl_linear_operators_3.h.
|
related |
Definition at line 443 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 452 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 510 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 531 of file vnl_vector_fixed.h.
|
related |
Definition at line 541 of file vnl_vector_fixed.h.
|
related |
Definition at line 611 of file vnl_vector_fixed.h.
|
related |
Definition at line 622 of file vnl_vector_fixed.h.
|
related |
Definition at line 631 of file vnl_vector_fixed.h.
|
related |
Definition at line 461 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 470 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 519 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 552 of file vnl_vector_fixed.h.
|
related |
Definition at line 562 of file vnl_vector_fixed.h.
|
related |
Definition at line 639 of file vnl_vector_fixed.h.
|
related |
Definition at line 650 of file vnl_vector_fixed.h.
|
related |
Definition at line 659 of file vnl_vector_fixed.h.
|
related |
Definition at line 497 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 594 of file vnl_vector_fixed.h.
|
related |
Define a complete ordering on vnl_vector_fixed.
This is useful to create a set, or map of vectors.
Definition at line 71 of file vnl_operators.h.
|
related |
operator<<.
Definition at line 188 of file vnl_quaternion.h.
|
related |
Definition at line 676 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 890 of file vnl_vector_fixed.h.
|
related |
Definition at line 833 of file vnl_vector_fixed.h.
|
related |
Definition at line 842 of file vnl_vector_fixed.h.
|
related |
Definition at line 851 of file vnl_vector_fixed.h.
|
related |
operator<<.
Definition at line 176 of file vnl_quaternion.h.
|
related |
Definition at line 685 of file vnl_vector_fixed_ref.h.
|
related |
Definition at line 900 of file vnl_vector_fixed.h.
|
related |
Definition at line 762 of file vnl_vector_fixed.h.
|
related |
Definition at line 771 of file vnl_vector_fixed.h.
|
related |
|
related |
Return complexified version of real fixed vector R.
Definition at line 60 of file vnl_complexify.h.
|
related |
Return complex fixed vector R+j*I from two real fixed vectors R and I.
Definition at line 132 of file vnl_complexify.h.
|
related |
Cross product of two 2-vectors.
Definition at line 25 of file vnl_double_2.h.
|
related |
Cross product of two 2-vectors.
Definition at line 25 of file vnl_float_2.h.
|
related |
Compute the 2-D cross product.
Definition at line 34 of file vnl_cross.h.
|
related |
Compute the 2-D cross product.
Definition at line 44 of file vnl_cross.h.
|
related |
Compute the 2-D cross product.
Definition at line 55 of file vnl_cross.h.
|
related |
Cross product of two 3-vectors.
Definition at line 25 of file vnl_double_3.h.
|
related |
Cross product of two 3-vectors.
Definition at line 25 of file vnl_float_3.h.
|
related |
Compute the 3-D cross product.
Definition at line 79 of file vnl_cross.h.
|
related |
Compute the 3-D cross product.
Definition at line 93 of file vnl_cross.h.
|
related |
Compute the 3-D cross product.
Definition at line 103 of file vnl_cross.h.
|
related |
Vector of imaginary parts of vnl_vector_fixed<std::complex<T>, N >.
Definition at line 49 of file vnl_imag.h.
|
related |
print a vnl_vector_fixed<T>.
|
related |
Vector of real parts of vnl_vector_fixed<std::complex<T>, N >.
Definition at line 49 of file vnl_real.h.
|
related |
Definition at line 806 of file vnl_vector_fixed.h.
|
related |
Definition at line 815 of file vnl_vector_fixed.h.
|
related |
Definition at line 824 of file vnl_vector_fixed.h.
|
related |
Binary load vnl_vector_fixed from stream.
|
related |
Binary save vnl_vector_fixed to stream.
|
related |
Print human readable summary of object to a stream.
|
related |
XML save vnl_quaternion to stream.
|
related |
XML save vnl_vector_fixed to stream.
|
related |
XML save vnl_quaternion as a 2-level tree to stream.
|
related |
XML save vnl_vector_fixed as a 2-level tree to stream.
|
protectedinherited |
Definition at line 90 of file vnl_vector_fixed.h.
1.8.15