All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SMatAbsExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_SMATABSEXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_SMATABSEXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <cmath>
44 #include <iterator>
67 #include <blaze/util/Assert.h>
69 #include <blaze/util/EnableIf.h>
70 #include <blaze/util/InvalidType.h>
72 #include <blaze/util/SelectType.h>
73 #include <blaze/util/Types.h>
75 
76 
77 namespace blaze {
78 
79 //=================================================================================================
80 //
81 // CLASS SMATABSEXPR
82 //
83 //=================================================================================================
84 
85 //*************************************************************************************************
92 template< typename MT // Type of the sparse matrix
93  , bool SO > // Storage order
94 class SMatAbsExpr : public SparseMatrix< SMatAbsExpr<MT,SO>, SO >
95  , private MatAbsExpr
96  , private Computation
97 {
98  private:
99  //**Type definitions****************************************************************************
100  typedef typename MT::ResultType RT;
101  typedef typename MT::ReturnType RN;
102  typedef typename MT::CompositeType CT;
103  //**********************************************************************************************
104 
105  //**Return type evaluation**********************************************************************
107 
112  enum { returnExpr = !IsTemporary<RN>::value };
113 
116  //**********************************************************************************************
117 
118  //**Evaluation strategy*************************************************************************
120 
126  enum { useAssign = RequiresEvaluation<MT>::value };
127 
129  template< typename MT2 >
131  struct UseAssign {
132  enum { value = useAssign };
133  };
135  //**********************************************************************************************
136 
137  public:
138  //**Type definitions****************************************************************************
140  typedef typename MT::ResultType ResultType;
141  typedef typename MT::OppositeType OppositeType;
142  typedef typename MT::TransposeType TransposeType;
143  typedef typename MT::ElementType ElementType;
144 
147 
150 
152  typedef typename SelectType< IsExpression<MT>::value, const MT, const MT& >::Type Operand;
153  //**********************************************************************************************
154 
155  //**ConstIterator class definition**************************************************************
159  {
160  public:
161  //**Type definitions*************************************************************************
164 
167 
168  typedef std::forward_iterator_tag IteratorCategory;
169  typedef Element ValueType;
173 
174  // STL iterator requirements
180  //*******************************************************************************************
181 
182  //**Constructor******************************************************************************
186  : it_( it ) // Iterator over the elements of the sparse matrix expression
187  {}
188  //*******************************************************************************************
189 
190  //**Prefix increment operator****************************************************************
196  ++it_;
197  return *this;
198  }
199  //*******************************************************************************************
200 
201  //**Element access operator******************************************************************
206  inline const Element operator*() const {
207  using std::abs;
208  return Element( abs( it_->value() ), it_->index() );
209  }
210  //*******************************************************************************************
211 
212  //**Element access operator******************************************************************
217  inline const ConstIterator* operator->() const {
218  return this;
219  }
220  //*******************************************************************************************
221 
222  //**Value function***************************************************************************
227  inline ReturnType value() const {
228  using std::abs;
229  return abs( it_->value() );
230  }
231  //*******************************************************************************************
232 
233  //**Index function***************************************************************************
238  inline size_t index() const {
239  return it_->index();
240  }
241  //*******************************************************************************************
242 
243  //**Equality operator************************************************************************
249  inline bool operator==( const ConstIterator& rhs ) const {
250  return it_ == rhs.it_;
251  }
252  //*******************************************************************************************
253 
254  //**Inequality operator**********************************************************************
260  inline bool operator!=( const ConstIterator& rhs ) const {
261  return it_ != rhs.it_;
262  }
263  //*******************************************************************************************
264 
265  //**Subtraction operator*********************************************************************
271  inline DifferenceType operator-( const ConstIterator& rhs ) const {
272  return it_ - rhs.it_;
273  }
274  //*******************************************************************************************
275 
276  private:
277  //**Member variables*************************************************************************
279  //*******************************************************************************************
280  };
281  //**********************************************************************************************
282 
283  //**Compilation flags***************************************************************************
285  enum { smpAssignable = MT::smpAssignable };
286  //**********************************************************************************************
287 
288  //**Constructor*********************************************************************************
293  explicit inline SMatAbsExpr( const MT& sm )
294  : sm_( sm ) // Sparse matrix of the absolute value expression
295  {}
296  //**********************************************************************************************
297 
298  //**Access operator*****************************************************************************
305  inline ReturnType operator()( size_t i, size_t j ) const {
306  using std::abs;
307  BLAZE_INTERNAL_ASSERT( i < sm_.rows() , "Invalid row access index" );
308  BLAZE_INTERNAL_ASSERT( j < sm_.columns(), "Invalid column access index" );
309  return abs( sm_(i,j) );
310  }
311  //**********************************************************************************************
312 
313  //**Begin function******************************************************************************
319  inline ConstIterator begin( size_t i ) const {
320  return ConstIterator( sm_.begin(i) );
321  }
322  //**********************************************************************************************
323 
324  //**End function********************************************************************************
330  inline ConstIterator end( size_t i ) const {
331  return ConstIterator( sm_.end(i) );
332  }
333  //**********************************************************************************************
334 
335  //**Rows function*******************************************************************************
340  inline size_t rows() const {
341  return sm_.rows();
342  }
343  //**********************************************************************************************
344 
345  //**Columns function****************************************************************************
350  inline size_t columns() const {
351  return sm_.columns();
352  }
353  //**********************************************************************************************
354 
355  //**NonZeros function***************************************************************************
360  inline size_t nonZeros() const {
361  return sm_.nonZeros();
362  }
363  //**********************************************************************************************
364 
365  //**NonZeros function***************************************************************************
371  inline size_t nonZeros( size_t i ) const {
372  return sm_.nonZeros(i);
373  }
374  //**********************************************************************************************
375 
376  //**Operand access******************************************************************************
381  inline Operand operand() const {
382  return sm_;
383  }
384  //**********************************************************************************************
385 
386  //**********************************************************************************************
392  template< typename T >
393  inline bool canAlias( const T* alias ) const {
394  return sm_.canAlias( alias );
395  }
396  //**********************************************************************************************
397 
398  //**********************************************************************************************
404  template< typename T >
405  inline bool isAliased( const T* alias ) const {
406  return sm_.isAliased( alias );
407  }
408  //**********************************************************************************************
409 
410  //**********************************************************************************************
415  inline bool canSMPAssign() const {
416  return sm_.canSMPAssign();
417  }
418  //**********************************************************************************************
419 
420  private:
421  //**Member variables****************************************************************************
423  //**********************************************************************************************
424 
425  //**Assignment to dense matrices****************************************************************
439  template< typename MT2 // Type of the target dense matrix
440  , bool SO2 > // Storage order of the target dense matrix
441  friend inline typename EnableIf< UseAssign<MT2> >::Type
442  assign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
443  {
445 
446  using std::abs;
447 
448  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
449  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
450 
451  assign ( ~lhs, rhs.sm_ );
452  smpAssign( ~lhs, abs( ~lhs ) );
453  }
455  //**********************************************************************************************
456 
457  //**Assignment to row-major sparse matrices*****************************************************
471  template< typename MT2 > // Type of the target sparse matrix
472  friend inline typename EnableIf< UseAssign<MT2> >::Type
473  assign( SparseMatrix<MT2,false>& lhs, const SMatAbsExpr& rhs )
474  {
476 
477  using std::abs;
478 
479  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
480  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
481 
482  typedef typename MT2::Iterator Iterator;
483 
484  assign( ~lhs, rhs.sm_ );
485 
486  const size_t m( rhs.rows() );
487 
488  for( size_t i=0UL; i<m; ++i ) {
489  const Iterator end( (~lhs).end(i) );
490  for( Iterator element=(~lhs).begin(i); element!=end; ++element ) {
491  element->value() = abs( element->value() );
492  }
493  }
494  }
496  //**********************************************************************************************
497 
498  //**Assignment to column-major sparse matrices**************************************************
512  template< typename MT2 > // Type of the target sparse matrix
513  friend inline typename EnableIf< UseAssign<MT2> >::Type
514  assign( SparseMatrix<MT2,true>& lhs, const SMatAbsExpr& rhs )
515  {
517 
518  using std::abs;
519 
520  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
521  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
522 
523  typedef typename MT2::Iterator Iterator;
524 
525  assign( ~lhs, rhs.sm_ );
526 
527  const size_t n( rhs.columns() );
528 
529  for( size_t j=0UL; j<n; ++j ) {
530  const Iterator end( (~lhs).end(j) );
531  for( Iterator element=(~lhs).begin(j); element!=end; ++element ) {
532  element->value() = abs( element->value() );
533  }
534  }
535  }
537  //**********************************************************************************************
538 
539  //**Addition assignment to dense matrices*******************************************************
553  template< typename MT2 // Type of the target dense matrix
554  , bool SO2 > // Storage order of the target dense matrix
555  friend inline typename EnableIf< UseAssign<MT2> >::Type
556  addAssign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
557  {
559 
562 
563  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
564  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
565 
566  const ResultType tmp( rhs );
567  smpAddAssign( ~lhs, tmp );
568  }
570  //**********************************************************************************************
571 
572  //**Addition assignment to sparse matrices******************************************************
573  // No special implementation for the addition assignment to sparse matrices.
574  //**********************************************************************************************
575 
576  //**Subtraction assignment to dense matrices****************************************************
590  template< typename MT2 // Type of the target dense matrix
591  , bool SO2 > // Storage order of the target sparse matrix
592  friend inline typename EnableIf< UseAssign<MT2> >::Type
593  subAssign( DenseMatrix<MT2,SO2>& lhs, const SMatAbsExpr& rhs )
594  {
596 
599 
600  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
601  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
602 
603  const ResultType tmp( rhs );
604  smpSubAssign( ~lhs, tmp );
605  }
607  //**********************************************************************************************
608 
609  //**Subtraction assignment to sparse matrices***************************************************
610  // No special implementation for the subtraction assignment to sparse matrices.
611  //**********************************************************************************************
612 
613  //**Multiplication assignment to dense matrices*************************************************
614  // No special implementation for the multiplication assignment to dense matrices.
615  //**********************************************************************************************
616 
617  //**Multiplication assignment to sparse matrices************************************************
618  // No special implementation for the multiplication assignment to sparse matrices.
619  //**********************************************************************************************
620 
621  //**Compile time checks*************************************************************************
626  //**********************************************************************************************
627 };
628 //*************************************************************************************************
629 
630 
631 
632 
633 //=================================================================================================
634 //
635 // GLOBAL FUNCTIONS
636 //
637 //=================================================================================================
638 
639 //*************************************************************************************************
656 template< typename MT // Type of the sparse matrix
657  , bool SO > // Storage order
658 inline const SMatAbsExpr<MT,SO> abs( const SparseMatrix<MT,SO>& sm )
659 {
661 
662  return SMatAbsExpr<MT,SO>( ~sm );
663 }
664 //*************************************************************************************************
665 
666 
667 
668 
669 //=================================================================================================
670 //
671 // GLOBAL RESTRUCTURING FUNCTIONS
672 //
673 //=================================================================================================
674 
675 //*************************************************************************************************
686 template< typename MT // Type of the sparse matrix
687  , bool TF > // Transpose flag
688 inline const SMatAbsExpr<MT,TF>& abs( const SMatAbsExpr<MT,TF>& sm )
689 {
691 
692  return sm;
693 }
695 //*************************************************************************************************
696 
697 
698 
699 
700 //=================================================================================================
701 //
702 // EXPRESSION TRAIT SPECIALIZATIONS
703 //
704 //=================================================================================================
705 
706 //*************************************************************************************************
708 template< typename MT >
709 struct SMatAbsExprTrait< SMatAbsExpr<MT,false> >
710 {
711  public:
712  //**********************************************************************************************
713  typedef typename SelectType< IsSparseMatrix<MT>::value && IsRowMajorMatrix<MT>::value
714  , SMatAbsExpr<MT,false>
715  , INVALID_TYPE >::Type Type;
716  //**********************************************************************************************
717 };
719 //*************************************************************************************************
720 
721 
722 //*************************************************************************************************
724 template< typename MT >
725 struct TSMatAbsExprTrait< SMatAbsExpr<MT,true> >
726 {
727  public:
728  //**********************************************************************************************
729  typedef typename SelectType< IsSparseMatrix<MT>::value && IsColumnMajorMatrix<MT>::value
730  , SMatAbsExpr<MT,true>
731  , INVALID_TYPE >::Type Type;
732  //**********************************************************************************************
733 };
735 //*************************************************************************************************
736 
737 
738 //*************************************************************************************************
740 template< typename MT, bool SO, bool AF >
741 struct SubmatrixExprTrait< SMatAbsExpr<MT,SO>, AF >
742 {
743  public:
744  //**********************************************************************************************
745  typedef typename AbsExprTrait< typename SubmatrixExprTrait<const MT,AF>::Type >::Type Type;
746  //**********************************************************************************************
747 };
749 //*************************************************************************************************
750 
751 
752 //*************************************************************************************************
754 template< typename MT, bool SO >
755 struct RowExprTrait< SMatAbsExpr<MT,SO> >
756 {
757  public:
758  //**********************************************************************************************
759  typedef typename AbsExprTrait< typename RowExprTrait<const MT>::Type >::Type Type;
760  //**********************************************************************************************
761 };
763 //*************************************************************************************************
764 
765 
766 //*************************************************************************************************
768 template< typename MT, bool SO >
769 struct ColumnExprTrait< SMatAbsExpr<MT,SO> >
770 {
771  public:
772  //**********************************************************************************************
773  typedef typename AbsExprTrait< typename ColumnExprTrait<const MT>::Type >::Type Type;
774  //**********************************************************************************************
775 };
777 //*************************************************************************************************
778 
779 } // namespace blaze
780 
781 #endif
IteratorCategory iterator_category
The iterator category.
Definition: SMatAbsExpr.h:175
Pointer difference type of the Blaze library.
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: SMatAbsExpr.h:140
Compile time check whether the given type is a temporary vector or matrix type.This type trait class ...
Definition: IsTemporary.h:87
const SelectType< returnExpr, ExprReturnType, ElementType >::Type ReturnType
Return type for expression template evaluations.
Definition: SMatAbsExpr.h:146
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: SMatAbsExpr.h:172
ReferenceType reference
Reference return type.
Definition: SMatAbsExpr.h:178
RemoveReference< Operand >::Type::ConstIterator IteratorType
Iterator type of the sparse matrix expression.
Definition: SMatAbsExpr.h:166
PointerType pointer
Pointer return type.
Definition: SMatAbsExpr.h:177
void smpSubAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP subtraction assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:151
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: SMatAbsExpr.h:141
#define BLAZE_CONSTRAINT_MUST_BE_MATRIX_WITH_STORAGE_ORDER(T, SO)
Constraint on the data type.In case the given data type T is not a dense or sparse matrix type and in...
Definition: StorageOrder.h:242
ReturnType value() const
Access to the current value of the sparse element.
Definition: SMatAbsExpr.h:227
Header file for the ColumnExprTrait class template.
Header file for the sparse matrix SMP implementation.
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2384
Header file for the IsRowVector type trait.
const DMatAbsExpr< MT, SO > abs(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the absolute values of each single element of dm.
Definition: DMatAbsExpr.h:764
bool canSMPAssign() const
Returns whether the expression can be used in SMP assignments.
Definition: SMatAbsExpr.h:415
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: SMatAbsExpr.h:319
Header file for the Computation base class.
Header file for the RequiresEvaluation type trait.
bool isAliased(const T *alias) const
Returns whether the expression is aliased with the given address alias.
Definition: SMatAbsExpr.h:405
ValueType & ReferenceType
Reference return type.
Definition: SMatAbsExpr.h:171
MT::ElementType ElementType
Resulting element type.
Definition: SMatAbsExpr.h:143
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2380
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:104
Constraint on the data type.
Operand operand() const
Returns the sparse matrix operand.
Definition: SMatAbsExpr.h:381
Header file for the SparseMatrix base class.
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: SMatAbsExpr.h:371
ConstIterator(IteratorType it)
Constructor for the ConstIterator class.
Definition: SMatAbsExpr.h:185
Constraint on the data type.
void smpAddAssign(DenseMatrix< 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:121
Compile time check to query the requirement to evaluate an expression.Via this type trait it is possi...
Definition: RequiresEvaluation.h:90
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:251
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.
Element ValueType
Type of the underlying pointers.
Definition: SMatAbsExpr.h:169
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: SMatAbsExpr.h:260
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: SMatAbsExpr.h:305
ValueType * PointerType
Pointer return type.
Definition: SMatAbsExpr.h:170
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2388
Header file for the dense matrix SMP implementation.
size_t index() const
Access to the current index of the sparse element.
Definition: SMatAbsExpr.h:238
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
SMatAbsExpr(const MT &sm)
Constructor for the SMatAbsExpr class.
Definition: SMatAbsExpr.h:293
Header file for the MatAbsExpr base class.
Iterator over the elements of the sparse matrix absolute value expression.
Definition: SMatAbsExpr.h:158
#define BLAZE_CONSTRAINT_MUST_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type, a compilation error is created.
Definition: Reference.h:78
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2381
Constraints on the storage order of matrix types.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
Header file for the SelectType class template.
Header file for the RowExprTrait class template.
Header file for all forward declarations for expression class templates.
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: SMatAbsExpr.h:249
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatAbsExpr.h:217
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: SMatAbsExpr.h:206
Header file for the EnableIf class template.
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: SMatAbsExpr.h:142
Header file for the TSMatAbsExprTrait class template.
void smpAssign(DenseMatrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs)
Default implementation of the SMP assignment of a matrix to a dense matrix.
Definition: DenseMatrix.h:91
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: SMatAbsExpr.h:360
bool canAlias(const T *alias) const
Returns whether the expression can alias with the given address alias.
Definition: SMatAbsExpr.h:393
Header file for the IsSparseVector type trait.
Header file for the SubmatrixExprTrait class template.
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2383
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
size_t rows() const
Returns the current number of rows of the matrix.
Definition: SMatAbsExpr.h:340
Header file for run time assertion macros.
Utility type for generic codes.
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
Substitution Failure Is Not An Error (SFINAE) class.The EnableIf class template is an auxiliary tool ...
Definition: EnableIf.h:184
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
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2387
Header file for the RemoveReference type trait.
IteratorType it_
Iterator over the elements of the sparse matrix expression.
Definition: SMatAbsExpr.h:278
ConstIterator & operator++()
Pre-increment operator.
Definition: SMatAbsExpr.h:195
Header file for the SMatAbsExprTrait class template.
SelectType< useAssign, const ResultType, const SMatAbsExpr & >::Type CompositeType
Data type for composite expression templates.
Definition: SMatAbsExpr.h:149
MT::ResultType RT
Result type of the sparse matrix expression.
Definition: SMatAbsExpr.h:100
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: SMatAbsExpr.h:330
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: SMatAbsExpr.h:168
ValueType value_type
Type of the underlying pointers.
Definition: SMatAbsExpr.h:176
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:69
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: SMatAbsExpr.h:163
AbsExprTrait< RN >::Type ExprReturnType
Expression return type for the subscript operator.
Definition: SMatAbsExpr.h:115
Header file for the IsComputation type trait class.
DifferenceType difference_type
Difference between two iterators.
Definition: SMatAbsExpr.h:179
MT::CompositeType CT
Composite type of the sparse matrix expression.
Definition: SMatAbsExpr.h:102
#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:2379
Header file for basic type definitions.
Expression object for the sparse matrix abs() function.The SMatAbsExpr class represents the compile t...
Definition: Forward.h:86
MT::ReturnType RN
Return type of the sparse matrix expression.
Definition: SMatAbsExpr.h:101
Header file for the AbsExprTrait class template.
Header file for the IsColumnVector type trait.
Operand sm_
Sparse matrix of the absolute value expression.
Definition: SMatAbsExpr.h:422
Evaluation of the return type of an absolute value expression.Via this type trait it is possible to e...
Definition: AbsExprTrait.h:86
size_t columns() const
Returns the current number of columns of the matrix.
Definition: SMatAbsExpr.h:350
#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
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: SMatAbsExpr.h:271
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:79
SMatAbsExpr< MT, SO > This
Type of this SMatAbsExpr instance.
Definition: SMatAbsExpr.h:139
SelectType< IsExpression< MT >::value, const MT, const MT & >::Type Operand
Composite data type of the sparse matrix expression.
Definition: SMatAbsExpr.h:152
Header file for the IsExpression type trait class.
Header file for the FunctionTrace class.