#include <inverse.h>
Public Types | |
enum | { array_size = ExprT::array_size } |
Record result size as an enum. More... | |
enum | { W = order_type::W, X = order_type::X, Y = order_type::Y, Z = order_type::Z } |
Localize the ordering as an enum. More... | |
typedef arg_traits::const_reference | arg_reference |
typedef ExprTraits< ExprT > | arg_traits |
typedef cml::et::not_assignable_tag | assignable_tag |
typedef unary_expression | expr_ary |
typedef expr_type | expr_const_reference |
typedef expr_traits::const_reference | expr_reference |
typedef ExprTraits < subexpression_type > | expr_traits |
typedef QuaternionInverseOp < ExprT > | expr_type |
typedef vector_type::subvector_type | imaginary_type |
typedef result_type::order_type | order_type |
typedef quaternion_result_tag | result_tag |
typedef expr_traits::result_type | result_type |
typedef subexpression_type::size_tag | size_tag |
typedef et::ConjugateOp< ExprT > | subexpression_type |
typedef result_type::temporary_type | temporary_type |
typedef subexpression_type::value_type | value_type |
typedef result_type::vector_type | vector_type |
Public Member Functions | |
expr_reference | expression () const |
Return reference to contained expression. | |
imaginary_type | imaginary () const |
Return the vector part of the expression. | |
value_type | length () const |
Return the quaternion length. | |
value_type | length_squared () const |
Return square of the quaternion length. | |
value_type | norm () const |
Return the Cayley norm of the expression. | |
temporary_type | normalize () const |
Return the result as a normalized quaternion. | |
value_type | operator[] (size_t i) const |
Compute inverse result at index i. | |
QuaternionInverseOp (const expr_type &e) | |
Copy constructor. | |
QuaternionInverseOp (arg_reference arg) | |
Construct from an input expression. | |
value_type | real () const |
Return the real part of the expression. | |
size_t | size () const |
Return size of this expression (same as argument's size). | |
Protected Attributes | |
subexpression_type | m_expr |
value_type | m_norm |
Private Member Functions | |
expr_type & | operator= (const expr_type &) |
This internally creates a ConjugateOp node to process the conjugate of the given expression. The values produced by the ConjugateOp are then divided by the Cayley norm of the expression on the fly.
Definition at line 29 of file inverse.h.
typedef arg_traits::const_reference cml::et::QuaternionInverseOp< ExprT >::arg_reference |
typedef ExprTraits<ExprT> cml::et::QuaternionInverseOp< ExprT >::arg_traits |
typedef cml::et::not_assignable_tag cml::et::QuaternionInverseOp< ExprT >::assignable_tag |
typedef unary_expression cml::et::QuaternionInverseOp< ExprT >::expr_ary |
typedef expr_type cml::et::QuaternionInverseOp< ExprT >::expr_const_reference |
typedef expr_traits::const_reference cml::et::QuaternionInverseOp< ExprT >::expr_reference |
typedef ExprTraits<subexpression_type> cml::et::QuaternionInverseOp< ExprT >::expr_traits |
typedef QuaternionInverseOp<ExprT> cml::et::QuaternionInverseOp< ExprT >::expr_type |
typedef vector_type::subvector_type cml::et::QuaternionInverseOp< ExprT >::imaginary_type |
typedef result_type::order_type cml::et::QuaternionInverseOp< ExprT >::order_type |
typedef quaternion_result_tag cml::et::QuaternionInverseOp< ExprT >::result_tag |
typedef expr_traits::result_type cml::et::QuaternionInverseOp< ExprT >::result_type |
typedef subexpression_type::size_tag cml::et::QuaternionInverseOp< ExprT >::size_tag |
typedef et::ConjugateOp<ExprT> cml::et::QuaternionInverseOp< ExprT >::subexpression_type |
typedef result_type::temporary_type cml::et::QuaternionInverseOp< ExprT >::temporary_type |
typedef subexpression_type::value_type cml::et::QuaternionInverseOp< ExprT >::value_type |
typedef result_type::vector_type cml::et::QuaternionInverseOp< ExprT >::vector_type |
anonymous enum |
anonymous enum |
cml::et::QuaternionInverseOp< ExprT >::QuaternionInverseOp | ( | arg_reference | arg | ) | [inline, explicit] |
cml::et::QuaternionInverseOp< ExprT >::QuaternionInverseOp | ( | const expr_type & | e | ) | [inline] |
expr_reference cml::et::QuaternionInverseOp< ExprT >::expression | ( | ) | const [inline] |
Return reference to contained expression.
Definition at line 144 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::m_expr.
imaginary_type cml::et::QuaternionInverseOp< ExprT >::imaginary | ( | ) | const [inline] |
Return the vector part of the expression.
Definition at line 100 of file inverse.h.
References cml::et::ConjugateOp< ExprT >::imaginary(), cml::et::QuaternionInverseOp< ExprT >::m_expr, and cml::et::QuaternionInverseOp< ExprT >::m_norm.
value_type cml::et::QuaternionInverseOp< ExprT >::length | ( | ) | const [inline] |
Return the quaternion length.
Definition at line 117 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::length_squared().
value_type cml::et::QuaternionInverseOp< ExprT >::length_squared | ( | ) | const [inline] |
Return square of the quaternion length.
Definition at line 110 of file inverse.h.
References cml::dot().
Referenced by cml::et::QuaternionInverseOp< ExprT >::length(), and cml::et::QuaternionInverseOp< ExprT >::norm().
value_type cml::et::QuaternionInverseOp< ExprT >::norm | ( | ) | const [inline] |
Return the Cayley norm of the expression.
Definition at line 105 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::length_squared().
temporary_type cml::et::QuaternionInverseOp< ExprT >::normalize | ( | ) | const [inline] |
expr_type& cml::et::QuaternionInverseOp< ExprT >::operator= | ( | const expr_type & | ) | [private] |
value_type cml::et::QuaternionInverseOp< ExprT >::operator[] | ( | size_t | i | ) | const [inline] |
Compute inverse result at index i.
The inverse of a quaternion p is ~p/norm(p).
Definition at line 131 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::m_expr, and cml::et::QuaternionInverseOp< ExprT >::m_norm.
value_type cml::et::QuaternionInverseOp< ExprT >::real | ( | ) | const [inline] |
Return the real part of the expression.
Definition at line 92 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::m_expr, cml::et::QuaternionInverseOp< ExprT >::m_norm, and cml::et::ConjugateOp< ExprT >::real().
size_t cml::et::QuaternionInverseOp< ExprT >::size | ( | ) | const [inline] |
Return size of this expression (same as argument's size).
Definition at line 139 of file inverse.h.
References cml::et::QuaternionInverseOp< ExprT >::m_expr, and cml::et::ConjugateOp< ExprT >::size().
Referenced by cml::et::ExprTraits< QuaternionInverseOp< ExprT > >::size().
subexpression_type cml::et::QuaternionInverseOp< ExprT >::m_expr [protected] |
Definition at line 161 of file inverse.h.
Referenced by cml::et::QuaternionInverseOp< ExprT >::expression(), cml::et::QuaternionInverseOp< ExprT >::imaginary(), cml::et::QuaternionInverseOp< ExprT >::operator[](), cml::et::QuaternionInverseOp< ExprT >::real(), and cml::et::QuaternionInverseOp< ExprT >::size().
value_type cml::et::QuaternionInverseOp< ExprT >::m_norm [protected] |
Definition at line 162 of file inverse.h.
Referenced by cml::et::QuaternionInverseOp< ExprT >::imaginary(), cml::et::QuaternionInverseOp< ExprT >::operator[](), and cml::et::QuaternionInverseOp< ExprT >::real().