SVecTransExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SVECTRANSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SVECTRANSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
57 #include <blaze/util/Assert.h>
58 #include <blaze/util/EmptyType.h>
59 #include <blaze/util/EnableIf.h>
61 #include <blaze/util/SelectType.h>
62 #include <blaze/util/Types.h>
64 
65 
66 namespace blaze {
67 
68 //=================================================================================================
69 //
70 // CLASS SVECTRANSEXPR
71 //
72 //=================================================================================================
73 
74 //*************************************************************************************************
81 template< typename VT // Type of the sparse vector
82  , bool TF > // Transpose flag
83 class SVecTransExpr : public SparseVector< SVecTransExpr<VT,TF>, TF >
84  , private VecTransExpr
85  , private SelectType< IsComputation<VT>::value, Computation, EmptyType >::Type
86 {
87  private:
88  //**Type definitions****************************************************************************
89  typedef typename VT::CompositeType CT;
90  //**********************************************************************************************
91 
92  //**Serial evaluation strategy******************************************************************
94 
100  enum { useAssign = RequiresEvaluation<VT>::value };
101 
103  template< typename VT2 >
105  struct UseAssign {
106  enum { value = useAssign };
107  };
109  //**********************************************************************************************
110 
111  //**Parallel evaluation strategy****************************************************************
113 
118  template< typename VT2 >
119  struct UseSMPAssign {
120  enum { value = VT2::smpAssignable && useAssign };
121  };
123  //**********************************************************************************************
124 
125  public:
126  //**Type definitions****************************************************************************
128  typedef typename VT::TransposeType ResultType;
129  typedef typename VT::ResultType TransposeType;
130  typedef typename VT::ElementType ElementType;
131  typedef typename VT::ReturnType ReturnType;
132 
135 
137  typedef typename SelectType< IsExpression<VT>::value, const VT, const VT& >::Type Operand;
138  //**********************************************************************************************
139 
140  //**Compilation flags***************************************************************************
142  enum { smpAssignable = VT::smpAssignable };
143  //**********************************************************************************************
144 
145  //**ConstIterator class definition**************************************************************
149  {
150  public:
151  //**Type definitions*************************************************************************
154 
155  typedef std::forward_iterator_tag IteratorCategory;
156  typedef typename std::iterator_traits<IteratorType>::value_type ValueType;
157  typedef typename std::iterator_traits<IteratorType>::pointer PointerType;
158  typedef typename std::iterator_traits<IteratorType>::reference ReferenceType;
159  typedef typename std::iterator_traits<IteratorType>::difference_type DifferenceType;
160 
161  // STL iterator requirements
162  typedef IteratorCategory iterator_category;
163  typedef ValueType value_type;
164  typedef PointerType pointer;
165  typedef ReferenceType reference;
166  typedef DifferenceType difference_type;
167  //*******************************************************************************************
168 
169  //**Constructor******************************************************************************
172  inline ConstIterator( IteratorType it )
173  : it_( it ) // Iterator over the elements of the sparse vector expression
174  {}
175  //*******************************************************************************************
176 
177  //**Prefix increment operator****************************************************************
183  ++it_;
184  return *this;
185  }
186  //*******************************************************************************************
187 
188  //**Element access operator******************************************************************
193  inline const ValueType operator*() const {
194  return *it_;
195  }
196  //*******************************************************************************************
197 
198  //**Element access operator******************************************************************
203  inline const ConstIterator* operator->() const {
204  return this;
205  }
206  //*******************************************************************************************
207 
208  //**Value function***************************************************************************
213  inline ReturnType value() const {
214  return it_->value();
215  }
216  //*******************************************************************************************
217 
218  //**Index function***************************************************************************
223  inline size_t index() const {
224  return it_->index();
225  }
226  //*******************************************************************************************
227 
228  //**Equality operator************************************************************************
234  inline bool operator==( const ConstIterator& rhs ) const {
235  return it_ == rhs.it_;
236  }
237  //*******************************************************************************************
238 
239  //**Inequality operator**********************************************************************
245  inline bool operator!=( const ConstIterator& rhs ) const {
246  return it_ != rhs.it_;
247  }
248  //*******************************************************************************************
249 
250  //**Subtraction operator*********************************************************************
256  inline DifferenceType operator-( const ConstIterator& rhs ) const {
257  return it_ - rhs.it_;
258  }
259  //*******************************************************************************************
260 
261  private:
262  //**Member variables*************************************************************************
263  IteratorType it_;
264  //*******************************************************************************************
265  };
266  //**********************************************************************************************
267 
268  //**Constructor*********************************************************************************
273  explicit inline SVecTransExpr( const VT& sv )
274  : sv_( sv ) // Sparse vector of the transposition expression
275  {}
276  //**********************************************************************************************
277 
278  //**Subscript operator**************************************************************************
284  inline ReturnType operator[]( size_t index ) const {
285  BLAZE_INTERNAL_ASSERT( index < sv_.size(), "Invalid vector access index" );
286  return sv_[index];
287  }
288  //**********************************************************************************************
289 
290  //**Begin function******************************************************************************
295  inline ConstIterator begin() const {
296  return ConstIterator( sv_.begin() );
297  }
298  //**********************************************************************************************
299 
300  //**End function********************************************************************************
305  inline ConstIterator end() const {
306  return ConstIterator( sv_.end() );
307  }
308  //**********************************************************************************************
309 
310  //**Size function*******************************************************************************
315  inline size_t size() const {
316  return sv_.size();
317  }
318  //**********************************************************************************************
319 
320  //**NonZeros function***************************************************************************
325  inline size_t nonZeros() const {
326  return sv_.nonZeros();
327  }
328  //**********************************************************************************************
329 
330  //**Find function*******************************************************************************
336  inline ConstIterator find( size_t index ) const {
338  return ConstIterator( sv_.find( index ) );
339  }
340  //**********************************************************************************************
341 
342  //**LowerBound function*************************************************************************
348  inline ConstIterator lowerBound( size_t index ) const {
350  return ConstIterator( sv_.lowerBound( index ) );
351  }
352  //**********************************************************************************************
353 
354  //**UpperBound function*************************************************************************
360  inline ConstIterator upperBound( size_t index ) const {
362  return ConstIterator( sv_.upperBound( index ) );
363  }
364  //**********************************************************************************************
365 
366  //**Operand access******************************************************************************
371  inline Operand operand() const {
372  return sv_;
373  }
374  //**********************************************************************************************
375 
376  //**********************************************************************************************
382  template< typename T >
383  inline bool canAlias( const T* alias ) const {
384  return sv_.canAlias( alias );
385  }
386  //**********************************************************************************************
387 
388  //**********************************************************************************************
394  template< typename T >
395  inline bool isAliased( const T* alias ) const {
396  return sv_.isAliased( alias );
397  }
398  //**********************************************************************************************
399 
400  //**********************************************************************************************
405  inline bool canSMPAssign() const {
406  return sv_.canSMPAssign();
407  }
408  //**********************************************************************************************
409 
410  private:
411  //**Member variables****************************************************************************
412  Operand sv_;
413  //**********************************************************************************************
414 
415  //**Assignment to dense vectors*****************************************************************
429  template< typename VT2 > // Type of the target dense vector
430  friend inline typename EnableIf< UseAssign<VT2> >::Type
431  assign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
432  {
434 
435  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
436 
437  DVecTransposer<VT2,!TF> tmp( ~lhs );
438  assign( tmp, rhs.sv_ );
439  }
441  //**********************************************************************************************
442 
443  //**Assignment to sparse vectors****************************************************************
457  template< typename VT2 > // Type of the target sparse vector
458  friend inline typename EnableIf< UseAssign<VT2> >::Type
459  assign( SparseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
460  {
462 
463  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
464 
465  SVecTransposer<VT2,!TF> tmp( ~lhs );
466  assign( tmp, rhs.sv_ );
467  }
469  //**********************************************************************************************
470 
471  //**Addition assignment to dense vectors********************************************************
485  template< typename VT2 > // Type of the target dense vector
486  friend inline typename EnableIf< UseAssign<VT2> >::Type
487  addAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
488  {
490 
491  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
492 
493  DVecTransposer<VT2,!TF> tmp( ~lhs );
494  addAssign( tmp, rhs.sv_ );
495  }
497  //**********************************************************************************************
498 
499  //**Addition assignment to sparse vectors*******************************************************
500  // No special implementation for the addition assignment to sparse vectors.
501  //**********************************************************************************************
502 
503  //**Subtraction assignment to dense vectors*****************************************************
517  template< typename VT2 > // Type of the target dense vector
518  friend inline typename EnableIf< UseAssign<VT2> >::Type
519  subAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
520  {
522 
523  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
524 
525  DVecTransposer<VT2,!TF> tmp( ~lhs );
526  subAssign( tmp, rhs.sv_ );
527  }
529  //**********************************************************************************************
530 
531  //**Subtraction assignment to sparse vectors****************************************************
532  // No special implementation for the subtraction assignment to sparse vectors.
533  //**********************************************************************************************
534 
535  //**Multiplication assignment to dense vectors**************************************************
549  template< typename VT2 > // Type of the target dense vector
550  friend inline typename EnableIf< UseAssign<VT2> >::Type
551  multAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
552  {
554 
555  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
556 
557  DVecTransposer<VT2,!TF> tmp( ~lhs );
558  multAssign( tmp, rhs.sv_ );
559  }
561  //**********************************************************************************************
562 
563  //**Multiplication assignment to sparse vectors*************************************************
564  // No special implementation for the multiplication assignment to sparse vectors.
565  //**********************************************************************************************
566 
567  //**SMP assignment to dense vectors*************************************************************
581  template< typename VT2 > // Type of the target dense vector
582  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
583  smpAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
584  {
586 
587  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
588 
589  DVecTransposer<VT2,!TF> tmp( ~lhs );
590  smpAssign( tmp, rhs.sv_ );
591  }
593  //**********************************************************************************************
594 
595  //**SMP assignment to sparse vectors************************************************************
609  template< typename VT2 > // Type of the target sparse vector
610  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
611  smpAssign( SparseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
612  {
614 
615  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
616 
617  SVecTransposer<VT2,!TF> tmp( ~lhs );
618  smpAssign( tmp, rhs.sv_ );
619  }
621  //**********************************************************************************************
622 
623  //**SMP addition assignment to dense vectors****************************************************
637  template< typename VT2 > // Type of the target dense vector
638  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
639  smpAddAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
640  {
642 
643  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
644 
645  DVecTransposer<VT2,!TF> tmp( ~lhs );
646  smpAddAssign( tmp, rhs.sv_ );
647  }
649  //**********************************************************************************************
650 
651  //**SMP addition assignment to sparse vectors***************************************************
652  // No special implementation for the SMP addition assignment to sparse vectors.
653  //**********************************************************************************************
654 
655  //**SMP subtraction assignment to dense vectors*************************************************
669  template< typename VT2 > // Type of the target dense vector
670  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
671  smpSubAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
672  {
674 
675  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
676 
677  DVecTransposer<VT2,!TF> tmp( ~lhs );
678  smpSubAssign( tmp, rhs.sv_ );
679  }
681  //**********************************************************************************************
682 
683  //**SMP subtraction assignment to sparse vectors************************************************
684  // No special implementation for the SMP subtraction assignment to sparse vectors.
685  //**********************************************************************************************
686 
687  //**SMP multiplication assignment to dense vectors**********************************************
702  template< typename VT2 > // Type of the target dense vector
703  friend inline typename EnableIf< UseSMPAssign<VT2> >::Type
704  smpMultAssign( DenseVector<VT2,TF>& lhs, const SVecTransExpr& rhs )
705  {
707 
708  BLAZE_INTERNAL_ASSERT( (~lhs).size() == rhs.size(), "Invalid vector sizes" );
709 
710  DVecTransposer<VT2,!TF> tmp( ~lhs );
711  smpMultAssign( tmp, rhs.sv_ );
712  }
714  //**********************************************************************************************
715 
716  //**SMP multiplication assignment to sparse vectors*********************************************
717  // No special implementation for the SMP multiplication assignment to sparse vectors.
718  //**********************************************************************************************
719 
720  //**Trans function******************************************************************************
738  template< typename VT2 // Type of the sparse vector
739  , bool TF2 > // Transpose flag of the sparse vector
740  friend inline Operand trans( const SVecTransExpr<VT2,TF2>& sv )
741  {
743 
744  return sv.sv_;
745  }
747  //**********************************************************************************************
748 
749  //**Compile time checks*************************************************************************
753  //**********************************************************************************************
754 };
755 //*************************************************************************************************
756 
757 
758 
759 
760 //=================================================================================================
761 //
762 // GLOBAL OPERATORS
763 //
764 //=================================================================================================
765 
766 //*************************************************************************************************
785 template< typename VT // Type of the sparse vector
786  , bool TF > // Transpose flag
788 {
790 
791  return SVecTransExpr<VT,!TF>( ~sv );
792 }
793 //*************************************************************************************************
794 
795 
796 
797 
798 //=================================================================================================
799 //
800 // SIZE SPECIALIZATIONS
801 //
802 //=================================================================================================
803 
804 //*************************************************************************************************
806 template< typename VT, bool TF >
807 struct Size< SVecTransExpr<VT,TF> >
808  : public Size<VT>
809 {};
811 //*************************************************************************************************
812 
813 
814 
815 
816 //=================================================================================================
817 //
818 // EXPRESSION TRAIT SPECIALIZATIONS
819 //
820 //=================================================================================================
821 
822 //*************************************************************************************************
824 template< typename VT, bool TF, bool AF >
825 struct SubvectorExprTrait< SVecTransExpr<VT,TF>, AF >
826 {
827  public:
828  //**********************************************************************************************
829  typedef typename TransExprTrait< typename SubvectorExprTrait<const VT,AF>::Type >::Type Type;
830  //**********************************************************************************************
831 };
833 //*************************************************************************************************
834 
835 } // namespace blaze
836 
837 #endif
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: SVecTransExpr.h:405
BLAZE_ALWAYS_INLINE 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:879
Operand sv_
Sparse vector of the transposition expression.
Definition: SVecTransExpr.h:412
PointerType pointer
Pointer return type.
Definition: SVecTransExpr.h:164
Header file for basic type definitions.
Header file for the SparseVector base class.
ConstIterator & operator++()
Pre-increment operator.
Definition: SVecTransExpr.h:182
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SVecTransExpr.h:395
ConstIterator begin() const
Returns an iterator to the first non-zero element of the sparse vector.
Definition: SVecTransExpr.h:295
std::iterator_traits< IteratorType >::pointer PointerType
Pointer return type.
Definition: SVecTransExpr.h:157
SelectType< IsExpression< VT >::value, const VT, const VT & >::Type Operand
Composite data type of the sparse vector expression.
Definition: SVecTransExpr.h:137
ValueType value_type
Type of the underlying pointers.
Definition: SVecTransExpr.h:163
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
VT::TransposeType ResultType
Result type for expression template evaluations.
Definition: SVecTransExpr.h:128
Expression object for sparse vector transpositions.The SVecTransExpr class represents the compile tim...
Definition: Forward.h:122
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SVecTransExpr.h:245
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: SVecTransExpr.h:131
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SVecTransExpr.h:155
Expression object for the transposition of a dense vector.The DVecTransposer class is a wrapper objec...
Definition: DVecTransposer.h:72
ConstIterator lowerBound(size_t index) const
Returns an iterator to the first index not less then the given index.
Definition: SVecTransExpr.h:348
VT::ResultType TransposeType
Transpose type for expression template evaluations.
Definition: SVecTransExpr.h:129
SVecTransExpr(const VT &sv)
Constructor for the SVecTransExpr class.
Definition: SVecTransExpr.h:273
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SVecTransExpr.h:234
const ConstIterator * operator->() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecTransExpr.h:203
Compile time type selection.The SelectType class template selects one of the two given types T1 and T...
Definition: SelectType.h:59
size_t index() const
Access to the current index of the sparse element.
Definition: SVecTransExpr.h:223
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the dense vector transposer.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
std::iterator_traits< IteratorType >::value_type ValueType
Type of the underlying pointers.
Definition: SVecTransExpr.h:156
IteratorCategory iterator_category
The iterator category.
Definition: SVecTransExpr.h:162
BLAZE_ALWAYS_INLINE 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:635
Iterator over the elements of the sparse vector absolute value expression.
Definition: SVecTransExpr.h:148
std::iterator_traits< IteratorType >::reference ReferenceType
Reference return type.
Definition: SVecTransExpr.h:158
Expression object for the transposition of a sparse vector.The SVecTransposer class is a wrapper obje...
Definition: Forward.h:123
SelectType< useAssign, const ResultType, const SVecTransExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: SVecTransExpr.h:134
Operand operand() const
Returns the sparse vector operand.
Definition: SVecTransExpr.h:371
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
ConstIterator find(size_t index) const
Searches for a specific vector element.
Definition: SVecTransExpr.h:336
DifferenceType difference_type
Difference between two iterators.
Definition: SVecTransExpr.h:166
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SVecTransExpr.h:256
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Constraint on the data type.
Header file for the SelectType class template.
Header file for all forward declarations for expression class templates.
Constraint on the data type.
Header file for the EnableIf class template.
ReturnType value() const
Access to the current value of the sparse element.
Definition: SVecTransExpr.h:213
EnableIf< IsDenseMatrix< MT1 > >::Type smpSubAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:160
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2506
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
VT::CompositeType CT
Composite type of the sparse vector expression.
Definition: SVecTransExpr.h:89
Header file for the VecTransExpr base class.
Header file for run time assertion macros.
EnableIf< IsDenseMatrix< MT1 > >::Type smpAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:98
BLAZE_ALWAYS_INLINE 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:742
std::iterator_traits< IteratorType >::difference_type DifferenceType
Difference between two iterators.
Definition: SVecTransExpr.h:159
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
size_t nonZeros() const
Returns the number of non-zero elements in the sparse vector.
Definition: SVecTransExpr.h:325
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SVecTransExpr.h:383
RemoveReference< Operand >::Type::ConstIterator IteratorType
Iterator type of the sparse vector expression.
Definition: SVecTransExpr.h:153
Header file for the TransExprTrait class template.
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: SVecTransExpr.h:172
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:118
ConstIterator end() const
Returns an iterator just past the last non-zero element of the sparse vector.
Definition: SVecTransExpr.h:305
Header file for the RemoveReference type trait.
VT::ElementType ElementType
Resulting element type.
Definition: SVecTransExpr.h:130
ReturnType operator[](size_t index) const
Subscript operator for the direct access to the vector elements.
Definition: SVecTransExpr.h:284
Header file for the sparse vector transposer.
const DMatTransExpr< MT,!SO > trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:937
ConstIterator upperBound(size_t index) const
Returns an iterator to the first index greater then the given index.
Definition: SVecTransExpr.h:360
EnableIf< IsDenseMatrix< MT1 > >::Type smpAddAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP addition assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:129
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:2502
Header file for the SubvectorExprTrait class template.
size_t size() const
Returns the current size/dimension of the vector.
Definition: SVecTransExpr.h:315
SVecTransExpr< VT, TF > This
Type of this SVecTransExpr instance.
Definition: SVecTransExpr.h:127
ReferenceType reference
Reference return type.
Definition: SVecTransExpr.h:165
const ValueType operator*() const
Direct access to the sparse vector element at the current iterator position.
Definition: SVecTransExpr.h:193
Header file for the empty type.
EnableIf< IsDenseVector< VT1 > >::Type smpMultAssign(Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs)
Default implementation of the SMP multiplication assignment of a vector to a dense vector...
Definition: DenseVector.h:189
Header file for the Size type trait.
#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
IteratorType it_
Iterator over the elements of the sparse vector expression.
Definition: SVecTransExpr.h:263
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.
BLAZE_ALWAYS_INLINE 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:849