Sparse.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_SPARSE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <algorithm>
44 #include <stdexcept>
45 #include <vector>
57 #include <blaze/math/Functions.h>
58 #include <blaze/math/shims/Clear.h>
60 #include <blaze/math/shims/Move.h>
69 #include <blaze/util/Assert.h>
74 #include <blaze/util/DisableIf.h>
75 #include <blaze/util/EnableIf.h>
77 #include <blaze/util/Types.h>
78 
79 
80 namespace blaze {
81 
82 //=================================================================================================
83 //
84 // CLASS TEMPLATE SPECIALIZATION FOR SPARSE MATRICES
85 //
86 //=================================================================================================
87 
88 //*************************************************************************************************
96 template< typename MT // Type of the adapted sparse matrix
97  , bool SO > // Storage order of the adapted sparse matrix
98 class StrictlyLowerMatrix<MT,SO,false>
99  : public SparseMatrix< StrictlyLowerMatrix<MT,SO,false>, SO >
100 {
101  private:
102  //**Type definitions****************************************************************************
103  typedef typename MT::OppositeType OT;
104  typedef typename MT::TransposeType TT;
105  typedef typename MT::ElementType ET;
106  //**********************************************************************************************
107 
108  public:
109  //**Type definitions****************************************************************************
110  typedef StrictlyLowerMatrix<MT,SO,false> This;
111  typedef This ResultType;
112  typedef StrictlyLowerMatrix<OT,!SO,false> OppositeType;
113  typedef StrictlyUpperMatrix<TT,!SO,false> TransposeType;
114  typedef ET ElementType;
115  typedef typename MT::ReturnType ReturnType;
116  typedef const This& CompositeType;
117  typedef StrictlyLowerProxy<MT> Reference;
118  typedef typename MT::ConstReference ConstReference;
119  typedef typename MT::Iterator Iterator;
120  typedef typename MT::ConstIterator ConstIterator;
121  //**********************************************************************************************
122 
123  //**Rebind struct definition********************************************************************
126  template< typename ET > // Data type of the other matrix
127  struct Rebind {
129  typedef StrictlyLowerMatrix< typename MT::template Rebind<ET>::Other > Other;
130  };
131  //**********************************************************************************************
132 
133  //**Compilation flags***************************************************************************
135  enum { smpAssignable = 0 };
136  //**********************************************************************************************
137 
138  //**Constructors********************************************************************************
141  explicit inline StrictlyLowerMatrix();
142  explicit inline StrictlyLowerMatrix( size_t n );
143  explicit inline StrictlyLowerMatrix( size_t n, size_t nonzeros );
144  explicit inline StrictlyLowerMatrix( size_t n, const std::vector<size_t>& nonzeros );
145 
146  inline StrictlyLowerMatrix( const StrictlyLowerMatrix& m );
147  template< typename MT2, bool SO2 > inline StrictlyLowerMatrix( const Matrix<MT2,SO2>& m );
149  //**********************************************************************************************
150 
151  //**Destructor**********************************************************************************
152  // No explicitly declared destructor.
153  //**********************************************************************************************
154 
155  //**Data access functions***********************************************************************
158  inline Reference operator()( size_t i, size_t j );
159  inline ConstReference operator()( size_t i, size_t j ) const;
160  inline Iterator begin ( size_t i );
161  inline ConstIterator begin ( size_t i ) const;
162  inline ConstIterator cbegin( size_t i ) const;
163  inline Iterator end ( size_t i );
164  inline ConstIterator end ( size_t i ) const;
165  inline ConstIterator cend ( size_t i ) const;
167  //**********************************************************************************************
168 
169  //**Assignment operators************************************************************************
172  inline StrictlyLowerMatrix& operator=( const StrictlyLowerMatrix& rhs );
173 
174  template< typename MT2, bool SO2 >
175  inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
176  operator=( const Matrix<MT2,SO2>& rhs );
177 
178  template< typename MT2, bool SO2 >
179  inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
180  operator=( const Matrix<MT2,SO2>& rhs );
181 
182  template< typename MT2, bool SO2 >
183  inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
184  operator+=( const Matrix<MT2,SO2>& rhs );
185 
186  template< typename MT2, bool SO2 >
187  inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
188  operator+=( const Matrix<MT2,SO2>& rhs );
189 
190  template< typename MT2, bool SO2 >
191  inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
192  operator-=( const Matrix<MT2,SO2>& rhs );
193 
194  template< typename MT2, bool SO2 >
195  inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix& >::Type
196  operator-=( const Matrix<MT2,SO2>& rhs );
197 
198  template< typename MT2, bool SO2 >
199  inline StrictlyLowerMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
200 
201  template< typename Other >
202  inline typename EnableIf< IsNumeric<Other>, StrictlyLowerMatrix >::Type&
203  operator*=( Other rhs );
204 
205  template< typename Other >
206  inline typename EnableIf< IsNumeric<Other>, StrictlyLowerMatrix >::Type&
207  operator/=( Other rhs );
209  //**********************************************************************************************
210 
211  //**Utility functions***************************************************************************
214  inline size_t rows() const;
215  inline size_t columns() const;
216  inline size_t capacity() const;
217  inline size_t capacity( size_t i ) const;
218  inline size_t nonZeros() const;
219  inline size_t nonZeros( size_t i ) const;
220  inline void reset();
221  inline void reset( size_t i );
222  inline void clear();
223  inline Iterator set( size_t i, size_t j, const ElementType& value );
224  inline Iterator insert( size_t i, size_t j, const ElementType& value );
225  inline void erase( size_t i, size_t j );
226  inline Iterator erase( size_t i, Iterator pos );
227  inline Iterator erase( size_t i, Iterator first, Iterator last );
228  inline void resize ( size_t n, bool preserve=true );
229  inline void reserve( size_t nonzeros );
230  inline void reserve( size_t i, size_t nonzeros );
231  inline void trim();
232  inline void trim( size_t i );
233 
234  template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
235  template< typename Other > inline StrictlyLowerMatrix& scaleDiagonal( Other scale );
236 
237  inline void swap( StrictlyLowerMatrix& m ) /* throw() */;
238 
239  static inline size_t maxNonZeros();
240  static inline size_t maxNonZeros( size_t n );
242  //**********************************************************************************************
243 
244  //**Lookup functions****************************************************************************
247  inline Iterator find ( size_t i, size_t j );
248  inline ConstIterator find ( size_t i, size_t j ) const;
249  inline Iterator lowerBound( size_t i, size_t j );
250  inline ConstIterator lowerBound( size_t i, size_t j ) const;
251  inline Iterator upperBound( size_t i, size_t j );
252  inline ConstIterator upperBound( size_t i, size_t j ) const;
254  //**********************************************************************************************
255 
256  //**Low-level utility functions*****************************************************************
259  inline void append ( size_t i, size_t j, const ElementType& value, bool check=false );
260  inline void finalize( size_t i );
262  //**********************************************************************************************
263 
264  //**Expression template evaluation functions****************************************************
267  template< typename Other > inline bool canAlias ( const Other* alias ) const;
268  template< typename Other > inline bool isAliased( const Other* alias ) const;
269 
270  inline bool canSMPAssign() const;
272  //**********************************************************************************************
273 
274  private:
275  //**Utility functions***************************************************************************
278  inline void resetUpper();
280  //**********************************************************************************************
281 
282  //**Member variables****************************************************************************
285  MT matrix_;
286 
287  //**********************************************************************************************
288 
289  //**Friend declarations*************************************************************************
290  template< typename MT2, bool SO2, bool DF2 >
291  friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
292  //**********************************************************************************************
293 
294  //**Compile time checks*************************************************************************
306  BLAZE_STATIC_ASSERT( IsResizable<MT>::value || IsSquare<MT>::value );
307  //**********************************************************************************************
308 };
310 //*************************************************************************************************
311 
312 
313 
314 
315 //=================================================================================================
316 //
317 // CONSTRUCTORS
318 //
319 //=================================================================================================
320 
321 //*************************************************************************************************
325 template< typename MT // Type of the adapted sparse matrix
326  , bool SO > // Storage order of the adapted sparse matrix
327 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix()
328  : matrix_() // The adapted sparse matrix
329 {
330  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
331 }
333 //*************************************************************************************************
334 
335 
336 //*************************************************************************************************
344 template< typename MT // Type of the adapted sparse matrix
345  , bool SO > // Storage order of the adapted sparse matrix
346 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( size_t n )
347  : matrix_( n, n, n ) // The adapted sparse matrix
348 {
350 
351  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
352 }
354 //*************************************************************************************************
355 
356 
357 //*************************************************************************************************
367 template< typename MT // Type of the adapted sparse matrix
368  , bool SO > // Storage order of the adapted sparse matrix
369 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( size_t n, size_t nonzeros )
370  : matrix_( n, n, max( nonzeros, n ) ) // The adapted sparse matrix
371 {
373 
374  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
375 }
377 //*************************************************************************************************
378 
379 
380 //*************************************************************************************************
394 template< typename MT // Type of the adapted sparse matrix
395  , bool SO > // Storage order of the adapted sparse matrix
396 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( size_t n, const std::vector<size_t>& nonzeros )
397  : matrix_( n, n, nonzeros ) // The adapted sparse matrix
398 {
400 
401  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
402 }
404 //*************************************************************************************************
405 
406 
407 //*************************************************************************************************
413 template< typename MT // Type of the adapted sparse matrix
414  , bool SO > // Storage order of the adapted sparse matrix
415 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( const StrictlyLowerMatrix& m )
416  : matrix_( m.matrix_ ) // The adapted sparse matrix
417 {
418  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
419 }
421 //*************************************************************************************************
422 
423 
424 //*************************************************************************************************
435 template< typename MT // Type of the adapted sparse matrix
436  , bool SO > // Storage order of the adapted sparse matrix
437 template< typename MT2 // Type of the foreign matrix
438  , bool SO2 > // Storage order of the foreign matrix
439 inline StrictlyLowerMatrix<MT,SO,false>::StrictlyLowerMatrix( const Matrix<MT2,SO2>& m )
440  : matrix_( ~m ) // The adapted sparse matrix
441 {
442  if( IsUniTriangular<MT2>::value ||
443  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( matrix_ ) ) )
444  throw std::invalid_argument( "Invalid setup of strictly lower matrix" );
445 
446  if( !IsStrictlyLower<MT2>::value )
447  resetUpper();
448 
449  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
450 }
452 //*************************************************************************************************
453 
454 
455 
456 
457 //=================================================================================================
458 //
459 // DATA ACCESS FUNCTIONS
460 //
461 //=================================================================================================
462 
463 //*************************************************************************************************
475 template< typename MT // Type of the adapted sparse matrix
476  , bool SO > // Storage order of the adapted sparse matrix
478  StrictlyLowerMatrix<MT,SO,false>::operator()( size_t i, size_t j )
479 {
480  BLAZE_USER_ASSERT( i<rows() , "Invalid row access index" );
481  BLAZE_USER_ASSERT( j<columns(), "Invalid column access index" );
482 
483  return Reference( matrix_, i, j );
484 }
486 //*************************************************************************************************
487 
488 
489 //*************************************************************************************************
501 template< typename MT // Type of the adapted sparse matrix
502  , bool SO > // Storage order of the adapted sparse matrix
504  StrictlyLowerMatrix<MT,SO,false>::operator()( size_t i, size_t j ) const
505 {
506  BLAZE_USER_ASSERT( i<rows() , "Invalid row access index" );
507  BLAZE_USER_ASSERT( j<columns(), "Invalid column access index" );
508 
509  return matrix_(i,j);
510 }
512 //*************************************************************************************************
513 
514 
515 //*************************************************************************************************
527 template< typename MT // Type of the adapted sparse matrix
528  , bool SO > // Storage order of the adapted sparse matrix
531 {
532  return matrix_.begin(i);
533 }
535 //*************************************************************************************************
536 
537 
538 //*************************************************************************************************
550 template< typename MT // Type of the adapted sparse matrix
551  , bool SO > // Storage order of the adapted sparse matrix
554 {
555  return matrix_.begin(i);
556 }
558 //*************************************************************************************************
559 
560 
561 //*************************************************************************************************
573 template< typename MT // Type of the adapted sparse matrix
574  , bool SO > // Storage order of the adapted sparse matrix
577 {
578  return matrix_.cbegin(i);
579 }
581 //*************************************************************************************************
582 
583 
584 //*************************************************************************************************
596 template< typename MT // Type of the adapted sparse matrix
597  , bool SO > // Storage order of the adapted sparse matrix
600 {
601  return matrix_.end(i);
602 }
604 //*************************************************************************************************
605 
606 
607 //*************************************************************************************************
619 template< typename MT // Type of the adapted sparse matrix
620  , bool SO > // Storage order of the adapted sparse matrix
622  StrictlyLowerMatrix<MT,SO,false>::end( size_t i ) const
623 {
624  return matrix_.end(i);
625 }
627 //*************************************************************************************************
628 
629 
630 //*************************************************************************************************
642 template< typename MT // Type of the adapted sparse matrix
643  , bool SO > // Storage order of the adapted sparse matrix
646 {
647  return matrix_.cend(i);
648 }
650 //*************************************************************************************************
651 
652 
653 
654 
655 //=================================================================================================
656 //
657 // ASSIGNMENT OPERATORS
658 //
659 //=================================================================================================
660 
661 //*************************************************************************************************
671 template< typename MT // Type of the adapted sparse matrix
672  , bool SO > // Storage order of the adapted sparse matrix
673 inline StrictlyLowerMatrix<MT,SO,false>&
674  StrictlyLowerMatrix<MT,SO,false>::operator=( const StrictlyLowerMatrix& rhs )
675 {
676  matrix_ = rhs.matrix_;
677 
678  return *this;
679 }
681 //*************************************************************************************************
682 
683 
684 //*************************************************************************************************
697 template< typename MT // Type of the adapted sparse matrix
698  , bool SO > // Storage order of the adapted sparse matrix
699 template< typename MT2 // Type of the right-hand side matrix
700  , bool SO2 > // Storage order of the right-hand side matrix
701 inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
702  StrictlyLowerMatrix<MT,SO,false>::operator=( const Matrix<MT2,SO2>& rhs )
703 {
704  if( IsUniTriangular<MT2>::value ||
705  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) )
706  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
707 
708  matrix_ = ~rhs;
709 
710  if( !IsStrictlyLower<MT2>::value )
711  resetUpper();
712 
713  return *this;
714 }
716 //*************************************************************************************************
717 
718 
719 //*************************************************************************************************
732 template< typename MT // Type of the adapted sparse matrix
733  , bool SO > // Storage order of the adapted sparse matrix
734 template< typename MT2 // Type of the right-hand side matrix
735  , bool SO2 > // Storage order of the right-hand side matrix
736 inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
737  StrictlyLowerMatrix<MT,SO,false>::operator=( const Matrix<MT2,SO2>& rhs )
738 {
739  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) )
740  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
741 
742  if( IsStrictlyLower<MT2>::value ) {
743  matrix_ = ~rhs;
744  }
745  else {
746  MT tmp( ~rhs );
747 
748  if( !isStrictlyLower( tmp ) )
749  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
750 
751  move( matrix_, tmp );
752  }
753 
754  if( !IsStrictlyLower<MT2>::value )
755  resetUpper();
756 
757  return *this;
758 }
760 //*************************************************************************************************
761 
762 
763 //*************************************************************************************************
776 template< typename MT // Type of the adapted sparse matrix
777  , bool SO > // Storage order of the adapted sparse matrix
778 template< typename MT2 // Type of the right-hand side matrix
779  , bool SO2 > // Storage order of the right-hand side matrix
780 inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
781  StrictlyLowerMatrix<MT,SO,false>::operator+=( const Matrix<MT2,SO2>& rhs )
782 {
783  if( IsUniTriangular<MT2>::value ||
784  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) )
785  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
786 
787  matrix_ += ~rhs;
788 
789  if( !IsStrictlyLower<MT2>::value )
790  resetUpper();
791 
792  return *this;
793 }
795 //*************************************************************************************************
796 
797 
798 //*************************************************************************************************
811 template< typename MT // Type of the adapted sparse matrix
812  , bool SO > // Storage order of the adapted sparse matrix
813 template< typename MT2 // Type of the right-hand side matrix
814  , bool SO2 > // Storage order of the right-hand side matrix
815 inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
816  StrictlyLowerMatrix<MT,SO,false>::operator+=( const Matrix<MT2,SO2>& rhs )
817 {
818  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) )
819  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
820 
821  if( IsStrictlyLower<MT2>::value ) {
822  matrix_ += ~rhs;
823  }
824  else {
825  typename MT2::ResultType tmp( ~rhs );
826 
827  if( !isStrictlyLower( tmp ) )
828  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
829 
830  matrix_ += tmp;
831  }
832 
833  if( !IsStrictlyLower<MT2>::value )
834  resetUpper();
835 
836  return *this;
837 }
839 //*************************************************************************************************
840 
841 
842 //*************************************************************************************************
855 template< typename MT // Type of the adapted sparse matrix
856  , bool SO > // Storage order of the adapted sparse matrix
857 template< typename MT2 // Type of the right-hand side matrix
858  , bool SO2 > // Storage order of the right-hand side matrix
859 inline typename DisableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
860  StrictlyLowerMatrix<MT,SO,false>::operator-=( const Matrix<MT2,SO2>& rhs )
861 {
862  if( IsUniTriangular<MT2>::value ||
863  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) )
864  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
865 
866  matrix_ -= ~rhs;
867 
868  if( !IsStrictlyLower<MT2>::value )
869  resetUpper();
870 
871  return *this;
872 }
874 //*************************************************************************************************
875 
876 
877 //*************************************************************************************************
890 template< typename MT // Type of the adapted sparse matrix
891  , bool SO > // Storage order of the adapted sparse matrix
892 template< typename MT2 // Type of the right-hand side matrix
893  , bool SO2 > // Storage order of the right-hand side matrix
894 inline typename EnableIf< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,false>& >::Type
895  StrictlyLowerMatrix<MT,SO,false>::operator-=( const Matrix<MT2,SO2>& rhs )
896 {
897  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) )
898  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
899 
900  if( IsStrictlyLower<MT2>::value ) {
901  matrix_ -= ~rhs;
902  }
903  else {
904  typename MT2::ResultType tmp( ~rhs );
905 
906  if( !isStrictlyLower( tmp ) )
907  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
908 
909  matrix_ -= tmp;
910  }
911 
912  if( !IsStrictlyLower<MT2>::value )
913  resetUpper();
914 
915  return *this;
916 }
918 //*************************************************************************************************
919 
920 
921 //*************************************************************************************************
933 template< typename MT // Type of the adapted sparse matrix
934  , bool SO > // Storage order of the adapted sparse matrix
935 template< typename MT2 // Type of the right-hand side matrix
936  , bool SO2 > // Storage order of the right-hand side matrix
937 inline StrictlyLowerMatrix<MT,SO,false>&
938  StrictlyLowerMatrix<MT,SO,false>::operator*=( const Matrix<MT2,SO2>& rhs )
939 {
940  if( matrix_.rows() != (~rhs).columns() )
941  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
942 
943  MT tmp( matrix_ * ~rhs );
944 
945  if( !isStrictlyLower( tmp ) )
946  throw std::invalid_argument( "Invalid assignment to strictly lower matrix" );
947 
948  move( matrix_, tmp );
949 
950  if( !IsStrictlyLower<MT2>::value )
951  resetUpper();
952 
953  return *this;
954 }
956 //*************************************************************************************************
957 
958 
959 //*************************************************************************************************
967 template< typename MT // Type of the adapted sparse matrix
968  , bool SO > // Storage order of the adapted sparse matrix
969 template< typename Other > // Data type of the right-hand side scalar
970 inline typename EnableIf< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,false> >::Type&
971  StrictlyLowerMatrix<MT,SO,false>::operator*=( Other rhs )
972 {
973  matrix_ *= rhs;
974  return *this;
975 }
976 //*************************************************************************************************
977 
978 
979 //*************************************************************************************************
987 template< typename MT // Type of the adapted sparse matrix
988  , bool SO > // Storage order of the adapted sparse matrix
989 template< typename Other > // Data type of the right-hand side scalar
990 inline typename EnableIf< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,false> >::Type&
991  StrictlyLowerMatrix<MT,SO,false>::operator/=( Other rhs )
992 {
993  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
994 
995  matrix_ /= rhs;
996  return *this;
997 }
999 //*************************************************************************************************
1000 
1001 
1002 
1003 
1004 //=================================================================================================
1005 //
1006 // UTILITY FUNCTIONS
1007 //
1008 //=================================================================================================
1009 
1010 //*************************************************************************************************
1016 template< typename MT // Type of the adapted sparse matrix
1017  , bool SO > // Storage order of the adapted sparse matrix
1018 inline size_t StrictlyLowerMatrix<MT,SO,false>::rows() const
1019 {
1020  return matrix_.rows();
1021 }
1023 //*************************************************************************************************
1024 
1025 
1026 //*************************************************************************************************
1032 template< typename MT // Type of the adapted sparse matrix
1033  , bool SO > // Storage order of the adapted sparse matrix
1034 inline size_t StrictlyLowerMatrix<MT,SO,false>::columns() const
1035 {
1036  return matrix_.columns();
1037 }
1039 //*************************************************************************************************
1040 
1041 
1042 //*************************************************************************************************
1048 template< typename MT // Type of the adapted sparse matrix
1049  , bool SO > // Storage order of the adapted sparse matrix
1050 inline size_t StrictlyLowerMatrix<MT,SO,false>::capacity() const
1051 {
1052  return matrix_.capacity();
1053 }
1055 //*************************************************************************************************
1056 
1057 
1058 //*************************************************************************************************
1070 template< typename MT // Type of the adapted sparse matrix
1071  , bool SO > // Storage order of the adapted sparse matrix
1072 inline size_t StrictlyLowerMatrix<MT,SO,false>::capacity( size_t i ) const
1073 {
1074  return matrix_.capacity(i);
1075 }
1077 //*************************************************************************************************
1078 
1079 
1080 //*************************************************************************************************
1086 template< typename MT // Type of the adapted sparse matrix
1087  , bool SO > // Storage order of the adapted sparse matrix
1088 inline size_t StrictlyLowerMatrix<MT,SO,false>::nonZeros() const
1089 {
1090  return matrix_.nonZeros();
1091 }
1093 //*************************************************************************************************
1094 
1095 
1096 //*************************************************************************************************
1108 template< typename MT // Type of the adapted sparse matrix
1109  , bool SO > // Storage order of the adapted sparse matrix
1110 inline size_t StrictlyLowerMatrix<MT,SO,false>::nonZeros( size_t i ) const
1111 {
1112  return matrix_.nonZeros(i);
1113 }
1115 //*************************************************************************************************
1116 
1117 
1118 //*************************************************************************************************
1124 template< typename MT // Type of the adapted sparse matrix
1125  , bool SO > // Storage order of the adapted sparse matrix
1127 {
1128  if( SO ) {
1129  for( size_t j=0UL; j<columns(); ++j ) {
1130  matrix_.erase( j, matrix_.lowerBound(j+1UL,j), matrix_.end(j) );
1131  }
1132  }
1133  else {
1134  for( size_t i=1UL; i<rows(); ++i ) {
1135  matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1136  }
1137  }
1138 }
1140 //*************************************************************************************************
1141 
1142 
1143 //*************************************************************************************************
1156 template< typename MT // Type of the adapted sparse matrix
1157  , bool SO > // Storage order of the adapted sparse matrix
1158 inline void StrictlyLowerMatrix<MT,SO,false>::reset( size_t i )
1159 {
1160  if( SO ) {
1161  matrix_.erase( i, matrix_.lowerBound(i+1UL,i), matrix_.end(i) );
1162  }
1163  else {
1164  matrix_.erase( i, matrix_.begin(i), matrix_.lowerBound(i,i) );
1165  }
1166 }
1168 //*************************************************************************************************
1169 
1170 
1171 //*************************************************************************************************
1179 template< typename MT // Type of the adapted sparse matrix
1180  , bool SO > // Storage order of the adapted sparse matrix
1182 {
1183  using blaze::clear;
1184 
1185  if( IsResizable<MT>::value ) {
1186  clear( matrix_ );
1187  }
1188  else {
1189  reset();
1190  }
1191 }
1193 //*************************************************************************************************
1194 
1195 
1196 //*************************************************************************************************
1212 template< typename MT // Type of the adapted sparse matrix
1213  , bool SO > // Storage order of the adapted sparse matrix
1215  StrictlyLowerMatrix<MT,SO,false>::set( size_t i, size_t j, const ElementType& value )
1216 {
1217  if( i <= j )
1218  throw std::invalid_argument( "Invalid access to diagonal or upper matrix element" );
1219 
1220  return matrix_.set( i, j, value );
1221 }
1223 //*************************************************************************************************
1224 
1225 
1226 //*************************************************************************************************
1243 template< typename MT // Type of the adapted sparse matrix
1244  , bool SO > // Storage order of the adapted sparse matrix
1246  StrictlyLowerMatrix<MT,SO,false>::insert( size_t i, size_t j, const ElementType& value )
1247 {
1248  if( i <= j )
1249  throw std::invalid_argument( "Invalid access to diagonal or upper matrix element" );
1250 
1251  return matrix_.insert( i, j, value );
1252 }
1254 //*************************************************************************************************
1255 
1256 
1257 //*************************************************************************************************
1267 template< typename MT // Type of the adapted sparse matrix
1268  , bool SO > // Storage order of the adapted sparse matrix
1269 inline void StrictlyLowerMatrix<MT,SO,false>::erase( size_t i, size_t j )
1270 {
1271  matrix_.erase( i, j );
1272 }
1274 //*************************************************************************************************
1275 
1276 
1277 //*************************************************************************************************
1289 template< typename MT // Type of the adapted sparse matrix
1290  , bool SO > // Storage order of the adapted sparse matrix
1292  StrictlyLowerMatrix<MT,SO,false>::erase( size_t i, Iterator pos )
1293 {
1294  return matrix_.erase( i, pos );
1295 }
1297 //*************************************************************************************************
1298 
1299 
1300 //*************************************************************************************************
1314 template< typename MT // Type of the adapted sparse matrix
1315  , bool SO > // Storage order of the adapted sparse matrix
1317  StrictlyLowerMatrix<MT,SO,false>::erase( size_t i, Iterator first, Iterator last )
1318 {
1319  return matrix_.erase( i, first, last );
1320 }
1322 //*************************************************************************************************
1323 
1324 
1325 //*************************************************************************************************
1340 template< typename MT // Type of the adapted sparse matrix
1341  , bool SO > // Storage order of the adapted sparse matrix
1342 void StrictlyLowerMatrix<MT,SO,false>::resize( size_t n, bool preserve )
1343 {
1345 
1346  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1347 
1348  matrix_.resize( n, n, preserve );
1349 }
1351 //*************************************************************************************************
1352 
1353 
1354 //*************************************************************************************************
1365 template< typename MT // Type of the adapted sparse matrix
1366  , bool SO > // Storage order of the adapted sparse matrix
1367 inline void StrictlyLowerMatrix<MT,SO,false>::reserve( size_t nonzeros )
1368 {
1369  matrix_.reserve( nonzeros );
1370 }
1372 //*************************************************************************************************
1373 
1374 
1375 //*************************************************************************************************
1390 template< typename MT // Type of the adapted sparse matrix
1391  , bool SO > // Storage order of the adapted sparse matrix
1392 inline void StrictlyLowerMatrix<MT,SO,false>::reserve( size_t i, size_t nonzeros )
1393 {
1394  matrix_.reserve( i, nonzeros );
1395 }
1397 //*************************************************************************************************
1398 
1399 
1400 //*************************************************************************************************
1411 template< typename MT // Type of the adapted sparse matrix
1412  , bool SO > // Storage order of the adapted sparse matrix
1413 inline void StrictlyLowerMatrix<MT,SO,false>::trim()
1414 {
1415  matrix_.trim();
1416 }
1418 //*************************************************************************************************
1419 
1420 
1421 //*************************************************************************************************
1433 template< typename MT // Type of the adapted sparse matrix
1434  , bool SO > // Storage order of the adapted sparse matrix
1435 inline void StrictlyLowerMatrix<MT,SO,false>::trim( size_t i )
1436 {
1437  matrix_.trim( i );
1438 }
1440 //*************************************************************************************************
1441 
1442 
1443 //*************************************************************************************************
1450 template< typename MT // Type of the adapted sparse matrix
1451  , bool SO > // Storage order of the adapted sparse matrix
1452 template< typename Other > // Data type of the scalar value
1453 inline StrictlyLowerMatrix<MT,SO,false>&
1454  StrictlyLowerMatrix<MT,SO,false>::scale( const Other& scalar )
1455 {
1456  matrix_.scale( scalar );
1457  return *this;
1458 }
1460 //*************************************************************************************************
1461 
1462 
1463 //*************************************************************************************************
1470 template< typename MT // Type of the adapted sparse matrix
1471  , bool SO > // Storage order of the adapted sparse matrix
1472 template< typename Other > // Data type of the scalar value
1473 inline StrictlyLowerMatrix<MT,SO,false>&
1474  StrictlyLowerMatrix<MT,SO,false>::scaleDiagonal( Other scalar )
1475 {
1476  matrix_.scaleDiagonal( scalar );
1477  return *this;
1478 }
1480 //*************************************************************************************************
1481 
1482 
1483 //*************************************************************************************************
1491 template< typename MT // Type of the adapted sparse matrix
1492  , bool SO > // Storage order of the adapted sparse matrix
1493 inline void StrictlyLowerMatrix<MT,SO,false>::swap( StrictlyLowerMatrix& m ) /* throw() */
1494 {
1495  using std::swap;
1496 
1497  swap( matrix_, m.matrix_ );
1498 }
1500 //*************************************************************************************************
1501 
1502 
1503 //*************************************************************************************************
1515 template< typename MT // Type of the adapted dense matrix
1516  , bool SO > // Storage order of the adapted dense matrix
1517 inline size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros()
1518 {
1520 
1521  return maxNonZeros( Rows<MT>::value );
1522 }
1524 //*************************************************************************************************
1525 
1526 
1527 //*************************************************************************************************
1537 template< typename MT // Type of the adapted dense matrix
1538  , bool SO > // Storage order of the adapted dense matrix
1539 inline size_t StrictlyLowerMatrix<MT,SO,false>::maxNonZeros( size_t n )
1540 {
1541  return ( ( n - 1UL ) * n ) / 2UL;
1542 }
1544 //*************************************************************************************************
1545 
1546 
1547 //*************************************************************************************************
1553 template< typename MT // Type of the adapted dense matrix
1554  , bool SO > // Storage order of the adapted dense matrix
1555 inline void StrictlyLowerMatrix<MT,SO,false>::resetUpper()
1556 {
1557  if( SO ) {
1558  for( size_t j=1UL; j<columns(); ++j )
1559  matrix_.erase( j, matrix_.begin( j ), matrix_.lowerBound( j, j ) );
1560  }
1561  else {
1562  for( size_t i=0UL; i<rows(); ++i )
1563  matrix_.erase( i, matrix_.upperBound( i, i ), matrix_.end( i ) );
1564  }
1565 }
1567 //*************************************************************************************************
1568 
1569 
1570 
1571 
1572 //=================================================================================================
1573 //
1574 // LOOKUP FUNCTIONS
1575 //
1576 //=================================================================================================
1577 
1578 //*************************************************************************************************
1594 template< typename MT // Type of the adapted sparse matrix
1595  , bool SO > // Storage order of the adapted sparse matrix
1597  StrictlyLowerMatrix<MT,SO,false>::find( size_t i, size_t j )
1598 {
1599  return matrix_.find( i, j );
1600 }
1602 //*************************************************************************************************
1603 
1604 
1605 //*************************************************************************************************
1621 template< typename MT // Type of the adapted sparse matrix
1622  , bool SO > // Storage order of the adapted sparse matrix
1624  StrictlyLowerMatrix<MT,SO,false>::find( size_t i, size_t j ) const
1625 {
1626  return matrix_.find( i, j );
1627 }
1629 //*************************************************************************************************
1630 
1631 
1632 //*************************************************************************************************
1648 template< typename MT // Type of the adapted sparse matrix
1649  , bool SO > // Storage order of the adapted sparse matrix
1651  StrictlyLowerMatrix<MT,SO,false>::lowerBound( size_t i, size_t j )
1652 {
1653  return matrix_.lowerBound( i, j );
1654 }
1656 //*************************************************************************************************
1657 
1658 
1659 //*************************************************************************************************
1675 template< typename MT // Type of the adapted sparse matrix
1676  , bool SO > // Storage order of the adapted sparse matrix
1678  StrictlyLowerMatrix<MT,SO,false>::lowerBound( size_t i, size_t j ) const
1679 {
1680  return matrix_.lowerBound( i, j );
1681 }
1683 //*************************************************************************************************
1684 
1685 
1686 //*************************************************************************************************
1702 template< typename MT // Type of the adapted sparse matrix
1703  , bool SO > // Storage order of the adapted sparse matrix
1705  StrictlyLowerMatrix<MT,SO,false>::upperBound( size_t i, size_t j )
1706 {
1707  return matrix_.upperBound( i, j );
1708 }
1710 //*************************************************************************************************
1711 
1712 
1713 //*************************************************************************************************
1729 template< typename MT // Type of the adapted sparse matrix
1730  , bool SO > // Storage order of the adapted sparse matrix
1732  StrictlyLowerMatrix<MT,SO,false>::upperBound( size_t i, size_t j ) const
1733 {
1734  return matrix_.upperBound( i, j );
1735 }
1737 //*************************************************************************************************
1738 
1739 
1740 
1741 
1742 //=================================================================================================
1743 //
1744 // LOW-LEVEL UTILITY FUNCTIONS
1745 //
1746 //=================================================================================================
1747 
1748 //*************************************************************************************************
1798 template< typename MT // Type of the adapted sparse matrix
1799  , bool SO > // Storage order of the adapted sparse matrix
1800 inline void StrictlyLowerMatrix<MT,SO,false>::append( size_t i, size_t j, const ElementType& value, bool check )
1801 {
1802  if( i <= j )
1803  throw std::invalid_argument( "Invalid access to diagonal or upper matrix element" );
1804 
1805  matrix_.append( i, j, value, check );
1806 }
1808 //*************************************************************************************************
1809 
1810 
1811 //*************************************************************************************************
1825 template< typename MT // Type of the adapted sparse matrix
1826  , bool SO > // Storage order of the adapted sparse matrix
1827 inline void StrictlyLowerMatrix<MT,SO,false>::finalize( size_t i )
1828 {
1829  matrix_.finalize( i );
1830 }
1832 //*************************************************************************************************
1833 
1834 
1835 
1836 
1837 //=================================================================================================
1838 //
1839 // EXPRESSION TEMPLATE EVALUATION FUNCTIONS
1840 //
1841 //=================================================================================================
1842 
1843 //*************************************************************************************************
1854 template< typename MT // Type of the adapted sparse matrix
1855  , bool SO > // Storage order of the adapted sparse matrix
1856 template< typename Other > // Data type of the foreign expression
1857 inline bool StrictlyLowerMatrix<MT,SO,false>::canAlias( const Other* alias ) const
1858 {
1859  return matrix_.canAlias( alias );
1860 }
1862 //*************************************************************************************************
1863 
1864 
1865 //*************************************************************************************************
1876 template< typename MT // Type of the adapted sparse matrix
1877  , bool SO > // Storage order of the adapted sparse matrix
1878 template< typename Other > // Data type of the foreign expression
1879 inline bool StrictlyLowerMatrix<MT,SO,false>::isAliased( const Other* alias ) const
1880 {
1881  return matrix_.isAliased( alias );
1882 }
1884 //*************************************************************************************************
1885 
1886 
1887 //*************************************************************************************************
1898 template< typename MT // Type of the adapted sparse matrix
1899  , bool SO > // Storage order of the adapted sparse matrix
1900 inline bool StrictlyLowerMatrix<MT,SO,false>::canSMPAssign() const
1901 {
1902  return matrix_.canSMPAssign();
1903 }
1905 //*************************************************************************************************
1906 
1907 } // namespace blaze
1908 
1909 #endif
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:116
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1649
Header file for mathematical functions.
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the Rows type trait.
Header file for basic type definitions.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix)
Checks if the given matrix is a square matrix.
Definition: Matrix.h:902
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:237
void move(CompressedMatrix< Type, SO > &dst, CompressedMatrix< Type, SO > &src)
Moving the contents of one compressed matrix to another.
Definition: CompressedMatrix.h:4825
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:300
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:258
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1121
#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
Constraint on the data type.
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2507
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:348
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:4762
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2501
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:116
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:386
Constraint on the data type.
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2503
Constraint on the data type.
Header file for the SparseMatrix base class.
Header file for utility functions for sparse matrices.
Header file for the IsSquare type trait.
Constraint on the data type.
Header file for the DisableIf class template.
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b)
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:4807
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:116
Constraint on the data type.
Header file for the SparseElement base class.
Header file for the IsUniTriangular type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2504
Constraints on the storage order of matrix types.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:118
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:195
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:535
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2509
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
Header file for the IsNumeric type trait.
Header file for all adaptor forward declarations.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:116
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2506
Header file for run time assertion macros.
Constraint on the data type.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:118
#define BLAZE_CONSTRAINT_MUST_NOT_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:116
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
Header file for the isDefault shim.
Constraint on the data type.
Constraint on the data type.
Header file for the StrictlyLowerProxy class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is resizable, i.e. has a 'resize' member fu...
Definition: Resizable.h:118
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:200
BLAZE_ALWAYS_INLINE EnableIf< And< IsIntegral< T >, HasSize< T, 2UL > >, sse_int16_t >::Type set(T value)
Sets all values in the vector to the given 2-byte integral value.
Definition: Set.h:73
Header file for the move shim.
#define BLAZE_CONSTRAINT_MUST_BE_RESIZABLE(T)
Constraint on the data type.In case the given data type T is not resizable, i.e. does not have a 'res...
Definition: Resizable.h:79
Header file for the IsComputation type trait class.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_EXPRESSION_TYPE(T)
Constraint on the data type.In case the given data type T is an expression (i.e. a type derived from ...
Definition: Expression.h:118
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2502
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2508
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:143
Header file for the IsResizable type trait.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
#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
#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