All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SVecDVecMultExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECDVECMULTEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECDVECMULTEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <stdexcept>
52 #include <blaze/math/shims/Reset.h>
60 #include <blaze/util/Assert.h>
62 #include <blaze/util/EnableIf.h>
64 #include <blaze/util/SelectType.h>
65 #include <blaze/util/Types.h>
67 
68 
69 namespace blaze {
70 
71 //=================================================================================================
72 //
73 // CLASS SVECDVECMULTEXPR
74 //
75 //=================================================================================================
76 
77 //*************************************************************************************************
84 template< typename VT1 // Type of the left-hand side sparse vector
85  , typename VT2 // Type of the right-hand side dense vector
86  , bool TF > // Transpose flag
87 class SVecDVecMultExpr : public SparseVector< SVecDVecMultExpr<VT1,VT2,TF>, TF >
88  , private VecVecMultExpr
89  , private Computation
90 {
91  private:
92  //**Type definitions****************************************************************************
93  typedef typename VT1::ResultType RT1;
94  typedef typename VT2::ResultType RT2;
95  typedef typename VT1::ReturnType RN1;
96  typedef typename VT2::ReturnType RN2;
97  typedef typename VT1::CompositeType CT1;
98  typedef typename VT2::CompositeType CT2;
99  typedef typename VT1::TransposeType TT1;
100  typedef typename VT2::TransposeType TT2;
101  //**********************************************************************************************
102 
103  //**Return type evaluation**********************************************************************
105 
110  enum { returnExpr = !IsTemporary<RN1>::value && !IsTemporary<RN2>::value };
111 
114  //**********************************************************************************************
115 
116  //**Evaluation strategy*************************************************************************
118 
125 
127  template< typename VT >
129  struct UseAssign {
130  enum { value = useAssign };
131  };
133  //**********************************************************************************************
134 
135  public:
136  //**Type definitions****************************************************************************
141 
144 
147 
149  typedef typename SelectType< IsExpression<VT1>::value, const VT1, const VT1& >::Type LeftOperand;
150 
152  typedef typename SelectType< IsExpression<VT2>::value, const VT2, const VT2& >::Type RightOperand;
153  //**********************************************************************************************
154 
155  //**Compilation flags***************************************************************************
157  enum { smpAssignable = 0 };
158  //**********************************************************************************************
159 
160  //**ConstIterator class definition**************************************************************
164  {
165  public:
166  //**Type definitions*************************************************************************
169 
172 
173  typedef std::forward_iterator_tag IteratorCategory;
174  typedef ElementType ValueType;
178 
179  // STL iterator requirements
185  //*******************************************************************************************
186 
187  //**Constructor******************************************************************************
190  inline ConstIterator( IteratorType it, RightOperand vec )
191  : it_ ( it ) // Iterator over the elements of the left-hand side sparse vector expression
192  , vec_( vec ) // Right-hand side dense vector expression
193  {}
194  //*******************************************************************************************
195 
196  //**Prefix increment operator****************************************************************
202  ++it_;
203  return *this;
204  }
205  //*******************************************************************************************
206 
207  //**Element access operator******************************************************************
212  inline const Element operator*() const {
213  return Element( it_->value() * vec_[it_->index()], it_->index() );
214  }
215  //*******************************************************************************************
216 
217  //**Element access operator******************************************************************
222  inline const ConstIterator* operator->() const {
223  return this;
224  }
225  //*******************************************************************************************
226 
227  //**Value function***************************************************************************
232  inline ReturnType value() const {
233  return it_->value() * vec_[it_->index()];
234  }
235  //*******************************************************************************************
236 
237  //**Index function***************************************************************************
242  inline size_t index() const {
243  return it_->index();
244  }
245  //*******************************************************************************************
246 
247  //**Equality operator************************************************************************
253  inline bool operator==( const ConstIterator& rhs ) const {
254  return it_ == rhs.it_;
255  }
256  //*******************************************************************************************
257 
258  //**Inequality operator**********************************************************************
264  inline bool operator!=( const ConstIterator& rhs ) const {
265  return it_ != rhs.it_;
266  }
267  //*******************************************************************************************
268 
269  //**Subtraction operator*********************************************************************
275  inline DifferenceType operator-( const ConstIterator& rhs ) const {
276  return it_ - rhs.it_;
277  }
278  //*******************************************************************************************
279 
280  private:
281  //**Member variables*************************************************************************
283  RightOperand vec_;
284  //*******************************************************************************************
285  };
286  //**********************************************************************************************
287 
288  //**Constructor*********************************************************************************
294  explicit inline SVecDVecMultExpr( const VT1& lhs, const VT2& rhs )
295  : lhs_( lhs ) // Left-hand side sparse vector of the multiplication expression
296  , rhs_( rhs ) // Right-hand side dense vector of the multiplication expression
297  {
298  BLAZE_INTERNAL_ASSERT( lhs.size() == rhs.size(), "Invalid vector sizes" );
299  }
300  //**********************************************************************************************
301 
302  //**Subscript operator**************************************************************************
308  inline ReturnType operator[]( size_t index ) const {
309  BLAZE_INTERNAL_ASSERT( index < lhs_.size(), "Invalid vector access index" );
310  return lhs_[index] * rhs_[index];
311  }
312  //**********************************************************************************************
313 
314  //**Begin function******************************************************************************
319  inline ConstIterator begin() const {
320  return ConstIterator( lhs_.begin(), rhs_ );
321  }
322  //**********************************************************************************************
323 
324  //**End function********************************************************************************
329  inline ConstIterator end() const {
330  return ConstIterator( lhs_.end(), rhs_ );
331  }
332  //**********************************************************************************************
333 
334  //**Size function*******************************************************************************
339  inline size_t size() const {
340  return rhs_.size();
341  }
342  //**********************************************************************************************
343 
344  //**NonZeros function***************************************************************************
349  inline size_t nonZeros() const {
350  return lhs_.nonZeros();
351  }
352  //**********************************************************************************************
353 
354  //**Left operand access*************************************************************************
359  inline LeftOperand leftOperand() const {
360  return lhs_;
361  }
362  //**********************************************************************************************
363 
364  //**Right operand access************************************************************************
369  inline RightOperand rightOperand() const {
370  return rhs_;
371  }
372  //**********************************************************************************************
373 
374  //**********************************************************************************************
380  template< typename T >
381  inline bool canAlias( const T* alias ) const {
382  return ( lhs_.canAlias( alias ) ) || ( rhs_.canAlias( alias ) );
383  }
384  //**********************************************************************************************
385 
386  //**********************************************************************************************
392  template< typename T >
393  inline bool isAliased( const T* alias ) const {
394  return ( lhs_.isAliased( alias ) ) || ( rhs_.isAliased( alias ) );
395  }
396  //**********************************************************************************************
397 
398  private:
399  //**Member variables****************************************************************************
400  LeftOperand lhs_;
401  RightOperand rhs_;
402  //**********************************************************************************************
403 
404  //**Assignment to dense vectors*****************************************************************
418  template< typename VT > // Type of the target dense vector
419  friend inline typename EnableIf< UseAssign<VT> >::Type
420  assign( DenseVector<VT,TF>& lhs, const SVecDVecMultExpr& rhs )
421  {
423 
424  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
425 
427 
428  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
429  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
430 
431  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
432  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
433  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
434 
435  for( ConstIterator element=x.begin(); element!=x.end(); ++element )
436  (~lhs)[element->index()] = element->value() * y[element->index()];
437  }
439  //**********************************************************************************************
440 
441  //**Assignment to sparse vectors****************************************************************
455  template< typename VT > // Type of the target sparse vector
456  friend inline typename EnableIf< UseAssign<VT> >::Type
457  assign( SparseVector<VT,TF>& lhs, const SVecDVecMultExpr& rhs )
458  {
460 
461  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
462 
464 
465  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
466  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense 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).size() , "Invalid vector size" );
471 
472  for( ConstIterator element=x.begin(); element!=x.end(); ++element )
473  (~lhs).append( element->index(), element->value() * y[element->index()] );
474  }
476  //**********************************************************************************************
477 
478  //**Addition assignment to dense vectors********************************************************
492  template< typename VT > // Type of the target dense vector
493  friend inline typename EnableIf< UseAssign<VT> >::Type
494  addAssign( DenseVector<VT,TF>& lhs, const SVecDVecMultExpr& rhs )
495  {
497 
498  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
499 
501 
502  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
503  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
504 
505  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
506  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
507  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
508 
509  for( ConstIterator element=x.begin(); element!=x.end(); ++element )
510  (~lhs)[element->index()] += element->value() * y[element->index()];
511  }
513  //**********************************************************************************************
514 
515  //**Addition assignment to sparse vectors*******************************************************
516  // No special implementation for the addition assignment to sparse vectors.
517  //**********************************************************************************************
518 
519  //**Subtraction assignment to dense vectors*****************************************************
533  template< typename VT > // Type of the target dense vector
534  friend inline typename EnableIf< UseAssign<VT> >::Type
535  subAssign( DenseVector<VT,TF>& lhs, const SVecDVecMultExpr& rhs )
536  {
538 
539  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
540 
542 
543  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
544  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
545 
546  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
547  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
548  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
549 
550  for( ConstIterator element=x.begin(); element!=x.end(); ++element )
551  (~lhs)[element->index()] -= element->value() * y[element->index()];
552  }
554  //**********************************************************************************************
555 
556  //**Subtraction assignment to sparse vectors****************************************************
557  // No special implementation for the subtraction assignment to sparse vectors.
558  //**********************************************************************************************
559 
560  //**Multiplication assignment to dense vectors**************************************************
574  template< typename VT > // Type of the target dense vector
575  friend inline typename EnableIf< UseAssign<VT> >::Type
576  multAssign( DenseVector<VT,TF>& lhs, const SVecDVecMultExpr& rhs )
577  {
579 
580  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
581 
583 
584  CT1 x( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side sparse vector operand
585  CT2 y( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side dense vector operand
586 
587  BLAZE_INTERNAL_ASSERT( x.size() == rhs.lhs_.size(), "Invalid vector size" );
588  BLAZE_INTERNAL_ASSERT( y.size() == rhs.rhs_.size(), "Invalid vector size" );
589  BLAZE_INTERNAL_ASSERT( x.size() == (~lhs).size() , "Invalid vector size" );
590 
591  const ConstIterator end( x.end() );
592  ConstIterator begin( x.begin() );
593  size_t i( 0UL );
594 
595  for( ; begin!=end; ++begin ) {
596  const size_t index( begin->index() );
597  for( ; i<index; ++i )
598  reset( (~lhs)[i] );
599  (~lhs)[index] *= begin->value() * y[index];
600  ++i;
601  }
602 
603  for( ; i<rhs.size(); ++i )
604  reset( (~lhs)[i] );
605  }
607  //**********************************************************************************************
608 
609  //**Multiplication assignment to sparse vectors*************************************************
610  // No special implementation for the multiplication assignment to sparse vectors.
611  //**********************************************************************************************
612 
613  //**Compile time checks*************************************************************************
620  //**********************************************************************************************
621 };
622 //*************************************************************************************************
623 
624 
625 
626 
627 //=================================================================================================
628 //
629 // GLOBAL BINARY ARITHMETIC OPERATORS
630 //
631 //=================================================================================================
632 
633 //*************************************************************************************************
660 template< typename T1 // Type of the left-hand side sparse vector
661  , typename T2 // Type of the right-hand side dense vector
662  , bool TF > // Transpose flag
663 inline const SVecDVecMultExpr<T1,T2,TF>
665 {
667 
668  if( (~lhs).size() != (~rhs).size() )
669  throw std::invalid_argument( "Vector sizes do not match" );
670 
671  return SVecDVecMultExpr<T1,T2,TF>( ~lhs, ~rhs );
672 }
673 //*************************************************************************************************
674 
675 
676 
677 
678 //=================================================================================================
679 //
680 // EXPRESSION TRAIT SPECIALIZATIONS
681 //
682 //=================================================================================================
683 
684 //*************************************************************************************************
686 template< typename VT1, typename VT2, bool TF, bool AF >
687 struct SubvectorExprTrait< SVecDVecMultExpr<VT1,VT2,TF>, AF >
688 {
689  public:
690  //**********************************************************************************************
691  typedef typename MultExprTrait< typename SubvectorExprTrait<const VT1,AF>::Type
692  , typename SubvectorExprTrait<const VT2,AF>::Type >::Type Type;
693  //**********************************************************************************************
694 };
696 //*************************************************************************************************
697 
698 } // namespace blaze
699 
700 #endif
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SVecDVecMultExpr.h:177
Pointer difference type of the Blaze library.
ValueType & ReferenceType
Reference return type.
Definition: SVecDVecMultExpr.h:176
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecDVecMultExpr.h:349
void reset(DynamicMatrix< Type, SO > &m)
Resetting the given dense matrix.
Definition: DynamicMatrix.h:4599
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
LeftOperand leftOperand() const
Returns the left-hand side sparse vector operand.
Definition: SVecDVecMultExpr.h:359
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:4329
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecDVecMultExpr.h:319
Header file for the SparseVector base class.
RightOperand vec_
Right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:283
Efficient implementation of a compressed matrix.The CompressedMatrix class template is the represent...
Definition: CompressedMatrix.h:199
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecDVecMultExpr.h:264
size_t index() const
Access to the current index of the sparse element.
Definition: SVecDVecMultExpr.h:242
VT1::TransposeType TT1
Transpose type of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:99
IteratorCategory iterator_category
The iterator category.
Definition: SVecDVecMultExpr.h:180
MultExprTrait< RN1, RN2 >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SVecDVecMultExpr.h:113
RightOperand rhs_
Right-hand side dense vector of the multiplication expression.
Definition: SVecDVecMultExpr.h:401
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2408
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:251
VT2::CompositeType CT2
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:98
const DMatSerialExpr< MT, SO > serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:690
Header file for the Computation base class.
ValueType value_type
Type of the underlying pointers.
Definition: SVecDVecMultExpr.h:181
SVecDVecMultExpr< VT1, VT2, TF > This
Type of this SVecDVecMultExpr instance.
Definition: SVecDVecMultExpr.h:137
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecDVecMultExpr.h:393
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecDVecMultExpr.h:339
Constraint on the data type.
SelectType< IsExpression< VT2 >::value, const VT2, const VT2 & >::Type RightOperand
Composite type of the right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:152
RemoveReference< LeftOperand >::Type::ConstIterator IteratorType
Iterator type of the sparse vector expression.
Definition: SVecDVecMultExpr.h:171
ResultType::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SVecDVecMultExpr.h:139
VT1::CompositeType CT1
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:97
Header file for the MultExprTrait class template.
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecDVecMultExpr.h:308
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
ResultType::ElementType ElementType
Resulting element type.
Definition: SVecDVecMultExpr.h:140
Header file for the ValueIndexPair class.
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.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2412
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecDVecMultExpr.h:381
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:271
SelectType< IsExpression< VT1 >::value, const VT1, const VT1 & >::Type LeftOperand
Composite type of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:149
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_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
LeftOperand lhs_
Left-hand side sparse vector of the multiplication expression.
Definition: SVecDVecMultExpr.h:400
Constraint on the data type.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2405
Constraint on the data type.
Header file for the VecVecMultExpr base class.
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:361
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
VT2::ResultType RT2
Result type of the right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:94
Iterator over the elements of the sparse vector-dense vector multiplication expression.
Definition: SVecDVecMultExpr.h:163
Header file for the EnableIf class template.
VT2::ReturnType RN2
Return type of the right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:96
RightOperand rightOperand() const
Returns the right-hand side dense vector operand.
Definition: SVecDVecMultExpr.h:369
Header file for the serial shim.
SVecDVecMultExpr(const VT1 &lhs, const VT2 &rhs)
Constructor for the SVecDVecMultExpr class.
Definition: SVecDVecMultExpr.h:294
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecDVecMultExpr.h:232
ValueType * PointerType
Pointer return type.
Definition: SVecDVecMultExpr.h:175
DifferenceType difference_type
Difference between two iterators.
Definition: SVecDVecMultExpr.h:184
VT1::ResultType RT1
Result type of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:93
MultTrait< RT1, RT2 >::Type ResultType
Result type for expression template evaluations.
Definition: SVecDVecMultExpr.h:138
SelectType< useAssign, const ResultType, const SVecDVecMultExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: SVecDVecMultExpr.h:146
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2407
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
VT1::ReturnType RN1
Return type of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:95
Header file for run time assertion macros.
Base template for the MultTrait class.
Definition: MultTrait.h:141
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:301
ValueIndexPair< ElementType > Element
Element type of the sparse vector expression.
Definition: SVecDVecMultExpr.h:168
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
Header file for the reset shim.
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:331
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecDVecMultExpr.h:275
Header file for the RemoveReference type trait.
ElementType ValueType
Type of the underlying pointers.
Definition: SVecDVecMultExpr.h:174
#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
IteratorType it_
Iterator over the elements of the left-hand side sparse vector expression.
Definition: SVecDVecMultExpr.h:282
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:69
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SVecDVecMultExpr.h:143
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecDVecMultExpr.h:201
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:108
#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:2403
PointerType pointer
Pointer return type.
Definition: SVecDVecMultExpr.h:182
Header file for basic type definitions.
const Element operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecDVecMultExpr.h:212
Header file for the SubvectorExprTrait class template.
ConstIterator(IteratorType it, RightOperand vec)
Constructor for the ConstIterator class.
Definition: SVecDVecMultExpr.h:190
VT2::TransposeType TT2
Transpose type of the right-hand side dense vector expression.
Definition: SVecDVecMultExpr.h:100
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecDVecMultExpr.h:329
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecDVecMultExpr.h:253
Evaluation of the resulting expression type of a multiplication.Via this type trait it is possible to...
Definition: MultExprTrait.h:137
#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
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecDVecMultExpr.h:173
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecDVecMultExpr.h:222
ReferenceType reference
Reference return type.
Definition: SVecDVecMultExpr.h:183
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
Expression object for sparse vector-dense vector multiplications.The SVecDVecMultExpr class represent...
Definition: Forward.h:111