All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMatScalarMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSCALARMULTEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_DMATSCALARMULTEXPR_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
37 #include <blaze/math/Intrinsics.h>
54 #include <blaze/util/Assert.h>
58 #include <blaze/util/EnableIf.h>
59 #include <blaze/util/InvalidType.h>
61 #include <blaze/util/SelectType.h>
62 #include <blaze/util/Types.h>
65 
66 
67 namespace blaze {
68 
69 //=================================================================================================
70 //
71 // CLASS DMATSCALARMULTEXPR
72 //
73 //=================================================================================================
74 
75 //*************************************************************************************************
82 template< typename MT // Type of the left-hand side dense matrix
83  , typename ST // Type of the right-hand side scalar value
84  , bool SO > // Storage order
85 class DMatScalarMultExpr : public DenseMatrix< DMatScalarMultExpr<MT,ST,SO>, SO >
86  , private MatScalarMultExpr
87  , private Computation
88 {
89  private:
90  //**Type definitions****************************************************************************
91  typedef typename MT::ResultType RT;
92  typedef typename MT::ReturnType RN;
93  typedef typename MT::ElementType ET;
94  typedef typename MT::CompositeType CT;
95  //**********************************************************************************************
96 
97  //**Return type evaluation**********************************************************************
99 
104  enum { returnExpr = !IsTemporary<RN>::value };
105 
108  //**********************************************************************************************
109 
110  //**Evaluation strategy*************************************************************************
112 
118  enum { useAssign = RequiresEvaluation<MT>::value };
119 
121 
122  template< typename MT2 >
123  struct UseAssign {
124  enum { value = useAssign };
125  };
127  //**********************************************************************************************
128 
129  public:
130  //**Type definitions****************************************************************************
133  typedef typename ResultType::OppositeType OppositeType;
134  typedef typename ResultType::TransposeType TransposeType;
135  typedef typename ResultType::ElementType ElementType;
137 
140 
143 
145  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type LeftOperand;
146 
148  typedef ST RightOperand;
149  //**********************************************************************************************
150 
151  //**Compilation flags***************************************************************************
153  enum { vectorizable = MT::vectorizable &&
156  //**********************************************************************************************
157 
158  //**Constructor*********************************************************************************
164  explicit inline DMatScalarMultExpr( const MT& matrix, ST scalar )
165  : matrix_( matrix ) // Left-hand side dense matrix of the multiplication expression
166  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
167  {}
168  //**********************************************************************************************
169 
170  //**Access operator*****************************************************************************
177  inline ReturnType operator()( size_t i, size_t j ) const {
178  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
179  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
180  return matrix_(i,j) * scalar_;
181  }
182  //**********************************************************************************************
183 
184  //**Get function********************************************************************************
191  inline IntrinsicType get( size_t i, size_t j ) const {
192  typedef IntrinsicTrait<ElementType> IT;
193  BLAZE_INTERNAL_ASSERT( i < matrix_.rows() , "Invalid row access index" );
194  BLAZE_INTERNAL_ASSERT( j < matrix_.columns(), "Invalid column access index" );
195  BLAZE_INTERNAL_ASSERT( !SO || ( i % IT::size == 0UL ), "Invalid row access index" );
196  BLAZE_INTERNAL_ASSERT( SO || ( j % IT::size == 0UL ), "Invalid column access index" );
197  const IntrinsicType xmm1( matrix_.get(i,j) );
198  const IntrinsicType xmm2( set( scalar_ ) );
199  return xmm1 * xmm2;
200  }
201  //**********************************************************************************************
202 
203  //**Rows function*******************************************************************************
208  inline size_t rows() const {
209  return matrix_.rows();
210  }
211  //**********************************************************************************************
212 
213  //**Columns function****************************************************************************
218  inline size_t columns() const {
219  return matrix_.columns();
220  }
221  //**********************************************************************************************
222 
223  //**Left operand access*************************************************************************
228  inline LeftOperand leftOperand() const {
229  return matrix_;
230  }
231  //**********************************************************************************************
232 
233  //**Right operand access************************************************************************
238  inline RightOperand rightOperand() const {
239  return scalar_;
240  }
241  //**********************************************************************************************
242 
243  //**********************************************************************************************
249  template< typename T >
250  inline bool canAlias( const T* alias ) const {
251  return matrix_.canAlias( alias );
252  }
253  //**********************************************************************************************
254 
255  //**********************************************************************************************
261  template< typename T >
262  inline bool isAliased( const T* alias ) const {
263  return matrix_.isAliased( alias );
264  }
265  //**********************************************************************************************
266 
267  private:
268  //**Member variables****************************************************************************
271  //**********************************************************************************************
272 
273  //**Assignment to row-major dense matrices******************************************************
287  template< typename MT2 > // Type of the target dense matrix
288  friend inline typename EnableIf< UseAssign<MT2> >::Type
290  {
292 
293  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
294  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
295 
296  assign( ~lhs, rhs.matrix_ );
297 
298  const size_t m( (~lhs).rows() );
299  const size_t n( (~lhs).columns() );
300  for( size_t i=0UL; i<m; ++i ) {
301  for( size_t j=0UL; j<n; ++j ) {
302  (~lhs)(i,j) *= rhs.scalar_;
303  }
304  }
305  }
307  //**********************************************************************************************
308 
309  //**Assignment to column-major dense matrices***************************************************
323  template< typename MT2 > // Type of the target dense matrix
324  friend inline typename EnableIf< UseAssign<MT2> >::Type
326  {
328 
329  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
330  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
331 
332  assign( ~lhs, rhs.matrix_ );
333 
334  const size_t m( (~lhs).rows() );
335  const size_t n( (~lhs).columns() );
336  for( size_t j=0UL; j<n; ++j ) {
337  for( size_t i=0UL; i<m; ++i ) {
338  (~lhs)(i,j) *= rhs.scalar_;
339  }
340  }
341  }
343  //**********************************************************************************************
344 
345  //**Assignment to row-major sparse matrices*****************************************************
359  template< typename MT2 > // Type of the target sparse matrix
360  friend inline typename EnableIf< UseAssign<MT2> >::Type
361  assign( SparseMatrix<MT2,false>& lhs, const DMatScalarMultExpr& rhs )
362  {
364 
365  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
366  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
367 
368  assign( ~lhs, rhs.matrix_ );
369 
370  for( size_t i=0UL; i<(~lhs).rows(); ++i )
371  {
372  typename MT2::Iterator element( (~lhs).begin(i) );
373  const typename MT2::Iterator end( (~lhs).end(i) );
374 
375  for( ; element!=end; ++element )
376  element->value() *= rhs.scalar_;
377  }
378  }
380  //**********************************************************************************************
381 
382  //**Assignment to column-major sparse matrices**************************************************
396  template< typename MT2 > // Type of the target sparse matrix
397  friend inline typename EnableIf< UseAssign<MT2> >::Type
398  assign( SparseMatrix<MT2,true>& lhs, const DMatScalarMultExpr& rhs )
399  {
401 
402  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
403  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
404 
405  assign( ~lhs, rhs.matrix_ );
406 
407  for( size_t j=0UL; j<(~lhs).columns(); ++j )
408  {
409  typename MT2::Iterator element( (~lhs).begin(j) );
410  const typename MT2::Iterator end( (~lhs).end(j) );
411 
412  for( ; element!=end; ++element )
413  element->value() *= rhs.scalar_;
414  }
415  }
417  //**********************************************************************************************
418 
419  //**Addition assignment to dense matrices*******************************************************
433  template< typename MT2 // Type of the target dense matrix
434  , bool SO2 > // Storage order of the target dense matrix
435  friend inline typename EnableIf< UseAssign<MT2> >::Type
436  addAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
437  {
439 
442  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( typename ResultType::CompositeType );
443 
444  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
445  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
446 
447  const ResultType tmp( rhs );
448  addAssign( ~lhs, tmp );
449  }
451  //**********************************************************************************************
452 
453  //**Addition assignment to sparse matrices******************************************************
454  // No special implementation for the addition assignment to sparse matrices.
455  //**********************************************************************************************
456 
457  //**Subtraction assignment to dense matrices****************************************************
471  template< typename MT2 // Type of the target dense matrix
472  , bool SO2 > // Storage order of the target dense matrix
473  friend inline typename EnableIf< UseAssign<MT2> >::Type
474  subAssign( DenseMatrix<MT2,SO2>& lhs, const DMatScalarMultExpr& rhs )
475  {
477 
480  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( typename ResultType::CompositeType );
481 
482  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
483  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
484 
485  const ResultType tmp( rhs );
486  subAssign( ~lhs, tmp );
487  }
489  //**********************************************************************************************
490 
491  //**Subtraction assignment to sparse matrices***************************************************
492  // No special implementation for the subtraction assignment to sparse matrices.
493  //**********************************************************************************************
494 
495  //**Multiplication assignment to dense matrices*************************************************
496  // No special implementation for the multiplication assignment to dense matrices.
497  //**********************************************************************************************
498 
499  //**Multiplication assignment to sparse matrices************************************************
500  // No special implementation for the multiplication assignment to sparse matrices.
501  //**********************************************************************************************
502 
503  //**Compile time checks*************************************************************************
510  //**********************************************************************************************
511 };
512 //*************************************************************************************************
513 
514 
515 
516 
517 //=================================================================================================
518 //
519 // GLOBAL UNARY ARITHMETIC OPERATORS
520 //
521 //=================================================================================================
522 
523 //*************************************************************************************************
540 template< typename MT // Type of the dense matrix
541  , bool SO > // Storage order
542 inline const DMatScalarMultExpr<MT,typename BaseElementType<MT>::Type,SO>
544 {
546 
547  typedef typename BaseElementType<MT>::Type ElementType;
548  return DMatScalarMultExpr<MT,ElementType,SO>( ~dm, ElementType(-1) );
549 }
550 //*************************************************************************************************
551 
552 
553 
554 
555 //=================================================================================================
556 //
557 // GLOBAL BINARY ARITHMETIC OPERATORS
558 //
559 //=================================================================================================
560 
561 //*************************************************************************************************
582 template< typename T1 // Type of the left-hand side dense matrix
583  , bool SO // Storage order of the left-hand side dense matrix
584  , typename T2 > // Type of the right-hand side scalar
585 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
586  operator*( const DenseMatrix<T1,SO>& mat, T2 scalar )
587 {
589 
590  typedef typename MultExprTrait<T1,T2>::Type Type;
591  return Type( ~mat, scalar );
592 }
593 //*************************************************************************************************
594 
595 
596 //*************************************************************************************************
617 template< typename T1 // Type of the left-hand side scalar
618  , typename T2 // Type of the right-hand side dense matrix
619  , bool SO > // Storage order of the right-hand side dense matrix
620 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
621  operator*( T1 scalar, const DenseMatrix<T2,SO>& mat )
622 {
624 
625  typedef typename MultExprTrait<T1,T2>::Type Type;
626  return Type( ~mat, scalar );
627 }
628 //*************************************************************************************************
629 
630 
631 
632 
633 //=================================================================================================
634 //
635 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
636 //
637 //=================================================================================================
638 
639 //*************************************************************************************************
651 template< typename VT // Type of the dense matrix
652  , typename ST // Type of the scalar
653  , bool TF > // Transpose flag
654 inline const DMatScalarMultExpr<VT,ST,TF>
655  operator-( const DMatScalarMultExpr<VT,ST,TF>& dm )
656 {
658 
659  return DMatScalarMultExpr<VT,ST,TF>( dm.leftOperand(), -dm.rightOperand() );
660 }
662 //*************************************************************************************************
663 
664 
665 
666 
667 //=================================================================================================
668 //
669 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
670 //
671 //=================================================================================================
672 
673 //*************************************************************************************************
686 template< typename MT // Type of the dense matrix of the left-hand side expression
687  , typename ST1 // Type of the scalar of the left-hand side expression
688  , bool SO // Storage order of the dense matrix
689  , typename ST2 > // Type of the right-hand side scalar
690 inline const typename EnableIf< IsNumeric<ST2>
691  , typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
692  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
693 {
695 
696  return mat.leftOperand() * ( mat.rightOperand() * scalar );
697 }
699 //*************************************************************************************************
700 
701 
702 //*************************************************************************************************
715 template< typename ST1 // Type of the left-hand side scalar
716  , typename MT // Type of the dense matrix of the right-hand side expression
717  , typename ST2 // Type of the scalar of the right-hand side expression
718  , bool SO > // Storage order of the dense matrix
719 inline const typename EnableIf< IsNumeric<ST1>
720  , typename MultExprTrait< ST1, DMatScalarMultExpr<MT,ST2,SO> >::Type >::Type
721  operator*( ST1 scalar, const DMatScalarMultExpr<MT,ST2,SO>& mat )
722 {
724 
725  return mat.leftOperand() * ( scalar * mat.rightOperand() );
726 }
728 //*************************************************************************************************
729 
730 
731 //*************************************************************************************************
744 template< typename MT // Type of the dense matrix of the left-hand side expression
745  , typename ST1 // Type of the scalar of the left-hand side expression
746  , bool SO // Storage order of the dense matrix
747  , typename ST2 > // Type of the right-hand side scalar
748 inline const typename EnableIf< IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>
749  , typename DivExprTrait< DMatScalarMultExpr<MT,ST1,SO>, ST2 >::Type >::Type
750  operator/( const DMatScalarMultExpr<MT,ST1,SO>& mat, ST2 scalar )
751 {
753 
754  return mat.leftOperand() * ( mat.rightOperand() / scalar );
755 }
757 //*************************************************************************************************
758 
759 
760 //*************************************************************************************************
774 template< typename MT // Type of the dense matrix of the left-hand side expression
775  , typename ST // Type of the scalar of the left-hand side expression
776  , bool SO // Storage order of the left-hand side expression
777  , typename VT > // Type of the right-hand side dense vector
778 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
779  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const DenseVector<VT,false>& vec )
780 {
782 
783  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
784 }
786 //*************************************************************************************************
787 
788 
789 //*************************************************************************************************
803 template< typename VT // Type of the left-hand side dense vector
804  , typename MT // Type of the dense matrix of the right-hand side expression
805  , typename ST // Type of the scalar of the right-hand side expression
806  , bool SO > // Storage order of the right-hand side expression
807 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
808  operator*( const DenseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
809 {
811 
812  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
813 }
815 //*************************************************************************************************
816 
817 
818 //*************************************************************************************************
834 template< typename MT // Type of the dense matrix of the left-hand side expression
835  , typename ST1 // Type of the scalar of the left-hand side expression
836  , bool SO // Storage order of the left-hand side expression
837  , typename VT // Type of the dense vector of the right-hand side expression
838  , typename ST2 > // Type of the scalar of the right-hand side expression
839 inline const DVecScalarMultExpr<typename MultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type,false>
840  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const DVecScalarMultExpr<VT,ST2,false>& vec )
841 {
843 
844  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
845 }
847 //*************************************************************************************************
848 
849 
850 //*************************************************************************************************
866 template< typename VT // Type of the dense vector of the left-hand side expression
867  , typename ST1 // Type of the scalar of the left-hand side expression
868  , typename MT // Type of the dense matrix of the right-hand side expression
869  , typename ST2 // Type of the scalar of the right-hand side expression
870  , bool SO > // Storage order of the right-hand side expression
871 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
872  operator*( const DVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
873 {
875 
876  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
877 }
879 //*************************************************************************************************
880 
881 
882 //*************************************************************************************************
896 template< typename MT // Type of the dense matrix of the left-hand side expression
897  , typename ST // Type of the scalar of the left-hand side expression
898  , bool SO // Storage order of the left-hand side expression
899  , typename VT > // Type of the right-hand side sparse vector
900 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST,SO>, VT >::Type
901  operator*( const DMatScalarMultExpr<MT,ST,SO>& mat, const SparseVector<VT,false>& vec )
902 {
904 
905  return ( mat.leftOperand() * (~vec) ) * mat.rightOperand();
906 }
908 //*************************************************************************************************
909 
910 
911 //*************************************************************************************************
925 template< typename VT // Type of the left-hand side sparse vector
926  , typename MT // Type of the dense matrix of the right-hand side expression
927  , typename ST // Type of the scalar of the right-hand side expression
928  , bool SO > // Storage order of the right-hand side expression
929 inline const typename MultExprTrait< VT, DMatScalarMultExpr<MT,ST,SO> >::Type
930  operator*( const SparseVector<VT,true>& vec, const DMatScalarMultExpr<MT,ST,SO>& mat )
931 {
933 
934  return ( (~vec) * mat.leftOperand() ) * mat.rightOperand();
935 }
937 //*************************************************************************************************
938 
939 
940 //*************************************************************************************************
956 template< typename MT // Type of the dense matrix of the left-hand side expression
957  , typename ST1 // Type of the scalar of the left-hand side expression
958  , bool SO // Storage order of the left-hand side expression
959  , typename VT // Type of the sparse vector of the right-hand side expression
960  , typename ST2 > // Type of the scalar of the right-hand side expression
961 inline const typename MultExprTrait< DMatScalarMultExpr<MT,ST1,SO>, SVecScalarMultExpr<VT,ST2,false> >::Type
962  operator*( const DMatScalarMultExpr<MT,ST1,SO>& mat, const SVecScalarMultExpr<VT,ST2,false>& vec )
963 {
965 
966  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
967 }
969 //*************************************************************************************************
970 
971 
972 //*************************************************************************************************
988 template< typename VT // Type of the sparse vector of the left-hand side expression
989  , typename ST1 // Type of the scalar of the left-hand side expression
990  , typename MT // Type of the dense matrix of the right-hand side expression
991  , typename ST2 // Type of the scalar of the right-hand side expression
992  , bool SO > // Storage order of the right-hand side expression
993 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,SO> >::Type
994  operator*( const SVecScalarMultExpr<VT,ST1,true>& vec, const DMatScalarMultExpr<MT,ST2,SO>& mat )
995 {
997 
998  return ( vec.leftOperand() * mat.leftOperand() ) * ( vec.rightOperand() * mat.rightOperand() );
999 }
1001 //*************************************************************************************************
1002 
1003 
1004 //*************************************************************************************************
1018 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1019  , typename ST // Type of the scalar of the left-hand side expression
1020  , bool SO1 // Storage order of the left-hand side expression
1021  , typename MT2 // Type of the right-hand side dense matrix
1022  , bool SO2 > // Storage order of the right-hand side dense matrix
1023 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1024  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const DenseMatrix<MT2,SO2>& rhs )
1025 {
1027 
1028  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1029 }
1031 //*************************************************************************************************
1032 
1033 
1034 //*************************************************************************************************
1048 template< typename MT1 // Type of the left-hand side dense matrix
1049  , bool SO1 // Storage order of the left-hand side dense matrix
1050  , typename MT2 // Type of the dense matrix of the right-hand side expression
1051  , typename ST // Type of the scalar of the right-hand side expression
1052  , bool SO2 > // Storage order of the right-hand side expression
1053 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1054  operator*( const DenseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1055 {
1057 
1058  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1059 }
1061 //*************************************************************************************************
1062 
1063 
1064 //*************************************************************************************************
1078 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1079  , typename ST1 // Type of the scalar of the left-hand side expression
1080  , bool SO1 // Storage order of the left-hand side expression
1081  , typename MT2 // Type of the right-hand side dense matrix
1082  , typename ST2 // Type of the scalar of the right-hand side expression
1083  , bool SO2 > // Storage order of the right-hand side expression
1084 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1085  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST2,SO2>& rhs )
1086 {
1088 
1089  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1090 }
1092 //*************************************************************************************************
1093 
1094 
1095 //*************************************************************************************************
1109 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1110  , typename ST // Type of the scalar of the left-hand side expression
1111  , bool SO1 // Storage order of the left-hand side expression
1112  , typename MT2 // Type of the right-hand side sparse matrix
1113  , bool SO2 > // Storage order of the right-hand side sparse matrix
1114 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST,SO1>, MT2 >::Type
1115  operator*( const DMatScalarMultExpr<MT1,ST,SO1>& lhs, const SparseMatrix<MT2,SO2>& rhs )
1116 {
1118 
1119  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1120 }
1122 //*************************************************************************************************
1123 
1124 
1125 //*************************************************************************************************
1139 template< typename MT1 // Type of the left-hand side sparse matrix
1140  , bool SO1 // Storage order of the left-hand side sparse matrix
1141  , typename MT2 // Type of the dense matrix of the right-hand side expression
1142  , typename ST // Type of the scalar of the right-hand side expression
1143  , bool SO2 > // Storage order of the right-hand side expression
1144 inline const typename MultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,SO2> >::Type
1145  operator*( const SparseMatrix<MT1,SO1>& lhs, const DMatScalarMultExpr<MT2,ST,SO2>& rhs )
1146 {
1148 
1149  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1150 }
1152 //*************************************************************************************************
1153 
1154 
1155 //*************************************************************************************************
1170 template< typename MT1 // Type of the dense matrix of the left-hand side expression
1171  , typename ST1 // Type of the scalar of the left-hand side expression
1172  , bool SO1 // Storage order of the left-hand side expression
1173  , typename MT2 // Type of the sparse matrix of the right-hand side expression
1174  , typename ST2 // Type of the scalar of the right-hand side expression
1175  , bool SO2 > // Storage order of the right-hand side expression
1176 inline const typename MultExprTrait< DMatScalarMultExpr<MT1,ST1,SO1>, SMatScalarMultExpr<MT2,ST2,SO2> >::Type
1177  operator*( const DMatScalarMultExpr<MT1,ST1,SO1>& mat, const SMatScalarMultExpr<MT2,ST2,SO2>& vec )
1178 {
1180 
1181  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1182 }
1184 //*************************************************************************************************
1185 
1186 
1187 //*************************************************************************************************
1202 template< typename MT1 // Type of the sparse matrix of the left-hand side expression
1203  , typename ST1 // Type of the scalar of the left-hand side expression
1204  , bool SO1 // Storage order of the left-hand side expression
1205  , typename MT2 // Type of the dense matrix of the right-hand side expression
1206  , typename ST2 // Type of the scalar of the right-hand side expression
1207  , bool SO2 > // Storage order of the right-hand side expression
1208 inline const typename MultExprTrait< SMatScalarMultExpr<MT1,ST1,SO1>, DMatScalarMultExpr<MT2,ST2,SO2> >::Type
1209  operator*( const SMatScalarMultExpr<MT1,ST1,SO1>& mat, const DMatScalarMultExpr<MT2,ST2,SO2>& vec )
1210 {
1212 
1213  return ( mat.leftOperand() * vec.leftOperand() ) * ( mat.rightOperand() * vec.rightOperand() );
1214 }
1216 //*************************************************************************************************
1217 
1218 
1219 
1220 
1221 //=================================================================================================
1222 //
1223 // DMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1224 //
1225 //=================================================================================================
1226 
1227 //*************************************************************************************************
1229 template< typename MT, typename ST1, typename ST2 >
1230 struct DMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1231 {
1232  public:
1233  //**********************************************************************************************
1234  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1235  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1236  , typename DMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1237  , INVALID_TYPE >::Type Type;
1238  //**********************************************************************************************
1239 };
1241 //*************************************************************************************************
1242 
1243 
1244 
1245 
1246 //=================================================================================================
1247 //
1248 // TDMATSCALARMULTEXPRTRAIT SPECIALIZATIONS
1249 //
1250 //=================================================================================================
1251 
1252 //*************************************************************************************************
1254 template< typename MT, typename ST1, typename ST2 >
1255 struct TDMatScalarMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1256 {
1257  public:
1258  //**********************************************************************************************
1259  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1260  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1261  , typename TDMatScalarMultExprTrait<MT,typename MultTrait<ST1,ST2>::Type>::Type
1262  , INVALID_TYPE >::Type Type;
1263  //**********************************************************************************************
1264 };
1266 //*************************************************************************************************
1267 
1268 
1269 
1270 
1271 //=================================================================================================
1272 //
1273 // DMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1274 //
1275 //=================================================================================================
1276 
1277 //*************************************************************************************************
1279 template< typename MT, typename ST1, typename ST2 >
1280 struct DMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,false>, ST2 >
1281 {
1282  private:
1283  //**********************************************************************************************
1284  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1285  //**********************************************************************************************
1286 
1287  //**********************************************************************************************
1288  typedef typename DMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1289  typedef typename DMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1290  //**********************************************************************************************
1291 
1292  public:
1293  //**********************************************************************************************
1294  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1295  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1296  , typename SelectType<condition,T1,T2>::Type
1297  , INVALID_TYPE >::Type Type;
1298  //**********************************************************************************************
1299 };
1301 //*************************************************************************************************
1302 
1303 
1304 
1305 
1306 //=================================================================================================
1307 //
1308 // TDMATSCALARDIVEXPRTRAIT SPECIALIZATIONS
1309 //
1310 //=================================================================================================
1311 
1312 //*************************************************************************************************
1314 template< typename MT, typename ST1, typename ST2 >
1315 struct TDMatScalarDivExprTrait< DMatScalarMultExpr<MT,ST1,true>, ST2 >
1316 {
1317  private:
1318  //**********************************************************************************************
1319  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1320  //**********************************************************************************************
1321 
1322  //**********************************************************************************************
1323  typedef typename TDMatScalarMultExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1324  typedef typename TDMatScalarDivExprTrait<MT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1325  //**********************************************************************************************
1326 
1327  public:
1328  //**********************************************************************************************
1329  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1330  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1331  , typename SelectType<condition,T1,T2>::Type
1332  , INVALID_TYPE >::Type Type;
1333  //**********************************************************************************************
1334 };
1336 //*************************************************************************************************
1337 
1338 
1339 
1340 
1341 //=================================================================================================
1342 //
1343 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1344 //
1345 //=================================================================================================
1346 
1347 //*************************************************************************************************
1349 template< typename MT, typename ST, typename VT >
1350 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1351 {
1352  public:
1353  //**********************************************************************************************
1354  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1355  IsDenseVector<VT>::value && !IsTransposeVector<VT>::value &&
1356  IsNumeric<ST>::value
1357  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1358  , INVALID_TYPE >::Type Type;
1359  //**********************************************************************************************
1360 };
1362 //*************************************************************************************************
1363 
1364 
1365 //*************************************************************************************************
1367 template< typename MT, typename ST1, typename VT, typename ST2 >
1368 struct DMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, DVecScalarMultExpr<VT,ST2,false> >
1369 {
1370  public:
1371  //**********************************************************************************************
1372  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1373  IsDenseVector<VT>::value && !IsTransposeVector<VT>::value &&
1374  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1375  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1376  , INVALID_TYPE >::Type Type;
1377  //**********************************************************************************************
1378 };
1380 //*************************************************************************************************
1381 
1382 
1383 
1384 
1385 //=================================================================================================
1386 //
1387 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
1388 //
1389 //=================================================================================================
1390 
1391 //*************************************************************************************************
1393 template< typename MT, typename ST, typename VT >
1394 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1395 {
1396  public:
1397  //**********************************************************************************************
1398  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1399  IsDenseVector<VT>::value && !IsTransposeVector<VT>::value &&
1400  IsNumeric<ST>::value
1401  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
1402  , INVALID_TYPE >::Type Type;
1403  //**********************************************************************************************
1404 };
1406 //*************************************************************************************************
1407 
1408 
1409 //*************************************************************************************************
1411 template< typename MT, typename ST1, typename VT, typename ST2 >
1412 struct TDMatDVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, DVecScalarMultExpr<VT,ST2,false> >
1413 {
1414  public:
1415  //**********************************************************************************************
1416  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1417  IsDenseVector<VT>::value && !IsTransposeVector<VT>::value &&
1418  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1419  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1420  , INVALID_TYPE >::Type Type;
1421  //**********************************************************************************************
1422 };
1424 //*************************************************************************************************
1425 
1426 
1427 
1428 
1429 //=================================================================================================
1430 //
1431 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1432 //
1433 //=================================================================================================
1434 
1435 //*************************************************************************************************
1437 template< typename VT, typename MT, typename ST >
1438 struct TDVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
1439 {
1440  public:
1441  //**********************************************************************************************
1442  typedef typename SelectType< IsDenseVector<VT>::value && IsTransposeVector<VT>::value &&
1443  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1444  IsNumeric<ST>::value
1445  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
1446  , INVALID_TYPE >::Type Type;
1447  //**********************************************************************************************
1448 };
1450 //*************************************************************************************************
1451 
1452 
1453 //*************************************************************************************************
1455 template< typename VT, typename ST1, typename MT, typename ST2 >
1456 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
1457 {
1458  public:
1459  //**********************************************************************************************
1460  typedef typename SelectType< IsDenseVector<VT>::value && IsTransposeVector<VT>::value &&
1461  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1462  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1463  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1464  , INVALID_TYPE >::Type Type;
1465  //**********************************************************************************************
1466 };
1468 //*************************************************************************************************
1469 
1470 
1471 
1472 
1473 //=================================================================================================
1474 //
1475 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
1476 //
1477 //=================================================================================================
1478 
1479 //*************************************************************************************************
1481 template< typename VT, typename MT, typename ST >
1482 struct TDVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
1483 {
1484  public:
1485  //**********************************************************************************************
1486  typedef typename SelectType< IsDenseVector<VT>::value && IsTransposeVector<VT>::value &&
1487  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1488  IsNumeric<ST>::value
1489  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
1490  , INVALID_TYPE >::Type Type;
1491  //**********************************************************************************************
1492 };
1494 //*************************************************************************************************
1495 
1496 
1497 //*************************************************************************************************
1499 template< typename VT, typename ST1, typename MT, typename ST2 >
1500 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
1501 {
1502  public:
1503  //**********************************************************************************************
1504  typedef typename SelectType< IsDenseVector<VT>::value && IsTransposeVector<VT>::value &&
1505  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1506  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1507  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1508  , INVALID_TYPE >::Type Type;
1509  //**********************************************************************************************
1510 };
1512 //*************************************************************************************************
1513 
1514 
1515 
1516 
1517 //=================================================================================================
1518 //
1519 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1520 //
1521 //=================================================================================================
1522 
1523 //*************************************************************************************************
1525 template< typename MT, typename ST, typename VT >
1526 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,false>, VT >
1527 {
1528  public:
1529  //**********************************************************************************************
1530  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1531  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1532  IsNumeric<ST>::value
1533  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1534  , INVALID_TYPE >::Type Type;
1535  //**********************************************************************************************
1536 };
1538 //*************************************************************************************************
1539 
1540 
1541 //*************************************************************************************************
1543 template< typename MT, typename ST1, typename VT, typename ST2 >
1544 struct DMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,false>, SVecScalarMultExpr<VT,ST2,false> >
1545 {
1546  public:
1547  //**********************************************************************************************
1548  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1549  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1550  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1551  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1552  , INVALID_TYPE >::Type Type;
1553  //**********************************************************************************************
1554 };
1556 //*************************************************************************************************
1557 
1558 
1559 
1560 
1561 //=================================================================================================
1562 //
1563 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1564 //
1565 //=================================================================================================
1566 
1567 //*************************************************************************************************
1569 template< typename MT, typename ST, typename VT >
1570 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST,true>, VT >
1571 {
1572  public:
1573  //**********************************************************************************************
1574  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1575  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1576  IsNumeric<ST>::value
1577  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1578  , INVALID_TYPE >::Type Type;
1579  //**********************************************************************************************
1580 };
1582 //*************************************************************************************************
1583 
1584 
1585 //*************************************************************************************************
1587 template< typename MT, typename ST1, typename VT, typename ST2 >
1588 struct TDMatSVecMultExprTrait< DMatScalarMultExpr<MT,ST1,true>, SVecScalarMultExpr<VT,ST2,false> >
1589 {
1590  public:
1591  //**********************************************************************************************
1592  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1593  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1594  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1595  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1596  , INVALID_TYPE >::Type Type;
1597  //**********************************************************************************************
1598 };
1600 //*************************************************************************************************
1601 
1602 
1603 
1604 
1605 //=================================================================================================
1606 //
1607 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1608 //
1609 //=================================================================================================
1610 
1611 //*************************************************************************************************
1613 template< typename VT, typename MT, typename ST >
1614 struct TSVecDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,false> >
1615 {
1616  public:
1617  //**********************************************************************************************
1618  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1619  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1620  IsNumeric<ST>::value
1621  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
1622  , INVALID_TYPE >::Type Type;
1623  //**********************************************************************************************
1624 };
1626 //*************************************************************************************************
1627 
1628 
1629 //*************************************************************************************************
1631 template< typename VT, typename ST1, typename MT, typename ST2 >
1632 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,false> >
1633 {
1634  public:
1635  //**********************************************************************************************
1636  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1637  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1638  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1639  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1640  , INVALID_TYPE >::Type Type;
1641  //**********************************************************************************************
1642 };
1644 //*************************************************************************************************
1645 
1646 
1647 
1648 
1649 //=================================================================================================
1650 //
1651 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
1652 //
1653 //=================================================================================================
1654 
1655 //*************************************************************************************************
1657 template< typename VT, typename MT, typename ST >
1658 struct TSVecTDMatMultExprTrait< VT, DMatScalarMultExpr<MT,ST,true> >
1659 {
1660  public:
1661  //**********************************************************************************************
1662  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1663  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1664  IsNumeric<ST>::value
1665  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
1666  , INVALID_TYPE >::Type Type;
1667  //**********************************************************************************************
1668 };
1670 //*************************************************************************************************
1671 
1672 
1673 //*************************************************************************************************
1675 template< typename VT, typename ST1, typename MT, typename ST2 >
1676 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, DMatScalarMultExpr<MT,ST2,true> >
1677 {
1678  public:
1679  //**********************************************************************************************
1680  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1681  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1682  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1683  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1684  , INVALID_TYPE >::Type Type;
1685  //**********************************************************************************************
1686 };
1688 //*************************************************************************************************
1689 
1690 
1691 
1692 
1693 //=================================================================================================
1694 //
1695 // DMATDMATMULTEXPRTRAIT SPECIALIZATIONS
1696 //
1697 //=================================================================================================
1698 
1699 //*************************************************************************************************
1701 template< typename MT1, typename ST, typename MT2 >
1702 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
1703 {
1704  public:
1705  //**********************************************************************************************
1706  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1707  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1708  IsNumeric<ST>::value
1709  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1710  , INVALID_TYPE >::Type Type;
1711  //**********************************************************************************************
1712 };
1714 //*************************************************************************************************
1715 
1716 
1717 //*************************************************************************************************
1719 template< typename MT1, typename MT2, typename ST >
1720 struct DMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
1721 {
1722  public:
1723  //**********************************************************************************************
1724  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1725  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1726  IsNumeric<ST>::value
1727  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1728  , INVALID_TYPE >::Type Type;
1729  //**********************************************************************************************
1730 };
1732 //*************************************************************************************************
1733 
1734 
1735 //*************************************************************************************************
1737 template< typename MT1, typename ST1, typename MT2, typename ST2 >
1738 struct DMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
1739 {
1740  public:
1741  //**********************************************************************************************
1742  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1743  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1744  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1745  , typename DMatScalarMultExprTrait<typename DMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1746  , INVALID_TYPE >::Type Type;
1747  //**********************************************************************************************
1748 };
1750 //*************************************************************************************************
1751 
1752 
1753 
1754 
1755 //=================================================================================================
1756 //
1757 // DMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
1758 //
1759 //=================================================================================================
1760 
1761 //*************************************************************************************************
1763 template< typename MT1, typename ST, typename MT2 >
1764 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
1765 {
1766  public:
1767  //**********************************************************************************************
1768  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1769  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1770  IsNumeric<ST>::value
1771  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1772  , INVALID_TYPE >::Type Type;
1773  //**********************************************************************************************
1774 };
1776 //*************************************************************************************************
1777 
1778 
1779 //*************************************************************************************************
1781 template< typename MT1, typename MT2, typename ST >
1782 struct DMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
1783 {
1784  public:
1785  //**********************************************************************************************
1786  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1787  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1788  IsNumeric<ST>::value
1789  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1790  , INVALID_TYPE >::Type Type;
1791  //**********************************************************************************************
1792 };
1794 //*************************************************************************************************
1795 
1796 
1797 //*************************************************************************************************
1799 template< typename MT1, typename ST1, typename MT2, typename ST2 >
1800 struct DMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
1801 {
1802  public:
1803  //**********************************************************************************************
1804  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1805  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1806  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1807  , typename DMatScalarMultExprTrait<typename DMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1808  , INVALID_TYPE >::Type Type;
1809  //**********************************************************************************************
1810 };
1812 //*************************************************************************************************
1813 
1814 
1815 
1816 
1817 //=================================================================================================
1818 //
1819 // TDMATDMATMULTEXPRTRAIT SPECIALIZATIONS
1820 //
1821 //=================================================================================================
1822 
1823 //*************************************************************************************************
1825 template< typename MT1, typename ST, typename MT2 >
1826 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
1827 {
1828  public:
1829  //**********************************************************************************************
1830  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1831  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1832  IsNumeric<ST>::value
1833  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1834  , INVALID_TYPE >::Type Type;
1835  //**********************************************************************************************
1836 };
1838 //*************************************************************************************************
1839 
1840 
1841 //*************************************************************************************************
1843 template< typename MT1, typename MT2, typename ST >
1844 struct TDMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
1845 {
1846  public:
1847  //**********************************************************************************************
1848  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1849  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1850  IsNumeric<ST>::value
1851  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1852  , INVALID_TYPE >::Type Type;
1853  //**********************************************************************************************
1854 };
1856 //*************************************************************************************************
1857 
1858 
1859 //*************************************************************************************************
1861 template< typename MT1, typename ST1, typename MT2, typename ST2 >
1862 struct TDMatDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
1863 {
1864  public:
1865  //**********************************************************************************************
1866  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1867  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1868  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1869  , typename TDMatScalarMultExprTrait<typename TDMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1870  , INVALID_TYPE >::Type Type;
1871  //**********************************************************************************************
1872 };
1874 //*************************************************************************************************
1875 
1876 
1877 
1878 
1879 //=================================================================================================
1880 //
1881 // TDMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
1882 //
1883 //=================================================================================================
1884 
1885 //*************************************************************************************************
1887 template< typename MT1, typename ST, typename MT2 >
1888 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
1889 {
1890  public:
1891  //**********************************************************************************************
1892  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1893  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1894  IsNumeric<ST>::value
1895  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1896  , INVALID_TYPE >::Type Type;
1897  //**********************************************************************************************
1898 };
1900 //*************************************************************************************************
1901 
1902 
1903 //*************************************************************************************************
1905 template< typename MT1, typename MT2, typename ST >
1906 struct TDMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
1907 {
1908  public:
1909  //**********************************************************************************************
1910  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1911  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1912  IsNumeric<ST>::value
1913  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1914  , INVALID_TYPE >::Type Type;
1915  //**********************************************************************************************
1916 };
1918 //*************************************************************************************************
1919 
1920 
1921 //*************************************************************************************************
1923 template< typename MT1, typename ST1, typename MT2, typename ST2 >
1924 struct TDMatTDMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
1925 {
1926  public:
1927  //**********************************************************************************************
1928  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
1929  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
1930  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1931  , typename TDMatScalarMultExprTrait<typename TDMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1932  , INVALID_TYPE >::Type Type;
1933  //**********************************************************************************************
1934 };
1936 //*************************************************************************************************
1937 
1938 
1939 
1940 
1941 //=================================================================================================
1942 //
1943 // DMATSMATMULTEXPRTRAIT SPECIALIZATIONS
1944 //
1945 //=================================================================================================
1946 
1947 //*************************************************************************************************
1949 template< typename MT1, typename ST, typename MT2 >
1950 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
1951 {
1952  public:
1953  //**********************************************************************************************
1954  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1955  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1956  IsNumeric<ST>::value
1957  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
1958  , INVALID_TYPE >::Type Type;
1959  //**********************************************************************************************
1960 };
1962 //*************************************************************************************************
1963 
1964 
1965 //*************************************************************************************************
1967 template< typename MT1, typename ST1, typename MT2, typename ST2 >
1968 struct DMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,false> >
1969 {
1970  public:
1971  //**********************************************************************************************
1972  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1973  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
1974  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1975  , typename DMatScalarMultExprTrait<typename DMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1976  , INVALID_TYPE >::Type Type;
1977  //**********************************************************************************************
1978 };
1980 //*************************************************************************************************
1981 
1982 
1983 
1984 
1985 //=================================================================================================
1986 //
1987 // DMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
1988 //
1989 //=================================================================================================
1990 
1991 //*************************************************************************************************
1993 template< typename MT1, typename ST, typename MT2 >
1994 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,false>, MT2 >
1995 {
1996  public:
1997  //**********************************************************************************************
1998  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
1999  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2000  IsNumeric<ST>::value
2001  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2002  , INVALID_TYPE >::Type Type;
2003  //**********************************************************************************************
2004 };
2006 //*************************************************************************************************
2007 
2008 
2009 //*************************************************************************************************
2011 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2012 struct DMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,false>, SMatScalarMultExpr<MT2,ST2,true> >
2013 {
2014  public:
2015  //**********************************************************************************************
2016  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2017  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2018  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2019  , typename DMatScalarMultExprTrait<typename DMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2020  , INVALID_TYPE >::Type Type;
2021  //**********************************************************************************************
2022 };
2024 //*************************************************************************************************
2025 
2026 
2027 
2028 
2029 //=================================================================================================
2030 //
2031 // TDMATSMATMULTEXPRTRAIT SPECIALIZATIONS
2032 //
2033 //=================================================================================================
2034 
2035 //*************************************************************************************************
2037 template< typename MT1, typename ST, typename MT2 >
2038 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2039 {
2040  public:
2041  //**********************************************************************************************
2042  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2043  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2044  IsNumeric<ST>::value
2045  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2046  , INVALID_TYPE >::Type Type;
2047  //**********************************************************************************************
2048 };
2050 //*************************************************************************************************
2051 
2052 
2053 //*************************************************************************************************
2055 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2056 struct TDMatSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,false> >
2057 {
2058  public:
2059  //**********************************************************************************************
2060  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2061  IsSparseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2062  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2063  , typename TDMatScalarMultExprTrait<typename TDMatSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2064  , INVALID_TYPE >::Type Type;
2065  //**********************************************************************************************
2066 };
2068 //*************************************************************************************************
2069 
2070 
2071 
2072 
2073 //=================================================================================================
2074 //
2075 // TDMATTSMATMULTEXPRTRAIT SPECIALIZATIONS
2076 //
2077 //=================================================================================================
2078 
2079 //*************************************************************************************************
2081 template< typename MT1, typename ST, typename MT2 >
2082 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST,true>, MT2 >
2083 {
2084  public:
2085  //**********************************************************************************************
2086  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2087  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2088  IsNumeric<ST>::value
2089  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2090  , INVALID_TYPE >::Type Type;
2091  //**********************************************************************************************
2092 };
2094 //*************************************************************************************************
2095 
2096 
2097 //*************************************************************************************************
2099 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2100 struct TDMatTSMatMultExprTrait< DMatScalarMultExpr<MT1,ST1,true>, SMatScalarMultExpr<MT2,ST2,true> >
2101 {
2102  public:
2103  //**********************************************************************************************
2104  typedef typename SelectType< IsDenseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2105  IsSparseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2106  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2107  , typename TDMatScalarMultExprTrait<typename TDMatTSMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2108  , INVALID_TYPE >::Type Type;
2109  //**********************************************************************************************
2110 };
2112 //*************************************************************************************************
2113 
2114 
2115 
2116 
2117 //=================================================================================================
2118 //
2119 // SMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2120 //
2121 //=================================================================================================
2122 
2123 //*************************************************************************************************
2125 template< typename MT1, typename ST, typename MT2 >
2126 struct SMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2127 {
2128  public:
2129  //**********************************************************************************************
2130  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2131  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2132  IsNumeric<ST>::value
2133  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2134  , INVALID_TYPE >::Type Type;
2135  //**********************************************************************************************
2136 };
2138 //*************************************************************************************************
2139 
2140 
2141 //*************************************************************************************************
2143 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2144 struct SMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,false> >
2145 {
2146  public:
2147  //**********************************************************************************************
2148  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2149  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2150  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2151  , typename DMatScalarMultExprTrait<typename SMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2152  , INVALID_TYPE >::Type Type;
2153  //**********************************************************************************************
2154 };
2156 //*************************************************************************************************
2157 
2158 
2159 
2160 
2161 //=================================================================================================
2162 //
2163 // SMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2164 //
2165 //=================================================================================================
2166 
2167 //*************************************************************************************************
2169 template< typename MT1, typename ST, typename MT2 >
2170 struct SMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2171 {
2172  public:
2173  //**********************************************************************************************
2174  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2175  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2176  IsNumeric<ST>::value
2177  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2178  , INVALID_TYPE >::Type Type;
2179  //**********************************************************************************************
2180 };
2182 //*************************************************************************************************
2183 
2184 
2185 //*************************************************************************************************
2187 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2188 struct SMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,false>, DMatScalarMultExpr<MT2,ST2,true> >
2189 {
2190  public:
2191  //**********************************************************************************************
2192  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsRowMajorMatrix<MT1>::value &&
2193  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2194  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2195  , typename DMatScalarMultExprTrait<typename SMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2196  , INVALID_TYPE >::Type Type;
2197  //**********************************************************************************************
2198 };
2200 //*************************************************************************************************
2201 
2202 
2203 
2204 
2205 //=================================================================================================
2206 //
2207 // TSMATDMATMULTEXPRTRAIT SPECIALIZATIONS
2208 //
2209 //=================================================================================================
2210 
2211 //*************************************************************************************************
2213 template< typename MT1, typename ST, typename MT2 >
2214 struct TSMatDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,false> >
2215 {
2216  public:
2217  //**********************************************************************************************
2218  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2219  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2220  IsNumeric<ST>::value
2221  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2222  , INVALID_TYPE >::Type Type;
2223  //**********************************************************************************************
2224 };
2226 //*************************************************************************************************
2227 
2228 
2229 //*************************************************************************************************
2231 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2232 struct TSMatDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,false> >
2233 {
2234  public:
2235  //**********************************************************************************************
2236  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2237  IsDenseMatrix<MT2>::value && IsRowMajorMatrix<MT2>::value &&
2238  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2239  , typename TDMatScalarMultExprTrait<typename TSMatDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2240  , INVALID_TYPE >::Type Type;
2241  //**********************************************************************************************
2242 };
2244 //*************************************************************************************************
2245 
2246 
2247 
2248 
2249 //=================================================================================================
2250 //
2251 // TSMATTDMATMULTEXPRTRAIT SPECIALIZATIONS
2252 //
2253 //=================================================================================================
2254 
2255 //*************************************************************************************************
2257 template< typename MT1, typename ST, typename MT2 >
2258 struct TSMatTDMatMultExprTrait< MT1, DMatScalarMultExpr<MT2,ST,true> >
2259 {
2260  public:
2261  //**********************************************************************************************
2262  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2263  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2264  IsNumeric<ST>::value
2265  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,ST>::Type
2266  , INVALID_TYPE >::Type Type;
2267  //**********************************************************************************************
2268 };
2270 //*************************************************************************************************
2271 
2272 
2273 //*************************************************************************************************
2275 template< typename MT1, typename ST1, typename MT2, typename ST2 >
2276 struct TSMatTDMatMultExprTrait< SMatScalarMultExpr<MT1,ST1,true>, DMatScalarMultExpr<MT2,ST2,true> >
2277 {
2278  public:
2279  //**********************************************************************************************
2280  typedef typename SelectType< IsSparseMatrix<MT1>::value && IsColumnMajorMatrix<MT1>::value &&
2281  IsDenseMatrix<MT2>::value && IsColumnMajorMatrix<MT2>::value &&
2282  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2283  , typename TDMatScalarMultExprTrait<typename TSMatTDMatMultExprTrait<MT1,MT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2284  , INVALID_TYPE >::Type Type;
2285  //**********************************************************************************************
2286 };
2288 //*************************************************************************************************
2289 
2290 
2291 
2292 
2293 //=================================================================================================
2294 //
2295 // ROWEXPRTRAIT SPECIALIZATIONS
2296 //
2297 //=================================================================================================
2298 
2299 //*************************************************************************************************
2301 template< typename MT, typename ST, bool SO >
2302 struct RowExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2303 {
2304  public:
2305  //**********************************************************************************************
2306  typedef typename MultExprTrait< typename RowExprTrait<const MT>::Type, ST >::Type Type;
2307  //**********************************************************************************************
2308 };
2310 //*************************************************************************************************
2311 
2312 
2313 
2314 
2315 //=================================================================================================
2316 //
2317 // COLUMNEXPRTRAIT SPECIALIZATIONS
2318 //
2319 //=================================================================================================
2320 
2321 //*************************************************************************************************
2323 template< typename MT, typename ST, bool SO >
2324 struct ColumnExprTrait< DMatScalarMultExpr<MT,ST,SO> >
2325 {
2326  public:
2327  //**********************************************************************************************
2328  typedef typename MultExprTrait< typename ColumnExprTrait<const MT>::Type, ST >::Type Type;
2329  //**********************************************************************************************
2330 };
2332 //*************************************************************************************************
2333 
2334 } // namespace blaze
2335 
2336 #endif