Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit a51a1e8cbd.
PrevUpHomeNext

Quaternion Value Operations

real and unreal
template<typename T> T              real(quaternion<T> const & q);
template<typename T> quaternion<T>  unreal(quaternion<T> const & q);

These return q.real() and q.unreal() respectively.

conj
template<typename T> quaternion<T>  conj(quaternion<T> const & q);

This returns the conjugate of the quaternion.

sup

template<typename T> T sup(quaternion<T> const & q);

This return the sup norm (the greatest among abs(q.R_component_1())...abs(q.R_component_4())) of the quaternion.

l1
template<typename T> T  l1(quaternion<T> const & q);

This return the l1 norm (abs(q.R_component_1())+...+abs(q.R_component_4())) of the quaternion.

abs
template<typename T> T  abs(quaternion<T> const & q);

This return the magnitude (Euclidean norm) of the quaternion.

norm
template<typename T> T  norm(quaternion<T>const  & q);

This return the (Cayley) norm of the quaternion. The term "norm" might be confusing, as most people associate it with the Euclidian norm (and quadratic functionals). For this version of (the mathematical objects known as) quaternions, the Euclidean norm (also known as magnitude) is the square root of the Cayley norm.


PrevUpHomeNext