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

"Transpose" the given matrix expression. More...

#include <matrix_transpose.h>

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

Collaboration graph
[legend]

List of all members.

Public Types

enum  { array_rows = result_type::array_rows, array_cols = result_type::array_cols }
 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 MatrixTransposeOp< ExprT > expr_type
typedef matrix_result_tag result_tag
typedef
expr_traits::result_type::transposed_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

size_t cols () const
 Return result cols.
expr_reference expression () const
 Return reference to contained expression.
 MatrixTransposeOp (const expr_type &e)
 Copy constructor.
 MatrixTransposeOp (const ExprT &expr)
 Construct from the subexpression to store.
value_type operator() (size_t i, size_t j) const
 Compute value at index i of the result matrix.
size_t rows () const
 Return result rows.
matrix_size size () const
 Return the expression size as a pair.

Protected Attributes

expr_reference m_expr

Private Member Functions

expr_typeoperator= (const expr_type &)


Detailed Description

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

"Transpose" the given matrix expression.

This does nothing more than change the result type of the expression into one with the opposite orientation (i.e. row->col, col->row).

Definition at line 36 of file matrix_transpose.h.


Member Typedef Documentation

Definition at line 65 of file matrix_transpose.h.

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

Definition at line 43 of file matrix_transpose.h.

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

Definition at line 46 of file matrix_transpose.h.

Definition at line 56 of file matrix_transpose.h.

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

Definition at line 53 of file matrix_transpose.h.

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

Definition at line 40 of file matrix_transpose.h.

template<class ExprT>
typedef matrix_result_tag cml::et::MatrixTransposeOp< ExprT >::result_tag

Definition at line 49 of file matrix_transpose.h.

template<class ExprT>
typedef expr_traits::result_type::transposed_type cml::et::MatrixTransposeOp< ExprT >::result_type

Definition at line 59 of file matrix_transpose.h.

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

Definition at line 50 of file matrix_transpose.h.

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

Definition at line 62 of file matrix_transpose.h.

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

Definition at line 48 of file matrix_transpose.h.


Member Enumeration Documentation

template<class ExprT>
anonymous enum

Record result size as an enum.

Enumerator:
array_rows 
array_cols 

Definition at line 71 of file matrix_transpose.h.


Constructor & Destructor Documentation

template<class ExprT>
cml::et::MatrixTransposeOp< ExprT >::MatrixTransposeOp ( const ExprT &  expr  )  [inline, explicit]

Construct from the subexpression to store.

Definition at line 118 of file matrix_transpose.h.

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

Copy constructor.

Definition at line 121 of file matrix_transpose.h.


Member Function Documentation

template<class ExprT>
size_t cml::et::MatrixTransposeOp< ExprT >::cols (  )  const [inline]

Return result cols.

The tranpose has the same number of columns as the original has rows.

Definition at line 98 of file matrix_transpose.h.

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

Referenced by cml::et::ExprTraits< MatrixTransposeOp< ExprT > >::cols(), and cml::et::MatrixTransposeOp< ExprT >::size().

Here is the caller graph for this function:

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

Return reference to contained expression.

Definition at line 103 of file matrix_transpose.h.

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

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

Compute value at index i of the result matrix.

Element (i,j) of the transpose is element (j,i) of the original expression.

Definition at line 110 of file matrix_transpose.h.

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

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

template<class ExprT>
size_t cml::et::MatrixTransposeOp< ExprT >::rows (  )  const [inline]

Return result rows.

The tranpose has the same number of rows as the original has columns.

Definition at line 89 of file matrix_transpose.h.

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

Referenced by cml::et::ExprTraits< MatrixTransposeOp< ExprT > >::rows(), and cml::et::MatrixTransposeOp< ExprT >::size().

Here is the caller graph for this function:

template<class ExprT>
matrix_size cml::et::MatrixTransposeOp< ExprT >::size (  )  const [inline]

Return the expression size as a pair.

Definition at line 80 of file matrix_transpose.h.

References cml::et::MatrixTransposeOp< ExprT >::cols(), and cml::et::MatrixTransposeOp< ExprT >::rows().

Referenced by cml::et::ExprTraits< MatrixTransposeOp< ExprT > >::size().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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