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

A placeholder for a vector expression in an expression tree. More...

#include <vector_expr.h>

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

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 ExprT::expr_ary expr_ary
typedef expr_type expr_const_reference
typedef
expr_traits::const_reference 
expr_reference
typedef ExprTraits< ExprT > expr_traits
typedef VectorXpr< ExprT > 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 ExprT::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 subexpression's size).
 VectorXpr (const expr_type &e)
 Copy constructor.
 VectorXpr (expr_reference expr)
 Construct from the subexpression to store.

Protected Attributes

expr_reference m_expr

Private Member Functions

expr_typeoperator= (const expr_type &)


Detailed Description

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

A placeholder for a vector expression in an expression tree.

Definition at line 37 of file vector_expr.h.


Member Typedef Documentation

template<class ExprT>
typedef cml::et::not_assignable_tag cml::et::VectorXpr< ExprT >::assignable_tag

Definition at line 63 of file vector_expr.h.

template<class ExprT>
typedef ExprT::expr_ary cml::et::VectorXpr< ExprT >::expr_ary

Definition at line 44 of file vector_expr.h.

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

Definition at line 47 of file vector_expr.h.

template<class ExprT>
typedef expr_traits::const_reference cml::et::VectorXpr< ExprT >::expr_reference

Definition at line 57 of file vector_expr.h.

template<class ExprT>
typedef ExprTraits<ExprT> cml::et::VectorXpr< ExprT >::expr_traits

Definition at line 54 of file vector_expr.h.

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

Definition at line 41 of file vector_expr.h.

template<class ExprT>
typedef vector_result_tag cml::et::VectorXpr< ExprT >::result_tag

Definition at line 50 of file vector_expr.h.

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

Definition at line 60 of file vector_expr.h.

template<class ExprT>
typedef ExprT::size_tag cml::et::VectorXpr< ExprT >::size_tag

Definition at line 51 of file vector_expr.h.

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

Definition at line 66 of file vector_expr.h.

template<class ExprT>
typedef ExprT::value_type cml::et::VectorXpr< ExprT >::value_type

Definition at line 49 of file vector_expr.h.


Member Enumeration Documentation

template<class ExprT>
anonymous enum

Record result size as an enum.

Enumerator:
array_size 

Definition at line 72 of file vector_expr.h.


Constructor & Destructor Documentation

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

Construct from the subexpression to store.

Definition at line 112 of file vector_expr.h.

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

Copy constructor.

Definition at line 115 of file vector_expr.h.


Member Function Documentation

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

Return reference to contained expression.

Definition at line 106 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

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

Return the length.

Definition at line 83 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

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

Return square of the length.

Definition at line 78 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

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

Return the result as a normalized vector.

Definition at line 88 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

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

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

Compute value at index i of the result vector.

Definition at line 93 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

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

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

Definition at line 101 of file vector_expr.h.

References cml::et::VectorXpr< ExprT >::m_expr.

Referenced by cml::operator*(), and cml::et::ExprTraits< VectorXpr< ExprT > >::size().

Here is the caller graph for this function:


Member Data Documentation

template<class ExprT>
expr_reference cml::et::VectorXpr< ExprT >::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