cml::et::QuaternionInverseOp< ExprT > Class Template Reference

An expression node for inverting a quaternion. More...

#include <inverse.h>

Collaboration diagram for cml::et::QuaternionInverseOp< ExprT >:

List of all members.

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_typeoperator= (const expr_type &)


Detailed Description

template<class ExprT>
class cml::et::QuaternionInverseOp< ExprT >

An expression node for inverting a quaternion.

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.


Member Typedef Documentation

Definition at line 47 of file inverse.h.

template<class ExprT >
typedef ExprTraits<ExprT> cml::et::QuaternionInverseOp< ExprT >::arg_traits

Definition at line 46 of file inverse.h.

Definition at line 60 of file inverse.h.

template<class ExprT >
typedef unary_expression cml::et::QuaternionInverseOp< ExprT >::expr_ary

Definition at line 36 of file inverse.h.

template<class ExprT >
typedef expr_type cml::et::QuaternionInverseOp< ExprT >::expr_const_reference

Definition at line 39 of file inverse.h.

Definition at line 54 of file inverse.h.

template<class ExprT >
typedef ExprTraits<subexpression_type> cml::et::QuaternionInverseOp< ExprT >::expr_traits

Definition at line 43 of file inverse.h.

template<class ExprT >
typedef QuaternionInverseOp<ExprT> cml::et::QuaternionInverseOp< ExprT >::expr_type

Definition at line 33 of file inverse.h.

template<class ExprT >
typedef vector_type::subvector_type cml::et::QuaternionInverseOp< ExprT >::imaginary_type

Definition at line 69 of file inverse.h.

template<class ExprT >
typedef result_type::order_type cml::et::QuaternionInverseOp< ExprT >::order_type

Definition at line 72 of file inverse.h.

template<class ExprT >
typedef quaternion_result_tag cml::et::QuaternionInverseOp< ExprT >::result_tag

Definition at line 50 of file inverse.h.

template<class ExprT >
typedef expr_traits::result_type cml::et::QuaternionInverseOp< ExprT >::result_type

Definition at line 57 of file inverse.h.

template<class ExprT >
typedef subexpression_type::size_tag cml::et::QuaternionInverseOp< ExprT >::size_tag

Definition at line 51 of file inverse.h.

template<class ExprT >
typedef et::ConjugateOp<ExprT> cml::et::QuaternionInverseOp< ExprT >::subexpression_type

Definition at line 42 of file inverse.h.

template<class ExprT >
typedef result_type::temporary_type cml::et::QuaternionInverseOp< ExprT >::temporary_type

Definition at line 63 of file inverse.h.

Definition at line 49 of file inverse.h.

template<class ExprT >
typedef result_type::vector_type cml::et::QuaternionInverseOp< ExprT >::vector_type

Definition at line 66 of file inverse.h.


Member Enumeration Documentation

template<class ExprT >
anonymous enum

Record result size as an enum.

Enumerator:
array_size 

Definition at line 78 of file inverse.h.

template<class ExprT >
anonymous enum

Localize the ordering as an enum.

Enumerator:
W 
X 
Y 
Z 

Definition at line 81 of file inverse.h.


Constructor & Destructor Documentation

template<class ExprT >
cml::et::QuaternionInverseOp< ExprT >::QuaternionInverseOp ( arg_reference  arg  )  [inline, explicit]

Construct from an input expression.

Definition at line 150 of file inverse.h.

template<class ExprT >
cml::et::QuaternionInverseOp< ExprT >::QuaternionInverseOp ( const expr_type e  )  [inline]

Copy constructor.

Definition at line 155 of file inverse.h.


Member Function Documentation

template<class ExprT >
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.

template<class ExprT >
imaginary_type cml::et::QuaternionInverseOp< ExprT >::imaginary (  )  const [inline]

Return the vector part of the expression.

Todo:
This could be returned as a VectorXpr also.

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.

Here is the call graph for this function:

template<class ExprT >
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().

Here is the call graph for this function:

template<class ExprT >
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().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ExprT >
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().

Here is the call graph for this function:

template<class ExprT >
temporary_type cml::et::QuaternionInverseOp< ExprT >::normalize (  )  const [inline]

Return the result as a normalized quaternion.

Definition at line 122 of file inverse.h.

template<class ExprT >
expr_type& cml::et::QuaternionInverseOp< ExprT >::operator= ( const expr_type  )  [private]

template<class ExprT >
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.

template<class ExprT >
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().

Here is the call graph for this function:

template<class ExprT >
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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<class ExprT >
subexpression_type cml::et::QuaternionInverseOp< ExprT >::m_expr [protected]

template<class ExprT >
value_type cml::et::QuaternionInverseOp< ExprT >::m_norm [protected]


The documentation for this class was generated from the following file:

Generated on Sat Jul 18 19:35:39 2009 for CML 1.0 by  doxygen 1.5.9