cml::et::BinaryMatrixOp< LeftT, RightT, OpT > Class Template Reference

A binary matrix expression. More...

#include <matrix_expr.h>

Collaboration diagram for cml::et::BinaryMatrixOp< LeftT, RightT, OpT >:

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 (if applicable). More...
typedef cml::et::not_assignable_tag assignable_tag
typedef GetCheckedSize< LeftT,
RightT, size_tag
checked_size
typedef expr_type expr_const_reference
typedef BinaryMatrixOp< LeftT,
RightT, OpT > 
expr_type
typedef
left_traits::const_reference 
left_reference
typedef left_traits::result_type left_result
typedef ExprTraits< LeftT > left_traits
typedef matrix_result_tag result_tag
typedef MatrixPromote
< left_result, right_result >
::type 
result_type
typedef
right_traits::const_reference 
right_reference
typedef right_traits::result_type right_result
typedef ExprTraits< RightT > right_traits
typedef result_type::size_tag size_tag
typedef result_type::temporary_type temporary_type
typedef OpT::value_type value_type

Public Member Functions

 BinaryMatrixOp (const expr_type &e)
 Copy constructor.
 BinaryMatrixOp (left_reference left, right_reference right)
 Construct from the two subexpressions.
size_t cols () const
 Return number of cols in the result.
value_type operator() (size_t i, size_t j) const
 Compute value at index i,j of the result matrix.
size_t rows () const
 Return number of rows in the result.
matrix_size size () const
 Return the expression size as a pair.

Protected Attributes

left_reference m_left
right_reference m_right

Private Member Functions

expr_typeoperator= (const expr_type &)

Private Attributes

checked_size::check_type _dummy


Detailed Description

template<class LeftT, class RightT, class OpT>
class cml::et::BinaryMatrixOp< LeftT, RightT, OpT >

A binary matrix expression.

Definition at line 283 of file matrix_expr.h.


Member Typedef Documentation

template<class LeftT , class RightT , class OpT >
typedef cml::et::not_assignable_tag cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::assignable_tag

Definition at line 298 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef GetCheckedSize<LeftT,RightT,size_tag> cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::checked_size

Definition at line 318 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef expr_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::expr_const_reference

Definition at line 292 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef BinaryMatrixOp<LeftT,RightT,OpT> cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::expr_type

Definition at line 287 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef left_traits::const_reference cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::left_reference

Definition at line 305 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef left_traits::result_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::left_result

Definition at line 309 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef ExprTraits<LeftT> cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::left_traits

Definition at line 301 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef matrix_result_tag cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::result_tag

Definition at line 295 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef MatrixPromote<left_result,right_result>::type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::result_type

Definition at line 311 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef right_traits::const_reference cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::right_reference

Definition at line 306 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef right_traits::result_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::right_result

Definition at line 310 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef ExprTraits<RightT> cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::right_traits

Definition at line 302 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::size_tag cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::size_tag

Definition at line 312 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef result_type::temporary_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::temporary_type

Definition at line 315 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
typedef OpT::value_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::value_type

Definition at line 294 of file matrix_expr.h.


Member Enumeration Documentation

template<class LeftT , class RightT , class OpT >
anonymous enum

Record result size as an enum (if applicable).

CheckExprSizes<> ensures that this works as expected.

Enumerator:
array_rows 
array_cols 

Definition at line 327 of file matrix_expr.h.


Constructor & Destructor Documentation

template<class LeftT , class RightT , class OpT >
cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::BinaryMatrixOp ( left_reference  left,
right_reference  right 
) [inline, explicit]

Construct from the two subexpressions.

Exceptions:
std::invalid_argument if the subexpression sizes don't match.

Definition at line 387 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::BinaryMatrixOp ( const expr_type e  )  [inline]

Copy constructor.

Definition at line 391 of file matrix_expr.h.


Member Function Documentation

template<class LeftT , class RightT , class OpT >
size_t cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::cols (  )  const [inline]

Return number of cols in the result.

Note:
Because this calls size() internally, calling both rows() and cols() with CML_CHECK_MATRIX_EXPR_SIZES defined will cause the size checking code to be executed twice.

Definition at line 360 of file matrix_expr.h.

References cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_right, and cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::size().

Referenced by cml::et::ExprTraits< BinaryMatrixOp< LeftT, RightT, OpT > >::cols().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class LeftT , class RightT , class OpT >
value_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::operator() ( size_t  i,
size_t  j 
) const [inline]

Compute value at index i,j of the result matrix.

Definition at line 369 of file matrix_expr.h.

References cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_left, and cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_right.

template<class LeftT , class RightT , class OpT >
expr_type& cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::operator= ( const expr_type  )  [private]

template<class LeftT , class RightT , class OpT >
size_t cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::rows (  )  const [inline]

Return number of rows in the result.

Note:
Because this calls size() internally, calling both rows() and cols() with CML_CHECK_MATRIX_EXPR_SIZES defined will cause the size checking code to be executed twice.

Definition at line 346 of file matrix_expr.h.

References cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_left, and cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::size().

Referenced by cml::et::ExprTraits< BinaryMatrixOp< LeftT, RightT, OpT > >::rows().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class LeftT , class RightT , class OpT >
matrix_size cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::size (  )  const [inline]


Member Data Documentation

template<class LeftT , class RightT , class OpT >
checked_size::check_type cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::_dummy [private]

Definition at line 404 of file matrix_expr.h.

template<class LeftT , class RightT , class OpT >
left_reference cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_left [protected]

template<class LeftT , class RightT , class OpT >
right_reference cml::et::BinaryMatrixOp< LeftT, RightT, OpT >::m_right [protected]


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

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