All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DVecScalarMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECSCALARMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DVECSCALARMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
53 #include <blaze/math/Intrinsics.h>
72 #include <blaze/util/Assert.h>
77 #include <blaze/util/EnableIf.h>
78 #include <blaze/util/InvalidType.h>
80 #include <blaze/util/SelectType.h>
81 #include <blaze/util/Types.h>
85 
86 
87 namespace blaze {
88 
89 //=================================================================================================
90 //
91 // CLASS DVECSCALARMULTEXPR
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
102 template< typename VT // Type of the left-hand side dense vector
103  , typename ST // Type of the right-hand side scalar value
104  , bool TF > // Transpose flag
105 class DVecScalarMultExpr : public DenseVector< DVecScalarMultExpr<VT,ST,TF>, TF >
106  , private VecScalarMultExpr
107  , private Computation
108 {
109  private:
110  //**Type definitions****************************************************************************
111  typedef typename VT::ResultType RT;
112  typedef typename VT::ReturnType RN;
113  typedef typename VT::ElementType ET;
114  typedef typename VT::CompositeType CT;
115  //**********************************************************************************************
116 
117  //**Return type evaluation**********************************************************************
119 
124  enum { returnExpr = !IsTemporary<RN>::value };
125 
128  //**********************************************************************************************
129 
130  //**Evaluation strategy*************************************************************************
132 
138  enum { useAssign = RequiresEvaluation<VT>::value };
139 
141  template< typename VT2 >
143  struct UseAssign {
144  enum { value = useAssign };
145  };
147  //**********************************************************************************************
148 
149  public:
150  //**Type definitions****************************************************************************
156 
159 
162 
164  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type LeftOperand;
165 
167  typedef ST RightOperand;
168  //**********************************************************************************************
169 
170  //**ConstIterator class definition**************************************************************
174  {
175  public:
176  //**Type definitions*************************************************************************
177  typedef std::random_access_iterator_tag IteratorCategory;
182 
183  // STL iterator requirements
189 
191  typedef typename VT::ConstIterator IteratorType;
192  //*******************************************************************************************
193 
194  //**Constructor******************************************************************************
200  explicit inline ConstIterator( IteratorType iterator, RightOperand scalar )
201  : iterator_( iterator ) // Iterator to the current element
202  , scalar_ ( scalar ) // Scalar of the multiplication expression
203  {}
204  //*******************************************************************************************
205 
206  //**Addition assignment operator*************************************************************
212  inline ConstIterator& operator+=( size_t inc ) {
213  iterator_ += inc;
214  return *this;
215  }
216  //*******************************************************************************************
217 
218  //**Subtraction assignment operator**********************************************************
224  inline ConstIterator& operator-=( size_t dec ) {
225  iterator_ -= dec;
226  return *this;
227  }
228  //*******************************************************************************************
229 
230  //**Prefix increment operator****************************************************************
236  ++iterator_;
237  return *this;
238  }
239  //*******************************************************************************************
240 
241  //**Postfix increment operator***************************************************************
246  inline const ConstIterator operator++( int ) {
247  return ConstIterator( iterator_++ );
248  }
249  //*******************************************************************************************
250 
251  //**Prefix decrement operator****************************************************************
257  --iterator_;
258  return *this;
259  }
260  //*******************************************************************************************
261 
262  //**Postfix decrement operator***************************************************************
267  inline const ConstIterator operator--( int ) {
268  return ConstIterator( iterator_-- );
269  }
270  //*******************************************************************************************
271 
272  //**Element access operator******************************************************************
277  inline ReturnType operator*() const {
278  return *iterator_ * scalar_;
279  }
280  //*******************************************************************************************
281 
282  //**Load function****************************************************************************
287  inline IntrinsicType load() const {
288  return iterator_.load() * set( scalar_ );
289  }
290  //*******************************************************************************************
291 
292  //**Equality operator************************************************************************
298  inline bool operator==( const ConstIterator& rhs ) const {
299  return iterator_ == rhs.iterator_;
300  }
301  //*******************************************************************************************
302 
303  //**Inequality operator**********************************************************************
309  inline bool operator!=( const ConstIterator& rhs ) const {
310  return iterator_ != rhs.iterator_;
311  }
312  //*******************************************************************************************
313 
314  //**Less-than operator***********************************************************************
320  inline bool operator<( const ConstIterator& rhs ) const {
321  return iterator_ < rhs.iterator_;
322  }
323  //*******************************************************************************************
324 
325  //**Greater-than operator********************************************************************
331  inline bool operator>( const ConstIterator& rhs ) const {
332  return iterator_ > rhs.iterator_;
333  }
334  //*******************************************************************************************
335 
336  //**Less-or-equal-than operator**************************************************************
342  inline bool operator<=( const ConstIterator& rhs ) const {
343  return iterator_ <= rhs.iterator_;
344  }
345  //*******************************************************************************************
346 
347  //**Greater-or-equal-than operator***********************************************************
353  inline bool operator>=( const ConstIterator& rhs ) const {
354  return iterator_ >= rhs.iterator_;
355  }
356  //*******************************************************************************************
357 
358  //**Subtraction operator*********************************************************************
364  inline DifferenceType operator-( const ConstIterator& rhs ) const {
365  return iterator_ - rhs.iterator_;
366  }
367  //*******************************************************************************************
368 
369  //**Addition operator************************************************************************
376  friend inline const ConstIterator operator+( const ConstIterator& it, size_t inc ) {
377  return ConstIterator( it.iterator_ + inc );
378  }
379  //*******************************************************************************************
380 
381  //**Addition operator************************************************************************
388  friend inline const ConstIterator operator+( size_t inc, const ConstIterator& it ) {
389  return ConstIterator( it.iterator_ + inc );
390  }
391  //*******************************************************************************************
392 
393  //**Subtraction operator*********************************************************************
400  friend inline const ConstIterator operator-( const ConstIterator& it, size_t dec ) {
401  return ConstIterator( it.iterator_ - dec );
402  }
403  //*******************************************************************************************
404 
405  private:
406  //**Member variables*************************************************************************
409  //*******************************************************************************************
410  };
411  //**********************************************************************************************
412 
413  //**Compilation flags***************************************************************************
415  enum { vectorizable = VT::vectorizable &&
418 
420  enum { smpAssignable = 0 };
421  //**********************************************************************************************
422 
423  //**Constructor*********************************************************************************
429  explicit inline DVecScalarMultExpr( const VT& vector, ST scalar )
430  : vector_( vector ) // Left-hand side dense vector of the multiplication expression
431  , scalar_( scalar ) // Right-hand side scalar of the multiplication expression
432  {}
433  //**********************************************************************************************
434 
435  //**Subscript operator**************************************************************************
441  inline ReturnType operator[]( size_t index ) const {
442  BLAZE_INTERNAL_ASSERT( index < vector_.size(), "Invalid vector access index" );
443  return vector_[index] * scalar_;
444  }
445  //**********************************************************************************************
446 
447  //**Load function*******************************************************************************
453  inline IntrinsicType load( size_t index ) const {
454  typedef IntrinsicTrait<ElementType> IT;
455  BLAZE_INTERNAL_ASSERT( index < vector_.size() , "Invalid vector access index" );
456  BLAZE_INTERNAL_ASSERT( index % IT::size == 0UL, "Invalid vector access index" );
457  const IntrinsicType xmm1( vector_.load( index ) );
458  const IntrinsicType xmm2( set( scalar_ ) );
459  return xmm1 * xmm2;
460  }
461  //**********************************************************************************************
462 
463  //**Begin function******************************************************************************
468  inline ConstIterator begin() const {
469  return ConstIterator( vector_.begin(), scalar_ );
470  }
471  //**********************************************************************************************
472 
473  //**End function********************************************************************************
478  inline ConstIterator end() const {
479  return ConstIterator( vector_.end(), scalar_ );
480  }
481  //**********************************************************************************************
482 
483  //**Size function*******************************************************************************
488  inline size_t size() const {
489  return vector_.size();
490  }
491  //**********************************************************************************************
492 
493  //**Left operand access*************************************************************************
498  inline LeftOperand leftOperand() const {
499  return vector_;
500  }
501  //**********************************************************************************************
502 
503  //**Right operand access************************************************************************
508  inline RightOperand rightOperand() const {
509  return scalar_;
510  }
511  //**********************************************************************************************
512 
513  //**********************************************************************************************
519  template< typename T >
520  inline bool canAlias( const T* alias ) const {
521  return IsComputation<VT>::value && vector_.canAlias( alias );
522  }
523  //**********************************************************************************************
524 
525  //**********************************************************************************************
531  template< typename T >
532  inline bool isAliased( const T* alias ) const {
533  return vector_.isAliased( alias );
534  }
535  //**********************************************************************************************
536 
537  private:
538  //**Member variables****************************************************************************
541  //**********************************************************************************************
542 
543  //**Assignment to dense vectors*****************************************************************
557  template< typename VT2 > // Type of the target dense vector
558  friend inline typename EnableIf< UseAssign<VT2> >::Type
559  assign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
560  {
562 
563  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
564 
565  assign( ~lhs, rhs.vector_ );
566  (~lhs) *= rhs.scalar_;
567  }
569  //**********************************************************************************************
570 
571  //**Assignment to sparse vectors****************************************************************
585  template< typename VT2 > // Type of the target sparse vector
586  friend inline typename EnableIf< UseAssign<VT2> >::Type
588  {
590 
591  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
592 
593  assign( ~lhs, rhs.vector_ );
594  (~lhs) *= rhs.scalar_;
595  }
597  //**********************************************************************************************
598 
599  //**Addition assignment to dense vectors********************************************************
613  template< typename VT2 > // Type of the target dense vector
614  friend inline typename EnableIf< UseAssign<VT2> >::Type
615  addAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
616  {
618 
622 
623  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
624 
625  const ResultType tmp( rhs );
626  addAssign( ~lhs, tmp );
627  }
629  //**********************************************************************************************
630 
631  //**Addition assignment to sparse vectors*******************************************************
632  // No special implementation for the addition assignment to sparse vectors.
633  //**********************************************************************************************
634 
635  //**Subtraction assignment to dense vectors*****************************************************
649  template< typename VT2 > // Type of the target dense vector
650  friend inline typename EnableIf< UseAssign<VT2> >::Type
651  subAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
652  {
654 
658 
659  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
660 
661  const ResultType tmp( rhs );
662  subAssign( ~lhs, tmp );
663  }
665  //**********************************************************************************************
666 
667  //**Subtraction assignment to sparse vectors****************************************************
668  // No special implementation for the subtraction assignment to sparse vectors.
669  //**********************************************************************************************
670 
671  //**Multiplication assignment to dense vectors**************************************************
685  template< typename VT2 > // Type of the target dense vector
686  friend inline typename EnableIf< UseAssign<VT2> >::Type
687  multAssign( DenseVector<VT2,TF>& lhs, const DVecScalarMultExpr& rhs )
688  {
690 
694 
695  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
696 
697  const ResultType tmp( rhs );
698  multAssign( ~lhs, tmp );
699  }
701  //**********************************************************************************************
702 
703  //**Multiplication assignment to sparse vectors*************************************************
704  // No special implementation for the multiplication assignment to sparse vectors.
705  //**********************************************************************************************
706 
707  //**Compile time checks*************************************************************************
714  //**********************************************************************************************
715 };
716 //*************************************************************************************************
717 
718 
719 
720 
721 //=================================================================================================
722 //
723 // GLOBAL UNARY ARITHMETIC OPERATORS
724 //
725 //=================================================================================================
726 
727 //*************************************************************************************************
744 template< typename VT // Type of the dense vector
745  , bool TF > // Transpose flag
746 inline const DVecScalarMultExpr<VT,typename BaseElementType<VT>::Type,TF>
748 {
750 
751  typedef typename BaseElementType<VT>::Type ElementType;
753 }
754 //*************************************************************************************************
755 
756 
757 
758 
759 //=================================================================================================
760 //
761 // GLOBAL BINARY ARITHMETIC OPERATORS
762 //
763 //=================================================================================================
764 
765 //*************************************************************************************************
787 template< typename T1 // Type of the left-hand side dense vector
788  , typename T2 // Type of the right-hand side scalar
789  , bool TF > // Transpose flag
790 inline const typename EnableIf< IsNumeric<T2>, typename MultExprTrait<T1,T2>::Type >::Type
791  operator*( const DenseVector<T1,TF>& vec, T2 scalar )
792 {
794 
795  typedef typename MultExprTrait<T1,T2>::Type Type;
796  return Type( ~vec, scalar );
797 }
798 //*************************************************************************************************
799 
800 
801 //*************************************************************************************************
823 template< typename T1 // Type of the left-hand side scalar
824  , typename T2 // Type of the right-hand side dense vector
825  , bool TF > // Transpose flag
826 inline const typename EnableIf< IsNumeric<T1>, typename MultExprTrait<T1,T2>::Type >::Type
827  operator*( T1 scalar, const DenseVector<T2,TF>& vec )
828 {
830 
831  typedef typename MultExprTrait<T1,T2>::Type Type;
832  return Type( ~vec, scalar );
833 }
834 //*************************************************************************************************
835 
836 
837 
838 
839 //=================================================================================================
840 //
841 // GLOBAL FUNCTIONS
842 //
843 //=================================================================================================
844 
845 //*************************************************************************************************
863 template< typename VT // Type of the dense vector
864  , bool TF > // Transpose flag
865 inline const DVecScalarMultExpr<VT,typename VT::ElementType,TF>
867 {
868  typedef typename VT::ElementType ElementType;
869 
871 
872  const ElementType len ( length( ~vec ) );
873  const ElementType ilen( ( len != ElementType(0) )?( ElementType(1) / len ):( 0 ) );
874 
875  return DVecScalarMultExpr<VT,ElementType,TF>( ~vec, ilen );
876 }
877 //*************************************************************************************************
878 
879 
880 
881 
882 //=================================================================================================
883 //
884 // GLOBAL RESTRUCTURING UNARY ARITHMETIC OPERATORS
885 //
886 //=================================================================================================
887 
888 //*************************************************************************************************
900 template< typename VT // Type of the dense vector
901  , typename ST // Type of the scalar
902  , bool TF > // Transpose flag
903 inline const DVecScalarMultExpr<VT,ST,TF>
904  operator-( const DVecScalarMultExpr<VT,ST,TF>& dv )
905 {
907 
908  return DVecScalarMultExpr<VT,ST,TF>( dv.leftOperand(), -dv.rightOperand() );
909 }
911 //*************************************************************************************************
912 
913 
914 
915 
916 //=================================================================================================
917 //
918 // GLOBAL RESTRUCTURING BINARY ARITHMETIC OPERATORS
919 //
920 //=================================================================================================
921 
922 //*************************************************************************************************
935 template< typename VT // Type of the dense vector of the left-hand side expression
936  , typename ST1 // Type of the scalar of the left-hand side expression
937  , bool TF // Transpose flag of the dense vector
938  , typename ST2 > // Type of the right-hand side scalar
939 inline const typename EnableIf< IsNumeric<ST2>
940  , typename MultExprTrait< DVecScalarMultExpr<VT,ST1,TF>, ST2 >::Type >::Type
941  operator*( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
942 {
944 
945  return vec.leftOperand() * ( vec.rightOperand() * scalar );
946 }
948 //*************************************************************************************************
949 
950 
951 //*************************************************************************************************
964 template< typename ST1 // Type of the left-hand side scalar
965  , typename VT // Type of the dense vector of the right-hand side expression
966  , typename ST2 // Type of the scalar of the right-hand side expression
967  , bool TF > // Transpose flag of the dense vector
968 inline const typename EnableIf< IsNumeric<ST1>
969  , typename MultExprTrait< ST1, DVecScalarMultExpr<VT,ST2,TF> >::Type >::Type
970  operator*( ST1 scalar, const DVecScalarMultExpr<VT,ST2,TF>& vec )
971 {
973 
974  return vec.leftOperand() * ( scalar * vec.rightOperand() );
975 }
977 //*************************************************************************************************
978 
979 
980 //*************************************************************************************************
993 template< typename VT // Type of the dense vector of the left-hand side expression
994  , typename ST1 // Type of the scalar of the left-hand side expression
995  , bool TF // Transpose flag of the dense vector
996  , typename ST2 > // Type of the right-hand side scalar
997 inline const typename EnableIf< IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>
998  , typename DivExprTrait< DVecScalarMultExpr<VT,ST1,TF>, ST2 >::Type >::Type
999  operator/( const DVecScalarMultExpr<VT,ST1,TF>& vec, ST2 scalar )
1000 {
1002 
1003  return vec.leftOperand() * ( vec.rightOperand() / scalar );
1004 }
1006 //*************************************************************************************************
1007 
1008 
1009 //*************************************************************************************************
1023 template< typename VT1 // Type of the dense vector of the left-hand side expression
1024  , typename ST // Type of the scalar of the left-hand side expression
1025  , bool TF // Transpose flag of the dense vectors
1026  , typename VT2 > // Type of the right-hand side dense vector
1027 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST,TF>, VT2 >::Type
1028  operator*( const DVecScalarMultExpr<VT1,ST,TF>& lhs, const DenseVector<VT2,TF>& rhs )
1029 {
1031 
1032  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1033 }
1035 //*************************************************************************************************
1036 
1037 
1038 //*************************************************************************************************
1052 template< typename VT1 // Type of the left-hand side dense vector
1053  , bool TF // Transpose flag of the dense vectors
1054  , typename VT2 // Type of the dense vector of the right-hand side expression
1055  , typename ST > // Type of the scalar of the right-hand side expression
1056 inline const typename MultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,TF> >::Type
1057  operator*( const DenseVector<VT1,TF>& lhs, const DVecScalarMultExpr<VT2,ST,TF>& rhs )
1058 {
1060 
1061  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1062 }
1064 //*************************************************************************************************
1065 
1066 
1067 //*************************************************************************************************
1081 template< typename VT1 // Type of the dense vector of the left-hand side expression
1082  , typename ST1 // Type of the scalar of the left-hand side expression
1083  , bool TF // Transpose flag of the dense vectors
1084  , typename VT2 // Type of the dense vector of the right-hand side expression
1085  , typename ST2 > // Type of the scalar of the right-hand side expression
1086 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST1,TF>, DVecScalarMultExpr<VT2,ST2,TF> >::Type
1087  operator*( const DVecScalarMultExpr<VT1,ST1,TF>& lhs, const DVecScalarMultExpr<VT2,ST2,TF>& rhs )
1088 {
1090 
1091  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1092 }
1094 //*************************************************************************************************
1095 
1096 
1097 //*************************************************************************************************
1111 template< typename VT1 // Type of the dense vector of the left-hand side expression
1112  , typename ST // Type of the scalar of the left-hand side expression
1113  , typename VT2 > // Type of the right-hand side dense vector
1114 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >::Type
1115  operator*( const DVecScalarMultExpr<VT1,ST,false>& lhs, const DenseVector<VT2,true>& rhs )
1116 {
1118 
1119  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1120 }
1122 //*************************************************************************************************
1123 
1124 
1125 //*************************************************************************************************
1139 template< typename VT1 // Type of the left-hand side dense vector
1140  , typename VT2 // Type of the dense vector of the right-hand side expression
1141  , typename ST > // Type of the scalar of the right-hand side expression
1142 inline const typename MultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >::Type
1143  operator*( const DenseVector<VT1,false>& lhs, const DVecScalarMultExpr<VT2,ST,true>& rhs )
1144 {
1146 
1147  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1148 }
1150 //*************************************************************************************************
1151 
1152 
1153 //*************************************************************************************************
1167 template< typename VT1 // Type of the dense vector of the left-hand side expression
1168  , typename ST1 // Type of the scalar of the left-hand side expression
1169  , typename VT2 // Type of the dense vector of the right-hand side expression
1170  , typename ST2 > // Type of the scalar of the right-hand side expression
1171 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,true> >::Type
1172  operator*( const DVecScalarMultExpr<VT1,ST1,false>& lhs, const DVecScalarMultExpr<VT2,ST2,true>& rhs )
1173 {
1175 
1176  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1177 }
1179 //*************************************************************************************************
1180 
1181 
1182 //*************************************************************************************************
1196 template< typename VT1 // Type of the dense vector of the left-hand side expression
1197  , typename ST // Type of the scalar of the left-hand side expression
1198  , bool TF // Transpose flag of the vectors
1199  , typename VT2 > // Type of the right-hand side sparse vector
1200 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST,TF>, VT2 >::Type
1201  operator*( const DVecScalarMultExpr<VT1,ST,TF>& lhs, const SparseVector<VT2,TF>& rhs )
1202 {
1204 
1205  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1206 }
1208 //*************************************************************************************************
1209 
1210 
1211 //*************************************************************************************************
1225 template< typename VT1 // Type of the left-hand side sparse vector
1226  , bool TF // Transpose flag of the vectors
1227  , typename VT2 // Type of the dense vector of the right-hand side expression
1228  , typename ST > // Type of the scalar of the right-hand side expression
1229 inline const typename MultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,TF> >::Type
1230  operator*( const SparseVector<VT1,TF>& lhs, const DVecScalarMultExpr<VT2,ST,TF>& rhs )
1231 {
1233 
1234  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1235 }
1237 //*************************************************************************************************
1238 
1239 
1240 //*************************************************************************************************
1255 template< typename VT1 // Type of the dense vector of the left-hand side expression
1256  , typename ST1 // Type of the scalar of the left-hand side expression
1257  , bool TF // Transpose flag of the vectors
1258  , typename VT2 // Type of the sparse vector of the right-hand side expression
1259  , typename ST2 > // Type of the scalar o the right-hand side expression
1260 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST1,TF>, SVecScalarMultExpr<VT2,ST2,TF> >::Type
1261  operator*( const DVecScalarMultExpr<VT1,ST1,TF>& lhs, const SVecScalarMultExpr<VT2,ST2,TF>& rhs )
1262 {
1264 
1265  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1266 }
1268 //*************************************************************************************************
1269 
1270 
1271 //*************************************************************************************************
1286 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1287  , typename ST1 // Type of the scalar of the left-hand side expression
1288  , bool TF // Transpose flag of the vectors
1289  , typename VT2 // Type of the dense vector of the right-hand side expression
1290  , typename ST2 > // Type of the scalar o the right-hand side expression
1291 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST1,TF>, DVecScalarMultExpr<VT2,ST2,TF> >::Type
1292  operator*( const SVecScalarMultExpr<VT1,ST1,TF>& lhs, const DVecScalarMultExpr<VT2,ST2,TF>& rhs )
1293 {
1295 
1296  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1297 }
1299 //*************************************************************************************************
1300 
1301 
1302 //*************************************************************************************************
1316 template< typename VT1 // Type of the dense vector of the left-hand side expression
1317  , typename ST // Type of the scalar of the left-hand side expression
1318  , typename VT2 > // Type of the right-hand side sparse vector
1319 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >::Type
1320  operator*( const DVecScalarMultExpr<VT1,ST,false>& lhs, const SparseVector<VT2,true>& rhs )
1321 {
1323 
1324  return ( lhs.leftOperand() * (~rhs) ) * lhs.rightOperand();
1325 }
1327 //*************************************************************************************************
1328 
1329 
1330 //*************************************************************************************************
1344 template< typename VT1 // Type of the left-hand side sparse vector
1345  , typename VT2 // Type of the dense vector of the right-hand side expression
1346  , typename ST > // Type of the scalar of the right-hand side expression
1347 inline const typename MultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >::Type
1348  operator*( const SparseVector<VT1,false>& lhs, const DVecScalarMultExpr<VT2,ST,true>& rhs )
1349 {
1351 
1352  return ( (~lhs) * rhs.leftOperand() ) * rhs.rightOperand();
1353 }
1355 //*************************************************************************************************
1356 
1357 
1358 //*************************************************************************************************
1373 template< typename VT1 // Type of the dense vector of the left-hand side expression
1374  , typename ST1 // Type of the scalar of the left-hand side expression
1375  , typename VT2 // Type of the sparse vector of the right-hand side expression
1376  , typename ST2 > // Type of the scalar o the right-hand side expression
1377 inline const typename MultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,true> >::Type
1378  operator*( const DVecScalarMultExpr<VT1,ST1,false>& lhs, const SVecScalarMultExpr<VT2,ST2,true>& rhs )
1379 {
1381 
1382  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1383 }
1385 //*************************************************************************************************
1386 
1387 
1388 //*************************************************************************************************
1403 template< typename VT1 // Type of the sparse vector of the left-hand side expression
1404  , typename ST1 // Type of the scalar of the left-hand side expression
1405  , typename VT2 // Type of the dense vector of the right-hand side expression
1406  , typename ST2 > // Type of the scalar o the right-hand side expression
1407 inline const typename MultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,true> >::Type
1408  operator*( const SVecScalarMultExpr<VT1,ST1,false>& lhs, const DVecScalarMultExpr<VT2,ST2,true>& rhs )
1409 {
1411 
1412  return ( lhs.leftOperand() * rhs.leftOperand() ) * ( lhs.rightOperand() * rhs.rightOperand() );
1413 }
1415 //*************************************************************************************************
1416 
1417 
1418 //*************************************************************************************************
1432 template< typename MT // Type of the left-hand side dense matrix
1433  , bool SO // Storage order of the left-hand side dense matrix
1434  , typename VT // Type of the dense vector of the right-hand side expression
1435  , typename ST > // Type of the scalar of the right-hand side expression
1436 inline const typename MultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >::Type
1437  operator*( const DenseMatrix<MT,SO>& mat, const DVecScalarMultExpr<VT,ST,false>& vec )
1438 {
1440 
1441  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1442 }
1444 //*************************************************************************************************
1445 
1446 
1447 //*************************************************************************************************
1461 template< typename VT // Type of the dense vector of the left-hand side expression
1462  , typename ST // Type of the scalar of the left-hand side expression
1463  , typename MT // Type of the right-hand side dense matrix
1464  , bool SO > // Storage order of the right-hand side dense matrix
1465 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >::Type
1466  operator*( const DVecScalarMultExpr<VT,ST,true>& vec, const DenseMatrix<MT,SO>& mat )
1467 {
1469 
1470  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1471 }
1473 //*************************************************************************************************
1474 
1475 
1476 //*************************************************************************************************
1490 template< typename MT // Type of the left-hand side sparse matrix
1491  , bool SO // Storage order of the left-hand side sparse matrix
1492  , typename VT // Type of the dense vector of the right-hand side expression
1493  , typename ST > // Type of the scalar of the right-hand side expression
1494 inline const typename MultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >::Type
1495  operator*( const SparseMatrix<MT,SO>& mat, const DVecScalarMultExpr<VT,ST,false>& vec )
1496 {
1498 
1499  return ( (~mat) * vec.leftOperand() ) * vec.rightOperand();
1500 }
1502 //*************************************************************************************************
1503 
1504 
1505 //*************************************************************************************************
1519 template< typename VT // Type of the dense vector of the left-hand side expression
1520  , typename ST // Type of the scalar of the left-hand side expression
1521  , typename MT // Type of the right-hand side sparse matrix
1522  , bool SO > // Storage order of the right-hand side sparse matrix
1523 inline const typename MultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >::Type
1524  operator*( const DVecScalarMultExpr<VT,ST,true>& vec, const SparseMatrix<MT,SO>& mat )
1525 {
1527 
1528  return ( vec.leftOperand() * (~mat) ) * vec.rightOperand();
1529 }
1531 //*************************************************************************************************
1532 
1533 
1534 
1535 
1536 //=================================================================================================
1537 //
1538 // DVECSCALARMULTEXPRTRAIT SPECIALIZATIONS
1539 //
1540 //=================================================================================================
1541 
1542 //*************************************************************************************************
1544 template< typename VT, typename ST1, typename ST2 >
1545 struct DVecScalarMultExprTrait< DVecScalarMultExpr<VT,ST1,false>, ST2 >
1546 {
1547  public:
1548  //**********************************************************************************************
1549  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1550  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1551  , typename DVecScalarMultExprTrait<VT,typename MultTrait<ST1,ST2>::Type>::Type
1552  , INVALID_TYPE >::Type Type;
1553  //**********************************************************************************************
1554 };
1556 //*************************************************************************************************
1557 
1558 
1559 
1560 
1561 //=================================================================================================
1562 //
1563 // TDVECSCALARMULTEXPRTRAIT SPECIALIZATIONS
1564 //
1565 //=================================================================================================
1566 
1567 //*************************************************************************************************
1569 template< typename VT, typename ST1, typename ST2 >
1570 struct TDVecScalarMultExprTrait< DVecScalarMultExpr<VT,ST1,true>, ST2 >
1571 {
1572  public:
1573  //**********************************************************************************************
1574  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1575  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1576  , typename TDVecScalarMultExprTrait<VT,typename MultTrait<ST1,ST2>::Type>::Type
1577  , INVALID_TYPE >::Type Type;
1578  //**********************************************************************************************
1579 };
1581 //*************************************************************************************************
1582 
1583 
1584 
1585 
1586 //=================================================================================================
1587 //
1588 // DVECSCALARDIVEXPRTRAIT SPECIALIZATIONS
1589 //
1590 //=================================================================================================
1591 
1592 //*************************************************************************************************
1594 template< typename VT, typename ST1, typename ST2 >
1595 struct DVecScalarDivExprTrait< DVecScalarMultExpr<VT,ST1,false>, ST2 >
1596 {
1597  private:
1598  //**********************************************************************************************
1599  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1600  //**********************************************************************************************
1601 
1602  //**********************************************************************************************
1603  typedef typename DVecScalarMultExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1604  typedef typename DVecScalarDivExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1605  //**********************************************************************************************
1606 
1607  public:
1608  //**********************************************************************************************
1609  typedef typename SelectType< IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
1610  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1611  , typename SelectType<condition,T1,T2>::Type
1612  , INVALID_TYPE >::Type Type;
1613  //**********************************************************************************************
1614 };
1616 //*************************************************************************************************
1617 
1618 
1619 
1620 
1621 //=================================================================================================
1622 //
1623 // TDVECSCALARDIVEXPRTRAIT SPECIALIZATIONS
1624 //
1625 //=================================================================================================
1626 
1627 //*************************************************************************************************
1629 template< typename VT, typename ST1, typename ST2 >
1630 struct TDVecScalarDivExprTrait< DVecScalarMultExpr<VT,ST1,true>, ST2 >
1631 {
1632  private:
1633  //**********************************************************************************************
1634  enum { condition = IsFloatingPoint<typename DivTrait<ST1,ST2>::Type>::value };
1635  //**********************************************************************************************
1636 
1637  //**********************************************************************************************
1638  typedef typename TDVecScalarMultExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T1;
1639  typedef typename TDVecScalarDivExprTrait<VT,typename DivTrait<ST1,ST2>::Type>::Type T2;
1640  //**********************************************************************************************
1641 
1642  public:
1643  //**********************************************************************************************
1644  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
1645  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1646  , typename SelectType<condition,T1,T2>::Type
1647  , INVALID_TYPE >::Type Type;
1648  //**********************************************************************************************
1649 };
1651 //*************************************************************************************************
1652 
1653 
1654 
1655 
1656 //=================================================================================================
1657 //
1658 // DVECDVECMULTEXPRTRAIT SPECIALIZATIONS
1659 //
1660 //=================================================================================================
1661 
1662 //*************************************************************************************************
1664 template< typename VT1, typename ST, typename VT2 >
1665 struct DVecDVecMultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >
1666 {
1667  public:
1668  //**********************************************************************************************
1669  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1670  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
1671  IsNumeric<ST>::value
1672  , typename DVecScalarMultExprTrait<typename DVecDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1673  , INVALID_TYPE >::Type Type;
1674  //**********************************************************************************************
1675 };
1677 //*************************************************************************************************
1678 
1679 
1680 //*************************************************************************************************
1682 template< typename VT1, typename VT2, typename ST >
1683 struct DVecDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,false> >
1684 {
1685  public:
1686  //**********************************************************************************************
1687  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1688  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
1689  IsNumeric<ST>::value
1690  , typename DVecScalarMultExprTrait<typename DVecDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1691  , INVALID_TYPE >::Type Type;
1692  //**********************************************************************************************
1693 };
1695 //*************************************************************************************************
1696 
1697 
1698 //*************************************************************************************************
1700 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1701 struct DVecDVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,false> >
1702 {
1703  public:
1704  //**********************************************************************************************
1705  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1706  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
1707  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1708  , typename DVecScalarMultExprTrait<typename DVecDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1709  , INVALID_TYPE >::Type Type;
1710  //**********************************************************************************************
1711 };
1713 //*************************************************************************************************
1714 
1715 
1716 
1717 
1718 //=================================================================================================
1719 //
1720 // DVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
1721 //
1722 //=================================================================================================
1723 
1724 //*************************************************************************************************
1726 template< typename VT1, typename ST, typename VT2 >
1727 struct DVecTDVecMultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >
1728 {
1729  public:
1730  //**********************************************************************************************
1731  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1732  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1733  IsNumeric<ST>::value
1734  , typename DMatScalarMultExprTrait<typename DVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1735  , INVALID_TYPE >::Type Type;
1736  //**********************************************************************************************
1737 };
1739 //*************************************************************************************************
1740 
1741 
1742 //*************************************************************************************************
1744 template< typename VT1, typename VT2, typename ST >
1745 struct DVecTDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >
1746 {
1747  public:
1748  //**********************************************************************************************
1749  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1750  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1751  IsNumeric<ST>::value
1752  , typename DMatScalarMultExprTrait<typename DVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1753  , INVALID_TYPE >::Type Type;
1754  //**********************************************************************************************
1755 };
1757 //*************************************************************************************************
1758 
1759 
1760 //*************************************************************************************************
1762 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1763 struct DVecTDVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,true> >
1764 {
1765  public:
1766  //**********************************************************************************************
1767  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1768  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1769  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1770  , typename DMatScalarMultExprTrait<typename DVecTDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1771  , INVALID_TYPE >::Type Type;
1772  //**********************************************************************************************
1773 };
1775 //*************************************************************************************************
1776 
1777 
1778 
1779 
1780 //=================================================================================================
1781 //
1782 // TDVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
1783 //
1784 //=================================================================================================
1785 
1786 //*************************************************************************************************
1788 template< typename VT1, typename ST, typename VT2 >
1789 struct TDVecTDVecMultExprTrait< DVecScalarMultExpr<VT1,ST,true>, VT2 >
1790 {
1791  public:
1792  //**********************************************************************************************
1793  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
1794  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1795  IsNumeric<ST>::value
1796  , typename TDVecScalarMultExprTrait<typename TDVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1797  , INVALID_TYPE >::Type Type;
1798  //**********************************************************************************************
1799 };
1801 //*************************************************************************************************
1802 
1803 
1804 //*************************************************************************************************
1806 template< typename VT1, typename VT2, typename ST >
1807 struct TDVecTDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >
1808 {
1809  public:
1810  //**********************************************************************************************
1811  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
1812  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1813  IsNumeric<ST>::value
1814  , typename TDVecScalarMultExprTrait<typename TDVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1815  , INVALID_TYPE >::Type Type;
1816  //**********************************************************************************************
1817 };
1819 //*************************************************************************************************
1820 
1821 
1822 //*************************************************************************************************
1824 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1825 struct TDVecTDVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,true>, DVecScalarMultExpr<VT2,ST2,true> >
1826 {
1827  public:
1828  //**********************************************************************************************
1829  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
1830  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
1831  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1832  , typename TDVecScalarMultExprTrait<typename TDVecTDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1833  , INVALID_TYPE >::Type Type;
1834  //**********************************************************************************************
1835 };
1837 //*************************************************************************************************
1838 
1839 
1840 
1841 
1842 //=================================================================================================
1843 //
1844 // DVECSVECMULTEXPRTRAIT SPECIALIZATIONS
1845 //
1846 //=================================================================================================
1847 
1848 //*************************************************************************************************
1850 template< typename VT1, typename VT2, typename ST >
1851 struct DVecSVecMultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >
1852 {
1853  public:
1854  //**********************************************************************************************
1855  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1856  IsSparseVector<VT2>::value && IsColumnVector<VT2>::value &&
1857  IsNumeric<ST>::value
1858  , typename SVecScalarMultExprTrait<typename DVecSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1859  , INVALID_TYPE >::Type Type;
1860  //**********************************************************************************************
1861 };
1863 //*************************************************************************************************
1864 
1865 
1866 //*************************************************************************************************
1868 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1869 struct DVecSVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,false> >
1870 {
1871  public:
1872  //**********************************************************************************************
1873  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1874  IsSparseVector<VT2>::value && IsColumnVector<VT2>::value &&
1875  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1876  , typename SVecScalarMultExprTrait<typename DVecSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1877  , INVALID_TYPE >::Type Type;
1878  //**********************************************************************************************
1879 };
1881 //*************************************************************************************************
1882 
1883 
1884 
1885 
1886 //=================================================================================================
1887 //
1888 // DVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1889 //
1890 //=================================================================================================
1891 
1892 //*************************************************************************************************
1894 template< typename VT1, typename ST, typename VT2 >
1895 struct DVecTSVecMultExprTrait< DVecScalarMultExpr<VT1,ST,false>, VT2 >
1896 {
1897  public:
1898  //**********************************************************************************************
1899  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1900  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
1901  IsNumeric<ST>::value
1902  , typename SMatScalarMultExprTrait<typename DVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1903  , INVALID_TYPE >::Type Type;
1904  //**********************************************************************************************
1905 };
1907 //*************************************************************************************************
1908 
1909 
1910 //*************************************************************************************************
1912 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1913 struct DVecTSVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,false>, SVecScalarMultExpr<VT2,ST2,true> >
1914 {
1915  public:
1916  //**********************************************************************************************
1917  typedef typename SelectType< IsDenseVector<VT1>::value && IsColumnVector<VT1>::value &&
1918  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
1919  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1920  , typename SMatScalarMultExprTrait<typename DVecTSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1921  , INVALID_TYPE >::Type Type;
1922  //**********************************************************************************************
1923 };
1925 //*************************************************************************************************
1926 
1927 
1928 
1929 
1930 //=================================================================================================
1931 //
1932 // TDVECTSVECMULTEXPRTRAIT SPECIALIZATIONS
1933 //
1934 //=================================================================================================
1935 
1936 //*************************************************************************************************
1938 template< typename VT1, typename ST, typename VT2 >
1939 struct TDVecTSVecMultExprTrait< DVecScalarMultExpr<VT1,ST,true>, VT2 >
1940 {
1941  public:
1942  //**********************************************************************************************
1943  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
1944  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
1945  IsNumeric<ST>::value
1946  , typename TSVecScalarMultExprTrait<typename TDVecTSVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1947  , INVALID_TYPE >::Type Type;
1948  //**********************************************************************************************
1949 };
1951 //*************************************************************************************************
1952 
1953 
1954 //*************************************************************************************************
1956 template< typename VT1, typename ST1, typename VT2, typename ST2 >
1957 struct TDVecTSVecMultExprTrait< DVecScalarMultExpr<VT1,ST1,true>, SVecScalarMultExpr<VT2,ST2,true> >
1958 {
1959  public:
1960  //**********************************************************************************************
1961  typedef typename SelectType< IsDenseVector<VT1>::value && IsRowVector<VT1>::value &&
1962  IsSparseVector<VT2>::value && IsRowVector<VT2>::value &&
1963  IsNumeric<ST1>::value && IsNumeric<ST2>::value
1964  , typename TSVecScalarMultExprTrait<typename TDVecTSVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
1965  , INVALID_TYPE >::Type Type;
1966  //**********************************************************************************************
1967 };
1969 //*************************************************************************************************
1970 
1971 
1972 
1973 
1974 //=================================================================================================
1975 //
1976 // SVECDVECMULTEXPRTRAIT SPECIALIZATIONS
1977 //
1978 //=================================================================================================
1979 
1980 //*************************************************************************************************
1982 template< typename VT1, typename VT2, typename ST >
1983 struct SVecDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,false> >
1984 {
1985  public:
1986  //**********************************************************************************************
1987  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
1988  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
1989  IsNumeric<ST>::value
1990  , typename SVecScalarMultExprTrait<typename SVecDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
1991  , INVALID_TYPE >::Type Type;
1992  //**********************************************************************************************
1993 };
1995 //*************************************************************************************************
1996 
1997 
1998 //*************************************************************************************************
2000 template< typename VT1, typename ST1, typename VT2, typename ST2 >
2001 struct SVecDVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,false> >
2002 {
2003  public:
2004  //**********************************************************************************************
2005  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
2006  IsDenseVector<VT2>::value && IsColumnVector<VT2>::value &&
2007  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2008  , typename SVecScalarMultExprTrait<typename SVecDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2009  , INVALID_TYPE >::Type Type;
2010  //**********************************************************************************************
2011 };
2013 //*************************************************************************************************
2014 
2015 
2016 
2017 
2018 //=================================================================================================
2019 //
2020 // SVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
2021 //
2022 //=================================================================================================
2023 
2024 //*************************************************************************************************
2026 template< typename VT1, typename VT2, typename ST >
2027 struct SVecTDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >
2028 {
2029  public:
2030  //**********************************************************************************************
2031  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
2032  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
2033  IsNumeric<ST>::value
2034  , typename TSMatScalarMultExprTrait<typename SVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
2035  , INVALID_TYPE >::Type Type;
2036  //**********************************************************************************************
2037 };
2039 //*************************************************************************************************
2040 
2041 
2042 //*************************************************************************************************
2044 template< typename VT1, typename ST1, typename VT2, typename ST2 >
2045 struct SVecTDVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,false>, DVecScalarMultExpr<VT2,ST2,true> >
2046 {
2047  public:
2048  //**********************************************************************************************
2049  typedef typename SelectType< IsSparseVector<VT1>::value && IsColumnVector<VT1>::value &&
2050  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
2051  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2052  , typename TSMatScalarMultExprTrait<typename SVecTDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2053  , INVALID_TYPE >::Type Type;
2054  //**********************************************************************************************
2055 };
2057 //*************************************************************************************************
2058 
2059 
2060 
2061 
2062 //=================================================================================================
2063 //
2064 // TSVECTDVECMULTEXPRTRAIT SPECIALIZATIONS
2065 //
2066 //=================================================================================================
2067 
2068 //*************************************************************************************************
2070 template< typename VT1, typename VT2, typename ST >
2071 struct TSVecTDVecMultExprTrait< VT1, DVecScalarMultExpr<VT2,ST,true> >
2072 {
2073  public:
2074  //**********************************************************************************************
2075  typedef typename SelectType< IsSparseVector<VT1>::value && IsRowVector<VT1>::value &&
2076  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
2077  IsNumeric<ST>::value
2078  , typename TSVecScalarMultExprTrait<typename TSVecTDVecMultExprTrait<VT1,VT2>::Type,ST>::Type
2079  , INVALID_TYPE >::Type Type;
2080  //**********************************************************************************************
2081 };
2083 //*************************************************************************************************
2084 
2085 
2086 //*************************************************************************************************
2088 template< typename VT1, typename ST1, typename VT2, typename ST2 >
2089 struct TSVecTDVecMultExprTrait< SVecScalarMultExpr<VT1,ST1,true>, DVecScalarMultExpr<VT2,ST2,true> >
2090 {
2091  public:
2092  //**********************************************************************************************
2093  typedef typename SelectType< IsSparseVector<VT1>::value && IsRowVector<VT1>::value &&
2094  IsDenseVector<VT2>::value && IsRowVector<VT2>::value &&
2095  IsNumeric<ST1>::value && IsNumeric<ST2>::value
2096  , typename TSVecScalarMultExprTrait<typename TSVecTDVecMultExprTrait<VT1,VT2>::Type,typename MultTrait<ST1,ST2>::Type>::Type
2097  , INVALID_TYPE >::Type Type;
2098  //**********************************************************************************************
2099 };
2101 //*************************************************************************************************
2102 
2103 
2104 
2105 
2106 //=================================================================================================
2107 //
2108 // DMATDVECMULTEXPRTRAIT SPECIALIZATIONS
2109 //
2110 //=================================================================================================
2111 
2112 //*************************************************************************************************
2114 template< typename MT, typename VT, typename ST >
2115 struct DMatDVecMultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >
2116 {
2117  public:
2118  //**********************************************************************************************
2119  typedef typename SelectType< IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2120  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
2121  IsNumeric<ST>::value
2122  , typename DVecScalarMultExprTrait<typename DMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
2123  , INVALID_TYPE >::Type Type;
2124  //**********************************************************************************************
2125 };
2127 //*************************************************************************************************
2128 
2129 
2130 
2131 
2132 //=================================================================================================
2133 //
2134 // TDMATDVECMULTEXPRTRAIT SPECIALIZATIONS
2135 //
2136 //=================================================================================================
2137 
2138 //*************************************************************************************************
2140 template< typename MT, typename VT, typename ST >
2141 struct TDMatDVecMultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >
2142 {
2143  public:
2144  //**********************************************************************************************
2145  typedef typename SelectType< IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2146  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
2147  IsNumeric<ST>::value
2148  , typename DVecScalarMultExprTrait<typename TDMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
2149  , INVALID_TYPE >::Type Type;
2150  //**********************************************************************************************
2151 };
2153 //*************************************************************************************************
2154 
2155 
2156 
2157 
2158 //=================================================================================================
2159 //
2160 // TDVECDMATMULTEXPRTRAIT SPECIALIZATIONS
2161 //
2162 //=================================================================================================
2163 
2164 //*************************************************************************************************
2166 template< typename VT, typename MT, typename ST >
2167 struct TDVecDMatMultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >
2168 {
2169  public:
2170  //**********************************************************************************************
2171  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2172  IsDenseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2173  IsNumeric<ST>::value
2174  , typename TDVecScalarMultExprTrait<typename TDVecDMatMultExprTrait<VT,MT>::Type,ST>::Type
2175  , INVALID_TYPE >::Type Type;
2176  //**********************************************************************************************
2177 };
2179 //*************************************************************************************************
2180 
2181 
2182 
2183 
2184 //=================================================================================================
2185 //
2186 // TDVECTDMATMULTEXPRTRAIT SPECIALIZATIONS
2187 //
2188 //=================================================================================================
2189 
2190 //*************************************************************************************************
2192 template< typename VT, typename MT, typename ST >
2193 struct TDVecTDMatMultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >
2194 {
2195  public:
2196  //**********************************************************************************************
2197  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2198  IsDenseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2199  IsNumeric<ST>::value
2200  , typename TDVecScalarMultExprTrait<typename TDVecTDMatMultExprTrait<VT,MT>::Type,ST>::Type
2201  , INVALID_TYPE >::Type Type;
2202  //**********************************************************************************************
2203 };
2205 //*************************************************************************************************
2206 
2207 
2208 
2209 
2210 //=================================================================================================
2211 //
2212 // SMATDVECMULTEXPRTRAIT SPECIALIZATIONS
2213 //
2214 //=================================================================================================
2215 
2216 //*************************************************************************************************
2218 template< typename MT, typename VT, typename ST >
2219 struct SMatDVecMultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >
2220 {
2221  public:
2222  //**********************************************************************************************
2223  typedef typename SelectType< IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2224  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
2225  IsNumeric<ST>::value
2226  , typename DVecScalarMultExprTrait<typename SMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
2227  , INVALID_TYPE >::Type Type;
2228  //**********************************************************************************************
2229 };
2231 //*************************************************************************************************
2232 
2233 
2234 
2235 
2236 //=================================================================================================
2237 //
2238 // TSMATDVECMULTEXPRTRAIT SPECIALIZATIONS
2239 //
2240 //=================================================================================================
2241 
2242 //*************************************************************************************************
2244 template< typename MT, typename VT, typename ST >
2245 struct TSMatDVecMultExprTrait< MT, DVecScalarMultExpr<VT,ST,false> >
2246 {
2247  public:
2248  //**********************************************************************************************
2249  typedef typename SelectType< IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2250  IsDenseVector<VT>::value && IsColumnVector<VT>::value &&
2251  IsNumeric<ST>::value
2252  , typename DVecScalarMultExprTrait<typename TSMatDVecMultExprTrait<MT,VT>::Type,ST>::Type
2253  , INVALID_TYPE >::Type Type;
2254  //**********************************************************************************************
2255 };
2257 //*************************************************************************************************
2258 
2259 
2260 
2261 
2262 //=================================================================================================
2263 //
2264 // TDVECSMATMULTEXPRTRAIT SPECIALIZATIONS
2265 //
2266 //=================================================================================================
2267 
2268 //*************************************************************************************************
2270 template< typename VT, typename MT, typename ST >
2271 struct TDVecSMatMultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >
2272 {
2273  public:
2274  //**********************************************************************************************
2275  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2276  IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value &&
2277  IsNumeric<ST>::value
2278  , typename TDVecScalarMultExprTrait<typename TDVecSMatMultExprTrait<VT,MT>::Type,ST>::Type
2279  , INVALID_TYPE >::Type Type;
2280  //**********************************************************************************************
2281 };
2283 //*************************************************************************************************
2284 
2285 
2286 
2287 
2288 //=================================================================================================
2289 //
2290 // TDVECTSMATMULTEXPRTRAIT SPECIALIZATIONS
2291 //
2292 //=================================================================================================
2293 
2294 //*************************************************************************************************
2296 template< typename VT, typename MT, typename ST >
2297 struct TDVecTSMatMultExprTrait< DVecScalarMultExpr<VT,ST,true>, MT >
2298 {
2299  public:
2300  //**********************************************************************************************
2301  typedef typename SelectType< IsDenseVector<VT>::value && IsRowVector<VT>::value &&
2302  IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value &&
2303  IsNumeric<ST>::value
2304  , typename TDVecScalarMultExprTrait<typename TDVecTSMatMultExprTrait<VT,MT>::Type,ST>::Type
2305  , INVALID_TYPE >::Type Type;
2306  //**********************************************************************************************
2307 };
2309 //*************************************************************************************************
2310 
2311 
2312 
2313 
2314 //=================================================================================================
2315 //
2316 // SUBVECTOREXPRTRAIT SPECIALIZATIONS
2317 //
2318 //=================================================================================================
2319 
2320 //*************************************************************************************************
2322 template< typename VT, typename ST, bool TF >
2323 struct SubvectorExprTrait< DVecScalarMultExpr<VT,ST,TF> >
2324 {
2325  public:
2326  //**********************************************************************************************
2327  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT>::Type, ST >::Type Type;
2328  //**********************************************************************************************
2329 };
2331 //*************************************************************************************************
2332 
2333 } // namespace blaze
2334 
2335 #endif
Pointer difference type of the Blaze library.
Data type constraint.
Compile time check whether the given type is a computational expression template.This type trait clas...
Definition: IsComputation.h:89
Constraint on the data type.
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
const DMatDMatMultExpr< T1, T2 > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:3703
const EnableIf< IsNumeric< T2 >, typename DivExprTrait< T1, T2 >::Type >::Type operator/(const DenseMatrix< T1, SO > &mat, T2 scalar)
Division operator for the division of a dense matrix by a scalar value ( ).
Definition: DMatScalarDivExpr.h:745
Header file for the SparseVector base class.
IntrinsicTrait< ElementType >::Type IntrinsicType
Resulting intrinsic element type.
Definition: DVecScalarMultExpr.h:155
ReturnType operator*() const
Direct access to the element at the current iterator position.
Definition: DVecScalarMultExpr.h:277
Header file for the IsSparseMatrix type trait.
ConstIterator end() const
Returns an iterator just past the last non-zero element of the dense vector.
Definition: DVecScalarMultExpr.h:478
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
const ConstIterator operator++(int)
Post-increment operator.
Definition: DVecScalarMultExpr.h:246
Header file for the IsSame and IsStrictlySame type traits.
Header file for the IsColumnMajorMatrix type trait.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
Header file for the IsRowVector type trait.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
Header file for the DenseVector base class.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: DVecScalarMultExpr.h:441
Header file for the Computation base class.
Type relationship analysis.This class tests if the two data types A and B are equal. For this type comparison, the cv-qualifiers of both data types are ignored. If A and B are the same data type (ignoring the cv-qualifiers), then the value member enumeration is set to 1, the nested type definition Type is TrueType, and the class derives from TrueType. Otherwise value is set to 0, Type is FalseType, and the class derives from FalseType.
Definition: IsSame.h:158
Header file for the RequiresEvaluation type trait.
MultExprTrait< RN, ST >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: DVecScalarMultExpr.h:127
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:309
ConstIterator(IteratorType iterator, RightOperand scalar)
Constructor for the ConstIterator class.
Definition: DVecScalarMultExpr.h:200
Header file for the VecScalarMultExpr base class.
LeftOperand leftOperand() const
Returns the left-hand side dense vector operand.
Definition: DVecScalarMultExpr.h:498
ResultType::ElementType ElementType
Resulting element type.
Definition: DVecScalarMultExpr.h:154
Constraint on the data type.
ValueType value_type
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:185
bool operator<=(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:342
Header file for the SparseMatrix base class.
Header file for the DivExprTrait class template.
PointerType pointer
Pointer return type.
Definition: DVecScalarMultExpr.h:186
VT::ConstIterator IteratorType
ConstIterator type of the dense vector expression.
Definition: DVecScalarMultExpr.h:191
IntrinsicType load(size_t index) const
Access to the intrinsic elements of the vector.
Definition: DVecScalarMultExpr.h:453
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type LeftOperand
Composite type of the left-hand side dense vector expression.
Definition: DVecScalarMultExpr.h:164
Header file for the MultExprTrait class template.
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:250
DVecScalarMultExpr(const VT &vector, ST scalar)
Constructor for the DVecScalarMultExpr class.
Definition: DVecScalarMultExpr.h:429
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DVecScalarMultExpr.h:181
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
Header file for the IsTemporary type trait class.
Header file for the multiplication trait.
Header file for the IsFloatingPoint type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: DVecScalarMultExpr.h:520
Iterator over the elements of the dense vector.
Definition: DVecScalarMultExpr.h:173
Header file for the DenseMatrix base class.
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: DVecScalarMultExpr.h:158
bool operator>(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:331
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DVecScalarMultExpr.h:153
void assign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the assignment of a matrix to a matrix.
Definition: Matrix.h:179
bool operator>=(const ConstIterator &rhs) const
Greater-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:353
ST RightOperand
Composite type of the right-hand side scalar value.
Definition: DVecScalarMultExpr.h:167
VT::ResultType RT
Result type of the dense vector expression.
Definition: DVecScalarMultExpr.h:111
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
#define BLAZE_CONSTRAINT_MUST_BE_SAME_TYPE(A, B)
Data type constraint.In case the two types A and B are not the same (ignoring all cv-qualifiers of bo...
Definition: SameType.h:89
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
std::random_access_iterator_tag IteratorCategory
The iterator category.
Definition: DVecScalarMultExpr.h:177
Constraint on the data type.
DVecScalarMultExpr< VT, ST, TF > This
Type of this DVecScalarMultExpr instance.
Definition: DVecScalarMultExpr.h:151
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2373
void multAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the multiplication assignment of a matrix to a matrix.
Definition: Matrix.h:269
bool operator<(const ConstIterator &rhs) const
Less-than comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:320
Header file for the SelectType class template.
LeftOperand vector_
Left-hand side dense vector of the multiplication expression.
Definition: DVecScalarMultExpr.h:539
Header file for all forward declarations for expression class templates.
CMathTrait< typename VT::ElementType >::Type length(const DenseVector< VT, TF > &dv)
Calculation of the dense vector length .
Definition: DenseVector.h:480
Header file for the IsDenseMatrix type trait.
size_t size() const
Returns the current size/dimension of the vector.
Definition: DVecScalarMultExpr.h:488
Header file for the EnableIf class template.
ReferenceType reference
Reference return type.
Definition: DVecScalarMultExpr.h:187
ConstIterator & operator++()
Pre-increment operator.
Definition: DVecScalarMultExpr.h:235
Header file for the BaseElementType type trait.
friend const ConstIterator operator+(const ConstIterator &it, size_t inc)
Addition between a ConstIterator and an integral value.
Definition: DVecScalarMultExpr.h:376
Header file for the IsNumeric type trait.
RightOperand scalar_
Right-hand side scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:540
ElementType ValueType
Type of the underlying elements.
Definition: DVecScalarMultExpr.h:178
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DVecScalarMultExpr.h:298
Base class for all vector/scalar multiplication expression templates.The VecScalarMultExpr class serv...
Definition: VecScalarMultExpr.h:66
Header file for the IsSparseVector type trait.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Intrinsic characteristics of data types.The IntrinsicTrait class template provides the intrinsic char...
Definition: IntrinsicTrait.h:648
Header file for run time assertion macros.
Utility type for generic codes.
Base template for the MultTrait class.
Definition: MultTrait.h:141
Header file for the division trait.
IteratorType iterator_
Iterator to the current element.
Definition: DVecScalarMultExpr.h:407
void addAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the addition assignment of a matrix to a matrix.
Definition: Matrix.h:209
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: DVecScalarMultExpr.h:532
const DenseIterator< Type > operator-(const DenseIterator< Type > &it, ptrdiff_t inc)
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:585
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
RightOperand rightOperand() const
Returns the right-hand side scalar operand.
Definition: DVecScalarMultExpr.h:508
void subAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the subtraction assignment of a matrix to matrix.
Definition: Matrix.h:239
VT::ElementType ET
Element type of the dense vector expression.
Definition: DVecScalarMultExpr.h:113
friend const ConstIterator operator+(size_t inc, const ConstIterator &it)
Addition between an integral value and a ConstIterator.
Definition: DVecScalarMultExpr.h:388
ElementType * PointerType
Pointer return type.
Definition: DVecScalarMultExpr.h:179
Evaluation of the base element type of a given data type.Via this type trait it is possible to evalua...
Definition: BaseElementType.h:75
VT::ReturnType RN
Return type of the dense vector expression.
Definition: DVecScalarMultExpr.h:112
Header file for the IsDenseVector type trait.
friend const ConstIterator operator-(const ConstIterator &it, size_t dec)
Subtraction between a ConstIterator and an integral value.
Definition: DVecScalarMultExpr.h:400
Header file for all intrinsic functionality.
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
ElementType & ReferenceType
Reference return type.
Definition: DVecScalarMultExpr.h:180
ConstIterator begin() const
Returns an iterator to the first non-zero element of the dense vector.
Definition: DVecScalarMultExpr.h:468
IntrinsicType load() const
Access to the intrinsic elements of the vector.
Definition: DVecScalarMultExpr.h:287
Header file for the IsRowMajorMatrix type trait.
Header file for the IsComputation type trait class.
const ConstIterator operator--(int)
Post-decrement operator.
Definition: DVecScalarMultExpr.h:267
Expression object for dense vector-scalar multiplications.The DVecScalarMultExpr class represents the...
Definition: DVecScalarMultExpr.h:105
ConstIterator & operator+=(size_t inc)
Addition assignment operator.
Definition: DVecScalarMultExpr.h:212
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:59
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:105
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:157
ConstIterator & operator-=(size_t dec)
Subtraction assignment operator.
Definition: DVecScalarMultExpr.h:224
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
Header file for basic type definitions.
Header file for the SubvectorExprTrait class template.
SelectType< useAssign, const ResultType, const DVecScalarMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: DVecScalarMultExpr.h:161
const DVecScalarMultExpr< VT, typename VT::ElementType, TF > normalize(const DenseVector< VT, TF > &vec)
Normalization of the dense vector ( ).
Definition: DVecScalarMultExpr.h:866
MultTrait< RT, ST >::Type ResultType
Result type for expression template evaluations.
Definition: DVecScalarMultExpr.h:152
Header file for the IsColumnVector type trait.
IteratorCategory iterator_category
The iterator category.
Definition: DVecScalarMultExpr.h:184
VT::CompositeType CT
Composite type of the dense vector expression.
Definition: DVecScalarMultExpr.h:114
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
RightOperand scalar_
Scalar of the multiplication expression.
Definition: DVecScalarMultExpr.h:408
#define BLAZE_CONSTRAINT_MUST_BE_VECTOR_WITH_TRANSPOSE_FLAG(T, TF)
Constraint on the data type.In case the given data type T is not a dense or sparse vector type and in...
Definition: TransposeFlag.h:238
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
EnableIf< IsIntegral< T >, Set< T, sizeof(T)> >::Type::Type set(T value)
Sets all values in the vector to the given integral value.
Definition: Set.h:209
#define BLAZE_CONSTRAINT_MUST_BE_FLOATING_POINT_TYPE(T)
Constraint on the data type.In case the given data type T is not a floating point data type...
Definition: FloatingPoint.h:79
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
DifferenceType difference_type
Difference between two iterators.
Definition: DVecScalarMultExpr.h:188
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two iterators.
Definition: DVecScalarMultExpr.h:364
ConstIterator & operator--()
Pre-decrement operator.
Definition: DVecScalarMultExpr.h:256