All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SVecScalarMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECSCALARMULTEXPR_H_
23 #define _BLAZE_MATH_EXPRESSIONS_SVECSCALARMULTEXPR_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <iterator>
31 #include <boost/type_traits/remove_reference.hpp>
55 #include <blaze/util/Assert.h>
59 #include <blaze/util/EnableIf.h>
60 #include <blaze/util/InvalidType.h>
62 #include <blaze/util/SelectType.h>
63 #include <blaze/util/Types.h>
66 
67 
68 namespace blaze {
69 
70 //=================================================================================================
71 //
72 // CLASS SVECSCALARMULTEXPR
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
83 template< typename VT // Type of the left-hand side sparse vector
84  , typename ST // Type of the right-hand side scalar value
85  , bool TF > // Transpose flag
86 class SVecScalarMultExpr : public SparseVector< SVecScalarMultExpr<VT,ST,TF>, TF >
87  , private Expression
88  , private Computation
89 {
90  private:
91  //**Type definitions****************************************************************************
92  typedef typename VT::ResultType RT;
93  typedef typename VT::ReturnType RN;
94  typedef typename VT::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<VT>::value };
119 
121 
122  template< typename VT2 >
123  struct UseAssign {
124  enum { value = useAssign };
125  };
127  //**********************************************************************************************
128 
129  public:
130  //**Type definitions****************************************************************************
133  typedef typename ResultType::TransposeType TransposeType;
134  typedef typename ResultType::ElementType ElementType;
135 
138 
141 
143  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type LeftOperand;
144 
147  //**********************************************************************************************
148 
149  //**ConstIterator class definition**************************************************************
153  {
154  public:
155  //**Type definitions*************************************************************************
158 
160  typedef typename boost::remove_reference<LeftOperand>::type::ConstIterator IteratorType;
161 
162  typedef std::forward_iterator_tag IteratorCategory;
163  typedef Element ValueType;
167 
168  // STL iterator requirements
174  //*******************************************************************************************
175 
176  //**Constructor******************************************************************************
179  inline ConstIterator( IteratorType vector, RightOperand scalar )
180  : vector_( vector ) // Iterator over the elements of the left-hand side sparse vector expression
181  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
182  {}
183  //*******************************************************************************************
184 
185  //**Prefix increment operator****************************************************************
191  ++vector_;
192  return *this;
193  }
194  //*******************************************************************************************
195 
196  //**Element access operator******************************************************************
201  inline const Element operator*() const {
202  return Element( vector_->value() * scalar_, vector_->index() );
203  }
204  //*******************************************************************************************
205 
206  //**Element access operator******************************************************************
211  inline const ConstIterator* operator->() const {
212  return this;
213  }
214  //*******************************************************************************************
215 
216  //**Value function***************************************************************************
221  inline ReturnType value() const {
222  return vector_->value() * scalar_;
223  }
224  //*******************************************************************************************
225 
226  //**Index function***************************************************************************
231  inline size_t index() const {
232  return vector_->index();
233  }
234  //*******************************************************************************************
235 
236  //**Equality operator************************************************************************
242  inline bool operator==( const ConstIterator& rhs ) const {
243  return vector_ == rhs.vector_;
244  }
245  //*******************************************************************************************
246 
247  //**Inequality operator**********************************************************************
253  inline bool operator!=( const ConstIterator& rhs ) const {
254  return vector_ != rhs.vector_;
255  }
256  //*******************************************************************************************
257 
258  //**Subtraction operator*********************************************************************
264  inline DifferenceType operator-( const ConstIterator& rhs ) const {
265  return vector_ - rhs.vector_;
266  }
267  //*******************************************************************************************
268 
269  private:
270  //**Member variables*************************************************************************
273  //*******************************************************************************************
274  };
275  //**********************************************************************************************
276 
277  //**Constructor*********************************************************************************
283  explicit inline SVecScalarMultExpr( const VT& vector, ST scalar )
284  : vector_( vector ) // Left-hand side sparse vector of the multiplication expression
285  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
286  {}
287  //**********************************************************************************************
288 
289  //**Subscript operator**************************************************************************
295  inline ReturnType operator[]( size_t index ) const {
296  BLAZE_INTERNAL_ASSERT( index < vector_.size(), "Invalid vector access index" );
297  return vector_[index] * scalar_;
298  }
299  //**********************************************************************************************
300 
301  //**Begin function******************************************************************************
306  inline ConstIterator begin() const {
307  return ConstIterator( vector_.begin(), scalar_ );
308  }
309  //**********************************************************************************************
310 
311  //**End function********************************************************************************
316  inline ConstIterator end() const {
317  return ConstIterator( vector_.end(), scalar_ );
318  }
319  //**********************************************************************************************
320 
321  //**Size function*******************************************************************************
326  inline size_t size() const {
327  return vector_.size();
328  }
329  //**********************************************************************************************
330 
331  //**NonZeros function***************************************************************************
336  inline size_t nonZeros() const {
337  return vector_.nonZeros();
338  }
339  //**********************************************************************************************
340 
341  //**Left operand access*************************************************************************
346  inline LeftOperand leftOperand() const {
347  return vector_;
348  }
349  //**********************************************************************************************
350 
351  //**Right operand access************************************************************************
356  inline RightOperand rightOperand() const {
357  return scalar_;
358  }
359  //**********************************************************************************************
360 
361  //**********************************************************************************************
367  template< typename T >
368  inline bool canAlias( const T* alias ) const {
369  return vector_.canAlias( alias );
370  }
371  //**********************************************************************************************
372 
373  //**********************************************************************************************
379  template< typename T >
380  inline bool isAliased( const T* alias ) const {
381  return vector_.isAliased( alias );
382  }
383  //**********************************************************************************************
384 
385  private:
386  //**Member variables****************************************************************************
389  //**********************************************************************************************
390 
391  //**Assignment to dense vectors*****************************************************************
405  template< typename VT2 > // Type of the target dense vector
406  friend inline typename EnableIf< UseAssign<VT2> >::Type
407  assign( DenseVector<VT2,TF>& lhs, const SVecScalarMultExpr& rhs )
408  {
410 
411  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
412 
413  assign( ~lhs, rhs.vector_ );
414 
415  const size_t size( rhs.size() );
416  for( size_t i=0UL; i<size; ++i )
417  (~lhs)[i] *= rhs.scalar_;
418  }
420  //**********************************************************************************************
421 
422  //**Assignment to sparse vectors****************************************************************
436  template< typename VT2 > // Type of the target sparse vector
437  friend inline typename EnableIf< UseAssign<VT2> >::Type
439  {
441 
442  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
443 
444  assign( ~lhs, rhs.vector_ );
445 
446  typename VT2::Iterator begin( (~lhs).begin() );
447  const typename VT2::Iterator end( (~lhs).end() );
448 
449  for( ; begin!=end; ++begin )
450  begin->value() *= rhs.scalar_;
451  }
453  //**********************************************************************************************
454 
455  //**Addition assignment to dense vectors********************************************************
469  template< typename VT2 > // Type of the target dense vector
470  friend inline typename EnableIf< UseAssign<VT2> >::Type
471  addAssign( DenseVector<VT2,TF>& lhs, const SVecScalarMultExpr& rhs )
472  {
474 
477  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( typename ResultType::CompositeType );
478 
479  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
480 
481  const ResultType tmp( rhs );
482  addAssign( ~lhs, tmp );
483  }
485  //**********************************************************************************************
486 
487  //**Addition assignment to sparse vectors*******************************************************
488  // No special implementation for the addition assignment to sparse vectors.
489  //**********************************************************************************************
490 
491  //**Subtraction assignment to dense vectors*****************************************************
505  template< typename VT2 > // Type of the target dense vector
506  friend inline typename EnableIf< UseAssign<VT2> >::Type
507  subAssign( DenseVector<VT2,TF>& lhs, const SVecScalarMultExpr& rhs )
508  {
510 
513  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( typename ResultType::CompositeType );
514 
515  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
516 
517  const ResultType tmp( rhs );
518  subAssign( ~lhs, tmp );
519  }
521  //**********************************************************************************************
522 
523  //**Subtraction assignment to sparse vectors****************************************************
524  // No special implementation for the subtraction assignment to sparse vectors.
525  //**********************************************************************************************
526 
527  //**Multiplication assignment to dense vectors**************************************************
541  template< typename VT2 > // Type of the target dense vector
542  friend inline typename EnableIf< UseAssign<VT2> >::Type
543  multAssign( DenseVector<VT2,TF>& lhs, const SVecScalarMultExpr& rhs )
544  {
546 
549  BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE( typename ResultType::CompositeType );
550 
551  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
552 
553  const ResultType tmp( rhs );
554  multAssign( ~lhs, tmp );
555  }
557  //**********************************************************************************************
558 
559  //**Multiplication assignment to sparse vectors*************************************************
560  // No special implementation for the multiplication assignment to sparse vectors.
561  //**********************************************************************************************
562 
563  //**Compile time checks*************************************************************************
570  //**********************************************************************************************
571 };
572 //*************************************************************************************************
573 
574 
575 
576 
577 //=================================================================================================
578 //
579 // GLOBAL UNARY ARITHMETIC OPERATORS
580 //
581 //=================================================================================================
582 
583 //*************************************************************************************************
600 template< typename VT // Type of the sparse vector
601  , bool TF > // Transpose flag
602 inline const SVecScalarMultExpr<VT,typename BaseElementType<VT>::Type,TF>
604 {
606 
607  typedef typename BaseElementType<VT>::Type ElementType;
608  return SVecScalarMultExpr<VT,ElementType,TF>( ~sv, ElementType(-1) );
609 }
610 //*************************************************************************************************
611 
612 
613 
614 
615 //=================================================================================================
616 //
617 // GLOBAL BINARY ARITHMETIC OPERATORS
618 //
619 //=================================================================================================
620 
621 //*************************************************************************************************
642 template< typename T1 // Type of the left-hand side sparse vector
643  , typename T2 // Type of the right-hand side scalar
644  , bool TF > // Transpose flag
645 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
646  operator*( const SparseVector<T1,TF>& vec, T2 scalar )
647 {
649 
650  typedef typename MultExprTrait<T1,T2>::Type Type;
651  return Type( ~vec, scalar );
652 }
653 //*************************************************************************************************
654 
655 
656 //*************************************************************************************************
677 template< typename T1 // Type of the left-hand side scalar
678  , typename T2 // Type of the right-hand side sparse vector
679  , bool TF > // Transpose flag
680 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
681  operator*( T1 scalar, const SparseVector<T2,TF>& vec )
682 {
684 
685  typedef typename MultExprTrait<T1,T2>::Type Type;
686  return Type( ~vec, scalar );
687 }
688 //*************************************************************************************************
689 
690 
691 
692 
693 //=================================================================================================
694 //
695 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
696 //
697 //=================================================================================================
698 
699 //*************************************************************************************************
711 template< typename VT // Type of the sparse vector
712  , typename ST // Type of the scalar
713  , bool TF > // Transpose flag
714 inline const SVecScalarMultExpr<VT,ST,TF>
715  operator-( const SVecScalarMultExpr<VT,ST,TF>& sv )
716 {
718 
719  return SVecScalarMultExpr<VT,ST,TF>( sv.leftOperand(), -sv.rightOperand() );
720 }
722 //*************************************************************************************************
723 
724 
725 
726 
727 //=================================================================================================
728 //
729 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
730 //
731 //=================================================================================================
732 
733 //*************************************************************************************************
746 template< typename VT // Type of the sparse vector of the left-hand side expression
747  , typename ST1 // Type of the scalar of the left-hand side expression
748  , bool TF // Transpose flag of the sparse vector
749  , typename ST2 > // Type of the right-hand side scalar
750 inline const typename EnableIf< IsNumeric<ST2>
751  , typename MultExprTrait< SVecScalarMultExpr<VT,ST1,TF>, ST2 >::Type >::Type
752  operator*( const SVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
753 {
755 
756  return vec.leftOperand() * ( vec.rightOperand() * scalar );
757 }
759 //*************************************************************************************************
760 
761 
762 //*************************************************************************************************
775 template< typename ST1 // Type of the left-hand side scalar
776  , typename VT // Type of the sparse vector of the right-hand side expression
777  , typename ST2 // Type of the scalar of the right-hand side expression
778  , bool TF > // Transpose flag of the sparse vector
779 inline const typename EnableIf< IsNumeric<ST1>
780  , typename MultExprTrait< ST1, SVecScalarMultExpr<VT,ST2,TF> >::Type >::Type
781  operator*( ST1 scalar, const SVecScalarMultExpr<VT,ST2,TF>& vec )
782 {
784 
785  return vec.leftOperand() * ( scalar * vec.rightOperand() );
786 }
788 //*************************************************************************************************
789 
790 
791 //*************************************************************************************************
804 template< typename VT // Type of the dense vector of the left-hand side expression
805  , typename ST1 // Type of the scalar of the left-hand side expression
806  , bool TF // Transpose flag of the dense vector
807  , typename ST2 > // Type of the right-hand side scalar
808 inline const typename EnableIf< IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>
809  , typename DivExprTrait< SVecScalarMultExpr<VT,ST1,TF>, ST2 >::Type >::Type
810  operator/( const SVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
811 {
813 
814  return vec.leftOperand() * ( vec.rightOperand() / scalar );
815 }
817 //*************************************************************************************************
818 
819 
820 //*************************************************************************************************
834 template< typename VT1 // Type of the sparse vector of the left-hand side expression
835  , typename ST // Type of the scalar of the left-hand side expression
836  , bool TF // Transpose flag of the dense vectors
837  , typename VT2 > // Type of the right-hand side dense vector
838 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST,TF>, VT2 >::Type
839  operator*( const SVecScalarMultExpr<VT1,ST,TF>& lhs, const DenseVector<VT2,TF>& rhs )
840 {
842 
843  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
844 }
846 //*************************************************************************************************
847 
848 
849 //*************************************************************************************************
863 template< typename VT1 // Type of the left-hand side dense vector
864  , bool TF // Transpose flag of the dense vectors
865  , typename VT2 // Type of the sparse vector of the right-hand side expression
866  , typename ST > // Type of the scalar of the right-hand side expression
867 inline const typename MultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,TF> >::Type
868  operator*( const DenseVector<VT1,TF>& lhs, const SVecScalarMultExpr<VT2,ST,TF>& rhs )
869 {
871 
872  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
873 }
875 //*************************************************************************************************
876 
877 
878 //*************************************************************************************************
892 template< typename VT1 // Type of the sparse vector of the left-hand side expression
893  , typename ST // Type of the scalar of the left-hand side expression
894  , typename VT2 > // Type of the right-hand side dense vector
895 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >::Type
896  operator*( const SVecScalarMultExpr<VT1,ST,false>& lhs, const DenseVector<VT2,true>& rhs )
897 {
899 
900  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
901 }
903 //*************************************************************************************************
904 
905 
906 //*************************************************************************************************
920 template< typename VT1 // Type of the left-hand side dense vector
921  , typename VT2 // Type of the sparse vector of the right-hand side expression
922  , typename ST > // Type of the scalar of the right-hand side expression
923 inline const typename MultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >::Type
924  operator*( const DenseVector<VT1,false>& lhs, const SVecScalarMultExpr<VT2,ST,true>& rhs )
925 {
927 
928  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
929 }
931 //*************************************************************************************************
932 
933 
934 //*************************************************************************************************
948 template< typename VT1 // Type of the sparse vector of the left-hand side expression
949  , typename ST // Type of the scalar of the left-hand side expression
950  , bool TF // Transpose flag of the vectors
951  , typename VT2 > // Type of the right-hand side sparse vector
952 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST,TF>, VT2 >::Type
953  operator*( const SVecScalarMultExpr<VT1,ST,TF>& lhs, const SparseVector<VT2,TF>& rhs )
954 {
956 
957  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
958 }
960 //*************************************************************************************************
961 
962 
963 //*************************************************************************************************
977 template< typename VT1 // Type of the left-hand side sparse vector
978  , bool TF // Transpose flag of the vectors
979  , typename VT2 // Type of the sparse vector of the right-hand side expression
980  , typename ST > // Type of the scalar of the right-hand side expression
981 inline const typename MultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,TF> >::Type
982  operator*( const SparseVector<VT1,TF>& lhs, const SVecScalarMultExpr<VT2,ST,TF>& rhs )
983 {
985 
986  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
987 }
989 //*************************************************************************************************
990 
991 
992 //*************************************************************************************************
1006 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1007  , typename ST1 // Type of the scalar of the left-hand side expression
1008  , bool TF // Transpose flag of the sparse vectors
1009  , typename VT2 // Type of the sparse vector of the right-hand side expression
1010  , typename ST2 > // Type of the scalar of the right-hand side expression
1011 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST1,TF>, SVecScalarMultExpr<VT2,ST2,TF> >::Type
1012  operator*( const SVecScalarMultExpr<VT1,ST1,TF>& lhs, const SVecScalarMultExpr<VT2,ST2,TF>& rhs )
1013 {
1015 
1016  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1017 }
1019 //*************************************************************************************************
1020 
1021 
1022 //*************************************************************************************************
1036 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1037  , typename ST // Type of the scalar of the left-hand side expression
1038  , typename VT2 > // Type of the right-hand side sparse vector
1039 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >::Type
1040  operator*( const SVecScalarMultExpr<VT1,ST,false>& lhs, const SparseVector<VT2,true>& rhs )
1041 {
1043 
1044  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1045 }
1047 //*************************************************************************************************
1048 
1049 
1050 //*************************************************************************************************
1064 template< typename VT1 // Type of the left-hand side sparse vector
1065  , typename VT2 // Type of the sparse vector of the right-hand side expression
1066  , typename ST > // Type of the scalar of the right-hand side expression
1067 inline const typename MultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >::Type
1068  operator*( const SparseVector<VT1,false>& lhs, const SVecScalarMultExpr<VT2,ST,true>& rhs )
1069 {
1071 
1072  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1073 }
1075 //*************************************************************************************************
1076 
1077 
1078 //*************************************************************************************************
1092 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1093  , typename ST1 // Type of the scalar of the left-hand side expression
1094  , typename VT2 // Type of the sparse vector of the right-hand side expression
1095  , typename ST2 > // Type of the scalar of the right-hand side expression
1096 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,true> >::Type
1097  operator*( const SVecScalarMultExpr<VT1,ST1,false>& lhs, const SVecScalarMultExpr<VT2,ST2,true>& rhs )
1098 {
1100 
1101  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1102 }
1104 //*************************************************************************************************
1105 
1106 
1107 //*************************************************************************************************
1121 template< typename MT // Type of the left-hand side dense matrix
1122  , bool SO // Storage order of the left-hand side dense matrix
1123  , typename VT // Type of the sparse vector of the right-hand side expression
1124  , typename ST > // Type of the scalar of the right-hand side expression
1125 inline const typename MultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >::Type
1126  operator*( const DenseMatrix<MT,SO>& mat, const SVecScalarMultExpr<VT,ST,false>& vec )
1127 {
1129 
1130  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1131 }
1133 //*************************************************************************************************
1134 
1135 
1136 //*************************************************************************************************
1150 template< typename VT // Type of the sparse vector of the left-hand side expression
1151  , typename ST // Type of the scalar of the left-hand side expression
1152  , typename MT // Type of the right-hand side dense matrix
1153  , bool SO > // Storage order of the right-hand side dense matrix
1154 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >::Type
1155  operator*( const SVecScalarMultExpr<VT,ST,true>& vec, const DenseMatrix<MT,SO>& mat )
1156 {
1158 
1159  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1160 }
1162 //*************************************************************************************************
1163 
1164 
1165 //*************************************************************************************************
1179 template< typename MT // Type of the left-hand side sparse matrix
1180  , bool SO // Storage order of the left-hand side sparse matrix
1181  , typename VT // Type of the sparse vector of the right-hand side expression
1182  , typename ST > // Type of the scalar of the right-hand side expression
1183 inline const typename MultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >::Type
1184  operator*( const SparseMatrix<MT,SO>& mat, const SVecScalarMultExpr<VT,ST,false>& vec )
1185 {
1187 
1188  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1189 }
1191 //*************************************************************************************************
1192 
1193 
1194 //*************************************************************************************************
1208 template< typename VT // Type of the sparse vector of the left-hand side expression
1209  , typename ST // Type of the scalar of the left-hand side expression
1210  , typename MT // Type of the right-hand side sparse matrix
1211  , bool SO > // Storage order of the right-hand side sparse matrix
1212 inline const typename MultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >::Type
1213  operator*( const SVecScalarMultExpr<VT,ST,true>& vec, const SparseMatrix<MT,SO>& mat )
1214 {
1216 
1217  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1218 }
1220 //*************************************************************************************************
1221 
1222 
1223 
1224 
1225 //=================================================================================================
1226 //
1227 // SVECSCALARMULTEXPRTRAIT SPECIALIZATIONS
1228 //
1229 //=================================================================================================
1230 
1231 //*************************************************************************************************
1233 template< typename VT, typename ST1, typename ST2 >
1234 struct SVecScalarMultExprTrait< SVecScalarMultExpr<VT,ST1,false>, ST2 >
1235 {
1236  public:
1237  //**********************************************************************************************
1238  typedef typename SelectType< IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1239  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1240  , typename SVecScalarMultExprTrait<VT,typename MultTrait<ST1,ST2>::Type>::Type
1241  , INVALID_TYPE >::Type Type;
1242  //**********************************************************************************************
1243 };
1245 //*************************************************************************************************
1246 
1247 
1248 
1249 
1250 //=================================================================================================
1251 //
1252 // TSVECSCALARMULTEXPRTRAIT SPECIALIZATIONS
1253 //
1254 //=================================================================================================
1255 
1256 //*************************************************************************************************
1258 template< typename VT, typename ST1, typename ST2 >
1259 struct TSVecScalarMultExprTrait< SVecScalarMultExpr<VT,ST1,true>, ST2 >
1260 {
1261  public:
1262  //**********************************************************************************************
1263  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1264  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1265  , typename TSVecScalarMultExprTrait<VT,typename MultTrait<ST1,ST2>::Type>::Type
1266  , INVALID_TYPE >::Type Type;
1267  //**********************************************************************************************
1268 };
1270 //*************************************************************************************************
1271 
1272 
1273 
1274 
1275 //=================================================================================================
1276 //
1277 // SVECSCALARDIVEXPRTRAIT SPECIALIZATIONS
1278 //
1279 //=================================================================================================
1280 
1281 //*************************************************************************************************
1283 template< typename VT, typename ST1, typename ST2 >
1284 struct SVecScalarDivExprTrait< SVecScalarMultExpr<VT,ST1,false>, ST2 >
1285 {
1286  private:
1287  //**********************************************************************************************
1288  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1289  //**********************************************************************************************
1290 
1291  //**********************************************************************************************
1292  typedef typename SVecScalarMultExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1293  typedef typename SVecScalarDivExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1294  //**********************************************************************************************
1295 
1296  public:
1297  //**********************************************************************************************
1298  typedef typename SelectType< IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1299  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1300  , typename SelectType<condition,T1,T2>::Type
1301  , INVALID_TYPE >::Type Type;
1302  //**********************************************************************************************
1303 };
1305 //*************************************************************************************************
1306 
1307 
1308 
1309 
1310 //=================================================================================================
1311 //
1312 // TSVECSCALARDIVEXPRTRAIT SPECIALIZATIONS
1313 //
1314 //=================================================================================================
1315 
1316 //*************************************************************************************************
1318 template< typename VT, typename ST1, typename ST2 >
1319 struct TSVecScalarDivExprTrait< SVecScalarMultExpr<VT,ST1,true>, ST2 >
1320 {
1321  private:
1322  //**********************************************************************************************
1323  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1324  //**********************************************************************************************
1325 
1326  //**********************************************************************************************
1327  typedef typename TSVecScalarMultExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1328  typedef typename TSVecScalarDivExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1329  //**********************************************************************************************
1330 
1331  public:
1332  //**********************************************************************************************
1333  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1334  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1335  , typename SelectType<condition,T1,T2>::Type
1336  , INVALID_TYPE >::Type Type;
1337  //**********************************************************************************************
1338 };
1340 //*************************************************************************************************
1341 
1342 
1343 
1344 
1345 //=================================================================================================
1346 //
1347 // DVECSVECMULTEXPRTRAIT SPECIALIZATIONS
1348 //
1349 //=================================================================================================
1350 
1351 //*************************************************************************************************
1353 template< typename VT1, typename VT2, typename ST >
1354 struct DVecSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,false> >
1355 {
1356  public:
1357  //**********************************************************************************************
1358  typedef typename SelectType< IsDenseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1359  IsSparseVector<VT2>::value && !IsTransposeVector<VT2>::value &&
1360  IsNumeric<ST>::value
1361  , typename SVecScalarMultExprTrait<typename DVecSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1362  , INVALID_TYPE >::Type Type;
1363  //**********************************************************************************************
1364 };
1366 //*************************************************************************************************
1367 
1368 
1369 
1370 
1371 //=================================================================================================
1372 //
1373 // DVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1374 //
1375 //=================================================================================================
1376 
1377 //*************************************************************************************************
1379 template< typename VT1, typename VT2, typename ST >
1380 struct DVecTSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >
1381 {
1382  public:
1383  //**********************************************************************************************
1384  typedef typename SelectType< IsDenseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1385  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1386  IsNumeric<ST>::value
1387  , typename SMatScalarMultExprTrait<typename DVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1388  , INVALID_TYPE >::Type Type;
1389  //**********************************************************************************************
1390 };
1392 //*************************************************************************************************
1393 
1394 
1395 
1396 
1397 //=================================================================================================
1398 //
1399 // TDVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1400 //
1401 //=================================================================================================
1402 
1403 //*************************************************************************************************
1405 template< typename VT1, typename VT2, typename ST >
1406 struct TDVecTSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >
1407 {
1408  public:
1409  //**********************************************************************************************
1410  typedef typename SelectType< IsDenseVector<VT1>::value && IsTransposeVector<VT1>::value &&
1411  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1412  IsNumeric<ST>::value
1413  , typename TSVecScalarMultExprTrait<typename TDVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1414  , INVALID_TYPE >::Type Type;
1415  //**********************************************************************************************
1416 };
1418 //*************************************************************************************************
1419 
1420 
1421 
1422 
1423 //=================================================================================================
1424 //
1425 // SVECDVECMULTEXPRTRAIT SPECIALIZATIONS
1426 //
1427 //=================================================================================================
1428 
1429 //*************************************************************************************************
1431 template< typename VT1, typename ST, typename VT2 >
1432 struct SVecDVecMultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >
1433 {
1434  public:
1435  //**********************************************************************************************
1436  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1437  IsDenseVector<VT2>::value && !IsTransposeVector<VT2>::value &&
1438  IsNumeric<ST>::value
1439  , typename SVecScalarMultExprTrait<typename SVecDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1440  , INVALID_TYPE >::Type Type;
1441  //**********************************************************************************************
1442 };
1444 //*************************************************************************************************
1445 
1446 
1447 
1448 
1449 //=================================================================================================
1450 //
1451 // SVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
1452 //
1453 //=================================================================================================
1454 
1455 //*************************************************************************************************
1457 template< typename VT1, typename ST, typename VT2 >
1458 struct SVecTDVecMultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >
1459 {
1460  public:
1461  //**********************************************************************************************
1462  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1463  IsDenseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1464  IsNumeric<ST>::value
1465  , typename TSMatScalarMultExprTrait<typename SVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1466  , INVALID_TYPE >::Type Type;
1467  //**********************************************************************************************
1468 };
1470 //*************************************************************************************************
1471 
1472 
1473 
1474 
1475 //=================================================================================================
1476 //
1477 // TSVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
1478 //
1479 //=================================================================================================
1480 
1481 //*************************************************************************************************
1483 template< typename VT1, typename ST, typename VT2 >
1484 struct TSVecTDVecMultExprTrait< SVecScalarMultExpr<VT1,ST,true>, VT2 >
1485 {
1486  public:
1487  //**********************************************************************************************
1488  typedef typename SelectType< IsSparseVector<VT1>::value && IsTransposeVector<VT1>::value &&
1489  IsDenseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1490  IsNumeric<ST>::value
1491  , typename TSVecScalarMultExprTrait<typename TSVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1492  , INVALID_TYPE >::Type Type;
1493  //**********************************************************************************************
1494 };
1496 //*************************************************************************************************
1497 
1498 
1499 
1500 
1501 //=================================================================================================
1502 //
1503 // SVECSVECMULTEXPRTRAIT SPECIALIZATIONS
1504 //
1505 //=================================================================================================
1506 
1507 //*************************************************************************************************
1509 template< typename VT1, typename ST, typename VT2 >
1510 struct SVecSVecMultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >
1511 {
1512  public:
1513  //**********************************************************************************************
1514  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1515  IsSparseVector<VT2>::value && !IsTransposeVector<VT2>::value &&
1516  IsNumeric<ST>::value
1517  , typename SVecScalarMultExprTrait<typename SVecSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1518  , INVALID_TYPE >::Type Type;
1519  //**********************************************************************************************
1520 };
1522 //*************************************************************************************************
1523 
1524 
1525 //*************************************************************************************************
1527 template< typename VT1, typename VT2, typename ST >
1528 struct SVecSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,false> >
1529 {
1530  public:
1531  //**********************************************************************************************
1532  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1533  IsSparseVector<VT2>::value && !IsTransposeVector<VT2>::value &&
1534  IsNumeric<ST>::value
1535  , typename SVecScalarMultExprTrait<typename SVecSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1536  , INVALID_TYPE >::Type Type;
1537  //**********************************************************************************************
1538 };
1540 //*************************************************************************************************
1541 
1542 
1543 //*************************************************************************************************
1545 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1546 struct SVecSVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,false> >
1547 {
1548  public:
1549  //**********************************************************************************************
1550  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1551  IsSparseVector<VT2>::value && !IsTransposeVector<VT2>::value &&
1552  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1553  , typename SVecScalarMultExprTrait<typename SVecSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1554  , INVALID_TYPE >::Type Type;
1555  //**********************************************************************************************
1556 };
1558 //*************************************************************************************************
1559 
1560 
1561 
1562 
1563 //=================================================================================================
1564 //
1565 // SVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1566 //
1567 //=================================================================================================
1568 
1569 //*************************************************************************************************
1571 template< typename VT1, typename ST, typename VT2 >
1572 struct SVecTSVecMultExprTrait< SVecScalarMultExpr<VT1,ST,false>, VT2 >
1573 {
1574  public:
1575  //**********************************************************************************************
1576  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1577  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1578  IsNumeric<ST>::value
1579  , typename SMatScalarMultExprTrait<typename SVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1580  , INVALID_TYPE >::Type Type;
1581  //**********************************************************************************************
1582 };
1584 //*************************************************************************************************
1585 
1586 
1587 //*************************************************************************************************
1589 template< typename VT1, typename VT2, typename ST >
1590 struct SVecTSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >
1591 {
1592  public:
1593  //**********************************************************************************************
1594  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1595  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1596  IsNumeric<ST>::value
1597  , typename SMatScalarMultExprTrait<typename SVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1598  , INVALID_TYPE >::Type Type;
1599  //**********************************************************************************************
1600 };
1602 //*************************************************************************************************
1603 
1604 
1605 //*************************************************************************************************
1607 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1608 struct SVecTSVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,true> >
1609 {
1610  public:
1611  //**********************************************************************************************
1612  typedef typename SelectType< IsSparseVector<VT1>::value && !IsTransposeVector<VT1>::value &&
1613  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1614  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1615  , typename SMatScalarMultExprTrait<typename SVecTSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1616  , INVALID_TYPE >::Type Type;
1617  //**********************************************************************************************
1618 };
1620 //*************************************************************************************************
1621 
1622 
1623 
1624 
1625 //=================================================================================================
1626 //
1627 // TSVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1628 //
1629 //=================================================================================================
1630 
1631 //*************************************************************************************************
1633 template< typename VT1, typename ST, typename VT2 >
1634 struct TSVecTSVecMultExprTrait< SVecScalarMultExpr<VT1,ST,true>, VT2 >
1635 {
1636  public:
1637  //**********************************************************************************************
1638  typedef typename SelectType< IsSparseVector<VT1>::value && IsTransposeVector<VT1>::value &&
1639  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1640  IsNumeric<ST>::value
1641  , typename TSVecScalarMultExprTrait<typename TSVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1642  , INVALID_TYPE >::Type Type;
1643  //**********************************************************************************************
1644 };
1646 //*************************************************************************************************
1647 
1648 
1649 //*************************************************************************************************
1651 template< typename VT1, typename VT2, typename ST >
1652 struct TSVecTSVecMultExprTrait< VT1, SVecScalarMultExpr<VT2,ST,true> >
1653 {
1654  public:
1655  //**********************************************************************************************
1656  typedef typename SelectType< IsSparseVector<VT1>::value && IsTransposeVector<VT1>::value &&
1657  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1658  IsNumeric<ST>::value
1659  , typename TSVecScalarMultExprTrait<typename TSVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1660  , INVALID_TYPE >::Type Type;
1661  //**********************************************************************************************
1662 };
1664 //*************************************************************************************************
1665 
1666 
1667 //*************************************************************************************************
1669 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1670 struct TSVecTSVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,true>, SVecScalarMultExpr<VT2,ST2,true> >
1671 {
1672  public:
1673  //**********************************************************************************************
1674  typedef typename SelectType< IsSparseVector<VT1>::value && IsTransposeVector<VT1>::value &&
1675  IsSparseVector<VT2>::value && IsTransposeVector<VT2>::value &&
1676  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1677  , typename TSVecScalarMultExprTrait<typename TSVecTSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1678  , INVALID_TYPE >::Type Type;
1679  //**********************************************************************************************
1680 };
1682 //*************************************************************************************************
1683 
1684 
1685 
1686 
1687 //=================================================================================================
1688 //
1689 // DMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1690 //
1691 //=================================================================================================
1692 
1693 //*************************************************************************************************
1695 template< typename MT, typename VT, typename ST >
1696 struct DMatSVecMultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >
1697 {
1698  public:
1699  //**********************************************************************************************
1700  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1701  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1702  IsNumeric<ST>::value
1703  , typename DVecScalarMultExprTrait<typename DMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1704  , INVALID_TYPE >::Type Type;
1705  //**********************************************************************************************
1706 };
1708 //*************************************************************************************************
1709 
1710 
1711 
1712 
1713 //=================================================================================================
1714 //
1715 // TDMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1716 //
1717 //=================================================================================================
1718 
1719 //*************************************************************************************************
1721 template< typename MT, typename VT, typename ST >
1722 struct TDMatSVecMultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >
1723 {
1724  public:
1725  //**********************************************************************************************
1726  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1727  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1728  IsNumeric<ST>::value
1729  , typename DVecScalarMultExprTrait<typename TDMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1730  , INVALID_TYPE >::Type Type;
1731  //**********************************************************************************************
1732 };
1734 //*************************************************************************************************
1735 
1736 
1737 
1738 
1739 //=================================================================================================
1740 //
1741 // TSVECDMATMULTEXPRTRAIT SPECIALIZATIONS
1742 //
1743 //=================================================================================================
1744 
1745 //*************************************************************************************************
1747 template< typename VT, typename ST, typename MT >
1748 struct TSVecDMatMultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >
1749 {
1750  public:
1751  //**********************************************************************************************
1752  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1753  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1754  IsNumeric<ST>::value
1755  , typename TDVecScalarMultExprTrait<typename TSVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
1756  , INVALID_TYPE >::Type Type;
1757  //**********************************************************************************************
1758 };
1760 //*************************************************************************************************
1761 
1762 
1763 
1764 
1765 //=================================================================================================
1766 //
1767 // TSVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
1768 //
1769 //=================================================================================================
1770 
1771 //*************************************************************************************************
1773 template< typename VT, typename ST, typename MT >
1774 struct TSVecTDMatMultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >
1775 {
1776  public:
1777  //**********************************************************************************************
1778  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1779  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1780  IsNumeric<ST>::value
1781  , typename TDVecScalarMultExprTrait<typename TSVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
1782  , INVALID_TYPE >::Type Type;
1783  //**********************************************************************************************
1784 };
1786 //*************************************************************************************************
1787 
1788 
1789 
1790 
1791 //=================================================================================================
1792 //
1793 // SMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1794 //
1795 //=================================================================================================
1796 
1797 //*************************************************************************************************
1799 template< typename MT, typename VT, typename ST >
1800 struct SMatSVecMultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >
1801 {
1802  public:
1803  //**********************************************************************************************
1804  typedef typename SelectType< IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1805  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1806  IsNumeric<ST>::value
1807  , typename SVecScalarMultExprTrait<typename SMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1808  , INVALID_TYPE >::Type Type;
1809  //**********************************************************************************************
1810 };
1812 //*************************************************************************************************
1813 
1814 
1815 
1816 
1817 //=================================================================================================
1818 //
1819 // TSMATSVECMULTEXPRTRAIT SPECIALIZATIONS
1820 //
1821 //=================================================================================================
1822 
1823 //*************************************************************************************************
1825 template< typename MT, typename VT, typename ST >
1826 struct TSMatSVecMultExprTrait< MT, SVecScalarMultExpr<VT,ST,false> >
1827 {
1828  public:
1829  //**********************************************************************************************
1830  typedef typename SelectType< IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1831  IsSparseVector<VT>::value && !IsTransposeVector<VT>::value &&
1832  IsNumeric<ST>::value
1833  , typename SVecScalarMultExprTrait<typename TSMatSVecMultExprTrait<MT,VT>::Type,ST>::Type
1834  , INVALID_TYPE >::Type Type;
1835  //**********************************************************************************************
1836 };
1838 //*************************************************************************************************
1839 
1840 
1841 
1842 
1843 //=================================================================================================
1844 //
1845 // TSVECSMATMULTEXPRTRAIT SPECIALIZATIONS
1846 //
1847 //=================================================================================================
1848 
1849 //*************************************************************************************************
1851 template< typename VT, typename ST, typename MT >
1852 struct TSVecSMatMultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >
1853 {
1854  public:
1855  //**********************************************************************************************
1856  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1857  IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
1858  IsNumeric<ST>::value
1859  , typename TSVecScalarMultExprTrait<typename TSVecSMatMultExprTrait<VT,MT>::Type,ST>::Type
1860  , INVALID_TYPE >::Type Type;
1861  //**********************************************************************************************
1862 };
1864 //*************************************************************************************************
1865 
1866 
1867 
1868 
1869 //=================================================================================================
1870 //
1871 // TSVECTSMATMULTEXPRTRAIT SPECIALIZATIONS
1872 //
1873 //=================================================================================================
1874 
1875 //*************************************************************************************************
1877 template< typename VT, typename ST, typename MT >
1878 struct TSVecTSMatMultExprTrait< SVecScalarMultExpr<VT,ST,true>, MT >
1879 {
1880  public:
1881  //**********************************************************************************************
1882  typedef typename SelectType< IsSparseVector<VT>::value && IsTransposeVector<VT>::value &&
1883  IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
1884  IsNumeric<ST>::value
1885  , typename TSVecScalarMultExprTrait<typename TSVecTSMatMultExprTrait<VT,MT>::Type,ST>::Type
1886  , INVALID_TYPE >::Type Type;
1887  //**********************************************************************************************
1888 };
1890 //*************************************************************************************************
1891 
1892 } // namespace blaze
1893 
1894 #endif