00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef MTL_MAT_MAT_PLUS_EXPR_INCLUDE
00013 #define MTL_MAT_MAT_PLUS_EXPR_INCLUDE
00014
00015 #include <boost/numeric/mtl/matrix/mat_mat_op_expr.hpp>
00016 #include <boost/numeric/mtl/operation/sfunctor.hpp>
00017
00018 namespace mtl { namespace matrix {
00019
00020 template <typename E1, typename E2>
00021 struct mat_mat_plus_expr
00022 : public mat_mat_op_expr< E1, E2, mtl::sfunctor::plus<typename E1::value_type, typename E2::value_type> >,
00023 public mat_expr< mat_mat_plus_expr<E1, E2> >
00024 {
00025 typedef mat_mat_op_expr< E1, E2, mtl::sfunctor::plus<typename E1::value_type, typename E2::value_type> > op_base;
00026 typedef mat_expr< mat_mat_plus_expr<E1, E2> > crtp_base;
00027 typedef E1 first_argument_type ;
00028 typedef E2 second_argument_type ;
00029
00030 mat_mat_plus_expr( E1 const& v1, E2 const& v2 )
00031 : op_base( v1, v2 ), crtp_base(*this), first(v1), second(v2)
00032 {}
00033
00034 first_argument_type const& first ;
00035 second_argument_type const& second ;
00036 };
00037
00038
00039
00040 template <typename E1, typename E2>
00041 struct dmat_dmat_plus_expr
00042 : public mat_mat_op_expr< E1, E2, mtl::sfunctor::plus<typename E1::value_type, typename E2::value_type> >
00043 {
00044 typedef mat_mat_op_expr< E1, E2, mtl::sfunctor::plus<typename E1::value_type, typename E2::value_type> > base;
00045 dmat_dmat_plus_expr( E1 const& v1, E2 const& v2 )
00046 : base( v1, v2 )
00047 {}
00048 };
00049
00050
00051
00052 }}
00053
00054 #endif // MTL_MAT_MAT_PLUS_EXPR_INCLUDE