cml::et::UnaryVectorOp< ExprT, OpT > Class Template Reference

A unary vector expression. More...

#include <vector_expr.h>

Collaboration diagram for cml::et::UnaryVectorOp< ExprT, OpT >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { array_size = ExprT::array_size }
 Record result size as an enum. More...
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< ExprT > expr_traits
typedef UnaryVectorOp< ExprT, OpT > expr_type
typedef vector_result_tag result_tag
typedef expr_traits::result_type result_type
typedef ExprT::size_tag size_tag
typedef result_type::temporary_type temporary_type
typedef OpT::value_type value_type

Public Member Functions

expr_reference expression () const
 Return reference to contained expression.
value_type length () const
 Return the length.
value_type length_squared () const
 Return square of the length.
result_type normalize () const
 Return the result as a normalized vector.
value_type operator[] (size_t i) const
 Compute value at index i of the result vector.
size_t size () const
 Return size of this expression (same as argument's size).
 UnaryVectorOp (const expr_type &e)
 Copy constructor.
 UnaryVectorOp (expr_reference expr)
 Construct from the subexpression.

Protected Attributes

expr_reference m_expr

Private Member Functions

expr_typeoperator= (const expr_type &)


Detailed Description

template<class ExprT, class OpT>
class cml::et::UnaryVectorOp< ExprT, OpT >

A unary vector expression.

The operator's operator() method must take exactly one argument.

Definition at line 153 of file vector_expr.h.


Member Typedef Documentation

template<class ExprT , class OpT >
typedef cml::et::not_assignable_tag cml::et::UnaryVectorOp< ExprT, OpT >::assignable_tag

Definition at line 179 of file vector_expr.h.

template<class ExprT , class OpT >
typedef unary_expression cml::et::UnaryVectorOp< ExprT, OpT >::expr_ary

Definition at line 160 of file vector_expr.h.

template<class ExprT , class OpT >
typedef expr_type cml::et::UnaryVectorOp< ExprT, OpT >::expr_const_reference

Definition at line 163 of file vector_expr.h.

template<class ExprT , class OpT >
typedef expr_traits::const_reference cml::et::UnaryVectorOp< ExprT, OpT >::expr_reference

Definition at line 173 of file vector_expr.h.

template<class ExprT , class OpT >
typedef ExprTraits<ExprT> cml::et::UnaryVectorOp< ExprT, OpT >::expr_traits

Definition at line 170 of file vector_expr.h.

template<class ExprT , class OpT >
typedef UnaryVectorOp<ExprT,OpT> cml::et::UnaryVectorOp< ExprT, OpT >::expr_type

Definition at line 157 of file vector_expr.h.

template<class ExprT , class OpT >
typedef vector_result_tag cml::et::UnaryVectorOp< ExprT, OpT >::result_tag

Definition at line 166 of file vector_expr.h.

template<class ExprT , class OpT >
typedef expr_traits::result_type cml::et::UnaryVectorOp< ExprT, OpT >::result_type

Definition at line 176 of file vector_expr.h.

template<class ExprT , class OpT >
typedef ExprT::size_tag cml::et::UnaryVectorOp< ExprT, OpT >::size_tag

Definition at line 167 of file vector_expr.h.

template<class ExprT , class OpT >
typedef result_type::temporary_type cml::et::UnaryVectorOp< ExprT, OpT >::temporary_type

Definition at line 182 of file vector_expr.h.

template<class ExprT , class OpT >
typedef OpT::value_type cml::et::UnaryVectorOp< ExprT, OpT >::value_type

Definition at line 165 of file vector_expr.h.


Member Enumeration Documentation

template<class ExprT , class OpT >
anonymous enum

Record result size as an enum.

Enumerator:
array_size 

Definition at line 188 of file vector_expr.h.


Constructor & Destructor Documentation

template<class ExprT , class OpT >
cml::et::UnaryVectorOp< ExprT, OpT >::UnaryVectorOp ( expr_reference  expr  )  [inline, explicit]

Construct from the subexpression.

Definition at line 235 of file vector_expr.h.

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

Copy constructor.

Definition at line 238 of file vector_expr.h.


Member Function Documentation

template<class ExprT , class OpT >
expr_reference cml::et::UnaryVectorOp< ExprT, OpT >::expression (  )  const [inline]

Return reference to contained expression.

Definition at line 229 of file vector_expr.h.

References cml::et::UnaryVectorOp< ExprT, OpT >::m_expr.

template<class ExprT , class OpT >
value_type cml::et::UnaryVectorOp< ExprT, OpT >::length (  )  const [inline]

Return the length.

Definition at line 201 of file vector_expr.h.

References cml::et::UnaryVectorOp< ExprT, OpT >::length_squared().

Here is the call graph for this function:

template<class ExprT , class OpT >
value_type cml::et::UnaryVectorOp< ExprT, OpT >::length_squared (  )  const [inline]

Return square of the length.

Definition at line 194 of file vector_expr.h.

References cml::dot().

Referenced by cml::et::UnaryVectorOp< ExprT, OpT >::length().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class ExprT , class OpT >
result_type cml::et::UnaryVectorOp< ExprT, OpT >::normalize (  )  const [inline]

Return the result as a normalized vector.

Definition at line 206 of file vector_expr.h.

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

template<class ExprT , class OpT >
value_type cml::et::UnaryVectorOp< ExprT, OpT >::operator[] ( size_t  i  )  const [inline]

Compute value at index i of the result vector.

Definition at line 212 of file vector_expr.h.

References cml::et::UnaryVectorOp< ExprT, OpT >::m_expr.

template<class ExprT , class OpT >
size_t cml::et::UnaryVectorOp< ExprT, OpT >::size (  )  const [inline]

Return size of this expression (same as argument's size).

Definition at line 224 of file vector_expr.h.

References cml::et::UnaryVectorOp< ExprT, OpT >::m_expr.

Referenced by cml::et::ExprTraits< UnaryVectorOp< ExprT, OpT > >::size().

Here is the caller graph for this function:


Member Data Documentation

template<class ExprT , class OpT >
expr_reference cml::et::UnaryVectorOp< ExprT, OpT >::m_expr [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