All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SVecTSVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECTSVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECTSVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
60 #include <blaze/util/Assert.h>
63 #include <blaze/util/SelectType.h>
64 #include <blaze/util/Types.h>
66 
67 
68 namespace blaze {
69 
70 //=================================================================================================
71 //
72 // CLASS SVECTSVECMULTEXPR
73 //
74 //=================================================================================================
75 
76 //*************************************************************************************************
83 template< typename VT1 // Type of the left-hand side sparse vector
84  , typename VT2 > // Type of the right-hand side sparse vector
85 class SVecTSVecMultExpr : public SparseMatrix< SVecTSVecMultExpr<VT1,VT2>, false >
86  , private VecTVecMultExpr
87  , private Computation
88 {
89  private:
90  //**Type definitions****************************************************************************
91  typedef typename VT1::ResultType RT1;
92  typedef typename VT2::ResultType RT2;
93  typedef typename VT1::ReturnType RN1;
94  typedef typename VT2::ReturnType RN2;
95  typedef typename VT1::CompositeType CT1;
96  typedef typename VT2::CompositeType CT2;
97  //**********************************************************************************************
98 
99  //**Return type evaluation**********************************************************************
101 
106  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
107 
110  //**********************************************************************************************
111 
112  public:
113  //**Type definitions****************************************************************************
119 
122 
124  typedef const ResultType CompositeType;
125 
127  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
128 
130  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
131 
133  typedef typename SelectType< IsComputation<VT1>::value, const RT1, CT1 >::Type LT;
134 
136  typedef typename SelectType< IsComputation<VT2>::value, const RT2, CT2 >::Type RT;
137  //**********************************************************************************************
138 
139  //**Constructor*********************************************************************************
145  explicit inline SVecTSVecMultExpr( const VT1& lhs, const VT2& rhs )
146  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
147  , rhs_( rhs ) // Right-hand side sparse vector of the multiplication expression
148  {}
149  //**********************************************************************************************
150 
151  //**Access operator*****************************************************************************
158  inline ReturnType operator()( size_t i, size_t j ) const {
159  BLAZE_INTERNAL_ASSERT( i < lhs_.size(), "Invalid row access index" );
160  BLAZE_INTERNAL_ASSERT( j < rhs_.size(), "Invalid column access index" );
161 
162  return lhs_[i] * rhs_[j];
163  }
164  //**********************************************************************************************
165 
166  //**Rows function*******************************************************************************
171  inline size_t rows() const {
172  return lhs_.size();
173  }
174  //**********************************************************************************************
175 
176  //**Columns function****************************************************************************
181  inline size_t columns() const {
182  return rhs_.size();
183  }
184  //**********************************************************************************************
185 
186  //**NonZeros function***************************************************************************
191  inline size_t nonZeros() const {
192  return lhs_.nonZeros() * rhs_.nonZeros();
193  }
194  //**********************************************************************************************
195 
196  //**NonZeros function***************************************************************************
202  inline size_t nonZeros( size_t i ) const {
203  return ( isDefault( lhs_[i] ) )?( size_t(0) ):( rhs_.nonZeros(i) );
204  }
205  //**********************************************************************************************
206 
207  //**Left operand access*************************************************************************
212  inline LeftOperand leftOperand() const {
213  return lhs_;
214  }
215  //**********************************************************************************************
216 
217  //**Right operand access************************************************************************
222  inline RightOperand rightOperand() const {
223  return rhs_;
224  }
225  //**********************************************************************************************
226 
227  //**********************************************************************************************
233  template< typename T >
234  inline bool canAlias( const T* alias ) const {
235  return ( lhs_.canAlias( alias ) || rhs_.canAlias( alias ) );
236  }
237  //**********************************************************************************************
238 
239  //**********************************************************************************************
245  template< typename T >
246  inline bool isAliased( const T* alias ) const {
247  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
248  }
249  //**********************************************************************************************
250 
251  private:
252  //**Member variables****************************************************************************
255  //**********************************************************************************************
256 
257  //**Assignment to row-major dense matrices******************************************************
269  template< typename MT > // Type of the target dense matrix
270  friend inline void assign( DenseMatrix<MT,false>& lhs, const SVecTSVecMultExpr& rhs )
271  {
273 
274  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
275  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
276 
277  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
278  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
279 
280  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
281  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
282 
283  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
284  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
285  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
286  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
287 
288  const LeftIterator lend( x.end() );
289  const RightIterator rend( y.end() );
290 
291  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
292  if( !isDefault( lelem->value() ) ) {
293  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
294  (~lhs)(lelem->index(),relem->index()) = lelem->value() * relem->value();
295  }
296  }
297  }
298  }
300  //**********************************************************************************************
301 
302  //**Assignment to column-major dense matrices***************************************************
315  template< typename MT > // Type of the target dense matrix
316  friend inline void assign( DenseMatrix<MT,true>& lhs, const SVecTSVecMultExpr& rhs )
317  {
319 
320  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
321  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
322 
323  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
324  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
325 
326  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
327  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
328 
329  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
330  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
331  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
332  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
333 
334  const LeftIterator lend( x.end() );
335  const RightIterator rend( y.end() );
336 
337  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
338  if( !isDefault( relem->value() ) ) {
339  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
340  (~lhs)(lelem->index(),relem->index()) = lelem->value() * relem->value();
341  }
342  }
343  }
344  }
346  //**********************************************************************************************
347 
348  //**Assignment to row-major sparse matrices*****************************************************
360  template< typename MT > // Type of the target sparse matrix
361  friend inline void assign( SparseMatrix<MT,false>& lhs, const SVecTSVecMultExpr& rhs )
362  {
364 
365  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
366  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
367 
368  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
369  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
370 
371  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
372  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
373 
374  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
375  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
376  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
377  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
378 
379  const LeftIterator lend( x.end() );
380  const RightIterator rend( y.end() );
381 
382  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
383  if( !isDefault( lelem->value() ) ) {
384  (~lhs).reserve( lelem->index(), y.nonZeros() );
385  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
386  (~lhs).append( lelem->index(), relem->index(), lelem->value() * relem->value() );
387  }
388  }
389  }
390  }
392  //**********************************************************************************************
393 
394  //**Assignment to column-major sparse matrices**************************************************
407  template< typename MT > // Type of the target sparse matrix
408  friend inline void assign( SparseMatrix<MT,true>& lhs, const SVecTSVecMultExpr& rhs )
409  {
411 
412  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
413  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
414 
415  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
416  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
417 
418  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
419  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
420 
421  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
422  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
423  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
424  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
425 
426  const LeftIterator lend( x.end() );
427  const RightIterator rend( y.end() );
428 
429  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
430  if( !isDefault( relem->value() ) ) {
431  (~lhs).reserve( relem->index(), x.nonZeros() );
432  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
433  (~lhs).append( lelem->index(), relem->index(), lelem->value() * relem->value() );
434  }
435  }
436  }
437  }
439  //**********************************************************************************************
440 
441  //**Addition assignment to row-major dense matrices*********************************************
454  template< typename MT > // Type of the target dense matrix
455  friend inline void addAssign( DenseMatrix<MT,false>& lhs, const SVecTSVecMultExpr& rhs )
456  {
458 
459  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
460  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
461 
462  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
463  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
464 
465  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
466  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
467 
468  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
469  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
470  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
471  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
472 
473  const LeftIterator lend( x.end() );
474  const RightIterator rend( y.end() );
475 
476  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
477  if( !isDefault( lelem->value() ) ) {
478  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
479  (~lhs)(lelem->index(),relem->index()) += lelem->value() * relem->value();
480  }
481  }
482  }
483  }
485  //**********************************************************************************************
486 
487  //**Addition assignment to column-major dense matrices******************************************
500  template< typename MT > // Type of the target dense matrix
501  friend inline void addAssign( DenseMatrix<MT,true>& lhs, const SVecTSVecMultExpr& rhs )
502  {
504 
505  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
506  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
507 
508  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
509  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
510 
511  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
512  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
513 
514  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
515  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
516  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
517  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
518 
519  const LeftIterator lend( x.end() );
520  const RightIterator rend( y.end() );
521 
522  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
523  if( !isDefault( relem->value() ) ) {
524  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
525  (~lhs)(lelem->index(),relem->index()) += lelem->value() * relem->value();
526  }
527  }
528  }
529  }
531  //**********************************************************************************************
532 
533  //**Addition assignment to sparse matrices******************************************************
534  // No special implementation for the addition assignment to sparse matrices.
535  //**********************************************************************************************
536 
537  //**Subtraction assignment to row-major dense matrices******************************************
550  template< typename MT > // Type of the target dense matrix
551  friend inline void subAssign( DenseMatrix<MT,false>& lhs, const SVecTSVecMultExpr& rhs )
552  {
554 
555  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
556  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
557 
558  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
559  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
560 
561  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
562  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
563 
564  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
565  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
566  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
567  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
568 
569  const LeftIterator lend( x.end() );
570  const RightIterator rend( y.end() );
571 
572  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
573  if( !isDefault( lelem->value() ) ) {
574  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
575  (~lhs)(lelem->index(),relem->index()) -= lelem->value() * relem->value();
576  }
577  }
578  }
579  }
581  //**********************************************************************************************
582 
583  //**Subtraction assignment to column-major dense matrices***************************************
596  template< typename MT > // Type of the target dense matrix
597  friend inline void subAssign( DenseMatrix<MT,true>& lhs, const SVecTSVecMultExpr& rhs )
598  {
600 
601  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
602  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
603 
604  typedef typename RemoveReference<LT>::Type::ConstIterator LeftIterator;
605  typedef typename RemoveReference<RT>::Type::ConstIterator RightIterator;
606 
607  LT x( rhs.lhs_ ); // Evaluation of the left-hand side sparse vector operand
608  RT y( rhs.rhs_ ); // Evaluation of the right-hand side sparse vector operand
609 
610  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size() , "Invalid vector size" );
611  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size() , "Invalid vector size" );
612  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).rows() , "Invalid vector size" );
613  BLAZE_INTERNAL_ASSERT( y.size() == (~lhs).columns(), "Invalid vector size" );
614 
615  const LeftIterator lend( x.end() );
616  const RightIterator rend( y.end() );
617 
618  for( RightIterator relem=y.begin(); relem!=rend; ++relem ) {
619  if( !isDefault( relem->value() ) ) {
620  for( LeftIterator lelem=x.begin(); lelem!=lend; ++lelem ) {
621  (~lhs)(lelem->index(),relem->index()) -= lelem->value() * relem->value();
622  }
623  }
624  }
625  }
627  //**********************************************************************************************
628 
629  //**Subtraction assignment to sparse matrices***************************************************
630  // No special implementation for the subtraction assignment to sparse matrices.
631  //**********************************************************************************************
632 
633  //**Multiplication assignment to dense matrices*************************************************
634  // No special implementation for the multiplication assignment to dense matrices.
635  //**********************************************************************************************
636 
637  //**Multiplication assignment to sparse matrices************************************************
638  // No special implementation for the multiplication assignment to sparse matrices.
639  //**********************************************************************************************
640 
641  //**Compile time checks*************************************************************************
648  //**********************************************************************************************
649 };
650 //*************************************************************************************************
651 
652 
653 
654 
655 //=================================================================================================
656 //
657 // GLOBAL BINARY ARITHMETIC OPERATORS
658 //
659 //=================================================================================================
660 
661 //*************************************************************************************************
688 template< typename T1 // Type of the left-hand side sparse vector
689  , typename T2 > // Type of the right-hand side sparse vector
690 inline const SVecTSVecMultExpr<T1,T2>
692 {
694 
695  return SVecTSVecMultExpr<T1,T2>( ~lhs, ~rhs );
696 }
697 //*************************************************************************************************
698 
699 
700 
701 
702 //=================================================================================================
703 //
704 // EXPRESSION TRAIT SPECIALIZATIONS
705 //
706 //=================================================================================================
707 
708 //*************************************************************************************************
710 template< typename VT1, typename VT2 >
711 struct SubmatrixExprTrait< SVecTSVecMultExpr<VT1,VT2> >
712 {
713  public:
714  //**********************************************************************************************
715  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT1>::Type
716  , typename SubvectorExprTrait<const VT2>::Type >::Type Type;
717  //**********************************************************************************************
718 };
720 //*************************************************************************************************
721 
722 
723 //*************************************************************************************************
725 template< typename VT1, typename VT2 >
726 struct RowExprTrait< SVecTSVecMultExpr<VT1,VT2> >
727 {
728  public:
729  //**********************************************************************************************
730  typedef typename MultExprTrait< typename VT1::ReturnType, VT2 >::Type Type;
731  //**********************************************************************************************
732 };
734 //*************************************************************************************************
735 
736 
737 //*************************************************************************************************
739 template< typename VT1, typename VT2 >
740 struct ColumnExprTrait< SVecTSVecMultExpr<VT1,VT2> >
741 {
742  public:
743  //**********************************************************************************************
744  typedef typename MultExprTrait< VT1, typename VT2::ReturnType >::Type Type;
745  //**********************************************************************************************
746 };
748 //*************************************************************************************************
749 
750 } // namespace blaze
751 
752 #endif
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
#define BLAZE_CONSTRAINT_MUST_BE_COLUMN_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a column dense or sparse vector type...
Definition: TransposeFlag.h:159
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4555
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:196
Header file for the ColumnExprTrait class template.
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SVecTSVecMultExpr.h:158
SelectType< IsComputation< VT1 >::value, const RT1, CT1 >::Type LT
Type for the assignment of the left-hand side dense vector operand.
Definition: SVecTSVecMultExpr.h:133
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2375
SVecTSVecMultExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the SVecTSVecMultExpr class.
Definition: SVecTSVecMultExpr.h:145
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:248
VT1::ResultType RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:91
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecTSVecMultExpr.h:246
Header file for the Computation base class.
size_t columns() const
Returns the current number of columns of the matrix.
Definition: SVecTSVecMultExpr.h:181
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SVecTSVecMultExpr.h:191
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecTSVecMultExpr.h:117
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecTSVecMultExpr.h:234
ResultType::ElementType ElementType
Resulting element type.
Definition: SVecTSVecMultExpr.h:118
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Constraint on the data type.
Header file for the SparseMatrix base class.
Constraint on the data type.
Header file for the MultExprTrait class template.
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
VT2::CompositeType CT2
Composite type of the right-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:96
Header file for the IsTemporary type trait class.
Header file for the multiplication trait.
size_t rows() const
Returns the current number of rows of the matrix.
Definition: SVecTSVecMultExpr.h:171
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:130
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecTSVecMultExpr.h:253
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SVecTSVecMultExpr.h:202
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2379
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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional vector type...
Definition: SparseVector.h:79
Constraint on the data type.
Expression object for sparse vector-sparse vector outer products.The SVecTSVecMultExpr class represen...
Definition: Forward.h:120
MultExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SVecTSVecMultExpr.h:109
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the VecTVecMultExpr base class.
ResultType::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SVecTSVecMultExpr.h:116
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2374
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for run time assertion macros.
Base template for the MultTrait class.
Definition: MultTrait.h:141
RightOperand rhs_
Right-hand side sparse vector of the multiplication expression.
Definition: SVecTSVecMultExpr.h:254
VT1::CompositeType CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:95
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
VT2::ReturnType RN2
Return type of the right-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:94
RightOperand rightOperand() const
Returns the right-hand side sparse vector operand.
Definition: SVecTSVecMultExpr.h:222
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
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:127
Header file for the isDefault shim.
const ResultType CompositeType
Data type for composite expression templates.
Definition: SVecTSVecMultExpr.h:124
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: SVecTSVecMultExpr.h:115
Header file for the RemoveReference type trait.
VT1::ReturnType RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:93
SVecTSVecMultExpr< VT1, VT2 > This
Type of this SVecTSVecMultExpr instance.
Definition: SVecTSVecMultExpr.h:114
Header file for the IsComputation type trait class.
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
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2370
Header file for basic type definitions.
#define BLAZE_CONSTRAINT_MUST_BE_ROW_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a row dense or sparse vector type (i...
Definition: TransposeFlag.h:81
Header file for the SubvectorExprTrait class template.
VT2::ResultType RT2
Result type of the right-hand side sparse vector expression.
Definition: SVecTSVecMultExpr.h:92
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SVecTSVecMultExpr.h:121
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
Size type of the Blaze library.
#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
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: SVecTSVecMultExpr.h:212
SelectType< IsComputation< VT2 >::value, const RT2, CT2 >::Type RT
Type for the assignment of the right-hand side dense vector operand.
Definition: SVecTSVecMultExpr.h:136
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.