Dense.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_DENSE_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <utility>
48 #include <blaze/math/Aliases.h>
59 #include <blaze/math/Exception.h>
62 #include <blaze/math/shims/Clear.h>
72 #include <blaze/system/Inline.h>
73 #include <blaze/util/Assert.h>
79 #include <blaze/util/DisableIf.h>
80 #include <blaze/util/EnableIf.h>
81 #include <blaze/util/FalseType.h>
83 #include <blaze/util/TrueType.h>
84 #include <blaze/util/Types.h>
85 #include <blaze/util/Unused.h>
86 
87 
88 namespace blaze {
89 
90 //=================================================================================================
91 //
92 // CLASS TEMPLATE SPECIALIZATION FOR DENSE MATRICES
93 //
94 //=================================================================================================
95 
96 //*************************************************************************************************
104 template< typename MT // Type of the adapted dense matrix
105  , bool SO > // Storage order of the adapted dense matrix
106 class StrictlyLowerMatrix<MT,SO,true>
107  : public DenseMatrix< StrictlyLowerMatrix<MT,SO,true>, SO >
108 {
109  private:
110  //**Type definitions****************************************************************************
111  typedef OppositeType_<MT> OT;
112  typedef TransposeType_<MT> TT;
113  typedef ElementType_<MT> ET;
114  //**********************************************************************************************
115 
116  public:
117  //**Type definitions****************************************************************************
118  typedef StrictlyLowerMatrix<MT,SO,true> This;
119  typedef DenseMatrix<This,SO> BaseType;
120  typedef This ResultType;
121  typedef StrictlyLowerMatrix<OT,!SO,true> OppositeType;
122  typedef StrictlyUpperMatrix<TT,!SO,true> TransposeType;
123  typedef ET ElementType;
124  typedef SIMDType_<MT> SIMDType;
125  typedef ReturnType_<MT> ReturnType;
126  typedef const This& CompositeType;
127  typedef StrictlyLowerProxy<MT> Reference;
128  typedef ConstReference_<MT> ConstReference;
129  typedef Pointer_<MT> Pointer;
130  typedef ConstPointer_<MT> ConstPointer;
131  typedef ConstIterator_<MT> ConstIterator;
132  //**********************************************************************************************
133 
134  //**Rebind struct definition********************************************************************
137  template< typename NewType > // Data type of the other matrix
138  struct Rebind {
140  typedef StrictlyLowerMatrix< typename MT::template Rebind<NewType>::Other > Other;
141  };
142  //**********************************************************************************************
143 
144  //**Resize struct definition********************************************************************
147  template< size_t NewM // Number of rows of the other matrix
148  , size_t NewN > // Number of columns of the other matrix
149  struct Resize {
151  typedef StrictlyLowerMatrix< typename MT::template Resize<NewM,NewN>::Other > Other;
152  };
153  //**********************************************************************************************
154 
155  //**Iterator class definition*******************************************************************
158  class Iterator
159  {
160  public:
161  //**Type definitions*************************************************************************
162  typedef std::random_access_iterator_tag IteratorCategory;
163  typedef ElementType_<MT> ValueType;
164  typedef StrictlyLowerProxy<MT> PointerType;
165  typedef StrictlyLowerProxy<MT> ReferenceType;
166  typedef ptrdiff_t DifferenceType;
167 
168  // STL iterator requirements
169  typedef IteratorCategory iterator_category;
170  typedef ValueType value_type;
171  typedef PointerType pointer;
172  typedef ReferenceType reference;
173  typedef DifferenceType difference_type;
174  //*******************************************************************************************
175 
176  //**Constructor******************************************************************************
179  inline Iterator() noexcept
180  : matrix_( nullptr ) // Reference to the adapted dense matrix
181  , row_ ( 0UL ) // The current row index of the iterator
182  , column_( 0UL ) // The current column index of the iterator
183  {}
184  //*******************************************************************************************
185 
186  //**Constructor******************************************************************************
193  inline Iterator( MT& matrix, size_t row, size_t column ) noexcept
194  : matrix_( &matrix ) // Reference to the adapted dense matrix
195  , row_ ( row ) // The current row-index of the iterator
196  , column_( column ) // The current column-index of the iterator
197  {}
198  //*******************************************************************************************
199 
200  //**Addition assignment operator*************************************************************
206  inline Iterator& operator+=( size_t inc ) noexcept {
207  ( SO )?( row_ += inc ):( column_ += inc );
208  return *this;
209  }
210  //*******************************************************************************************
211 
212  //**Subtraction assignment operator**********************************************************
218  inline Iterator& operator-=( size_t dec ) noexcept {
219  ( SO )?( row_ -= dec ):( column_ -= dec );
220  return *this;
221  }
222  //*******************************************************************************************
223 
224  //**Prefix increment operator****************************************************************
229  inline Iterator& operator++() noexcept {
230  ( SO )?( ++row_ ):( ++column_ );
231  return *this;
232  }
233  //*******************************************************************************************
234 
235  //**Postfix increment operator***************************************************************
240  inline const Iterator operator++( int ) noexcept {
241  const Iterator tmp( *this );
242  ++(*this);
243  return tmp;
244  }
245  //*******************************************************************************************
246 
247  //**Prefix decrement operator****************************************************************
252  inline Iterator& operator--() noexcept {
253  ( SO )?( --row_ ):( --column_ );
254  return *this;
255  }
256  //*******************************************************************************************
257 
258  //**Postfix decrement operator***************************************************************
263  inline const Iterator operator--( int ) noexcept {
264  const Iterator tmp( *this );
265  --(*this);
266  return tmp;
267  }
268  //*******************************************************************************************
269 
270  //**Element access operator******************************************************************
275  inline ReferenceType operator*() const {
276  return ReferenceType( *matrix_, row_, column_ );
277  }
278  //*******************************************************************************************
279 
280  //**Element access operator******************************************************************
285  inline PointerType operator->() const {
286  return PointerType( *matrix_, row_, column_ );
287  }
288  //*******************************************************************************************
289 
290  //**Load function****************************************************************************
300  inline SIMDType load() const {
301  return (*matrix_).load(row_,column_);
302  }
303  //*******************************************************************************************
304 
305  //**Loada function***************************************************************************
315  inline SIMDType loada() const {
316  return (*matrix_).loada(row_,column_);
317  }
318  //*******************************************************************************************
319 
320  //**Loadu function***************************************************************************
330  inline SIMDType loadu() const {
331  return (*matrix_).loadu(row_,column_);
332  }
333  //*******************************************************************************************
334 
335  //**Conversion operator**********************************************************************
340  inline operator ConstIterator() const {
341  if( SO )
342  return matrix_->begin( column_ ) + row_;
343  else
344  return matrix_->begin( row_ ) + column_;
345  }
346  //*******************************************************************************************
347 
348  //**Equality operator************************************************************************
355  friend inline bool operator==( const Iterator& lhs, const Iterator& rhs ) noexcept {
356  return ( SO )?( lhs.row_ == rhs.row_ ):( lhs.column_ == rhs.column_ );
357  }
358  //*******************************************************************************************
359 
360  //**Equality operator************************************************************************
367  friend inline bool operator==( const Iterator& lhs, const ConstIterator& rhs ) {
368  return ( ConstIterator( lhs ) == rhs );
369  }
370  //*******************************************************************************************
371 
372  //**Equality operator************************************************************************
379  friend inline bool operator==( const ConstIterator& lhs, const Iterator& rhs ) {
380  return ( lhs == ConstIterator( rhs ) );
381  }
382  //*******************************************************************************************
383 
384  //**Inequality operator**********************************************************************
391  friend inline bool operator!=( const Iterator& lhs, const Iterator& rhs ) noexcept {
392  return ( SO )?( lhs.row_ != rhs.row_ ):( lhs.column_ != rhs.column_ );
393  }
394  //*******************************************************************************************
395 
396  //**Inequality operator**********************************************************************
403  friend inline bool operator!=( const Iterator& lhs, const ConstIterator& rhs ) {
404  return ( ConstIterator( lhs ) != rhs );
405  }
406  //*******************************************************************************************
407 
408  //**Inequality operator**********************************************************************
415  friend inline bool operator!=( const ConstIterator& lhs, const Iterator& rhs ) {
416  return ( lhs != ConstIterator( rhs ) );
417  }
418  //*******************************************************************************************
419 
420  //**Less-than operator***********************************************************************
427  friend inline bool operator<( const Iterator& lhs, const Iterator& rhs ) noexcept {
428  return ( SO )?( lhs.row_ < rhs.row_ ):( lhs.column_ < rhs.column_ );
429  }
430  //*******************************************************************************************
431 
432  //**Less-than operator***********************************************************************
439  friend inline bool operator<( const Iterator& lhs, const ConstIterator& rhs ) {
440  return ( ConstIterator( lhs ) < rhs );
441  }
442  //*******************************************************************************************
443 
444  //**Less-than operator***********************************************************************
451  friend inline bool operator<( const ConstIterator& lhs, const Iterator& rhs ) {
452  return ( lhs < ConstIterator( rhs ) );
453  }
454  //*******************************************************************************************
455 
456  //**Greater-than operator********************************************************************
463  friend inline bool operator>( const Iterator& lhs, const Iterator& rhs ) noexcept {
464  return ( SO )?( lhs.row_ > rhs.row_ ):( lhs.column_ > rhs.column_ );
465  }
466  //*******************************************************************************************
467 
468  //**Greater-than operator********************************************************************
475  friend inline bool operator>( const Iterator& lhs, const ConstIterator& rhs ) {
476  return ( ConstIterator( lhs ) > rhs );
477  }
478  //*******************************************************************************************
479 
480  //**Greater-than operator********************************************************************
487  friend inline bool operator>( const ConstIterator& lhs, const Iterator& rhs ) {
488  return ( lhs > ConstIterator( rhs ) );
489  }
490  //*******************************************************************************************
491 
492  //**Less-or-equal-than operator**************************************************************
499  friend inline bool operator<=( const Iterator& lhs, const Iterator& rhs ) noexcept {
500  return ( SO )?( lhs.row_ <= rhs.row_ ):( lhs.column_ <= rhs.column_ );
501  }
502  //*******************************************************************************************
503 
504  //**Less-or-equal-than operator**************************************************************
511  friend inline bool operator<=( const Iterator& lhs, const ConstIterator& rhs ) {
512  return ( ConstIterator( lhs ) <= rhs );
513  }
514  //*******************************************************************************************
515 
516  //**Less-or-equal-than operator**************************************************************
523  friend inline bool operator<=( const ConstIterator& lhs, const Iterator& rhs ) {
524  return ( lhs <= ConstIterator( rhs ) );
525  }
526  //*******************************************************************************************
527 
528  //**Greater-or-equal-than operator***********************************************************
535  friend inline bool operator>=( const Iterator& lhs, const Iterator& rhs ) noexcept {
536  return ( SO )?( lhs.row_ >= rhs.row_ ):( lhs.column_ >= rhs.column_ );
537  }
538  //*******************************************************************************************
539 
540  //**Greater-or-equal-than operator***********************************************************
547  friend inline bool operator>=( const Iterator& lhs, const ConstIterator& rhs ) {
548  return ( ConstIterator( lhs ) >= rhs );
549  }
550  //*******************************************************************************************
551 
552  //**Greater-or-equal-than operator***********************************************************
559  friend inline bool operator>=( const ConstIterator& lhs, const Iterator& rhs ) {
560  return ( lhs >= ConstIterator( rhs ) );
561  }
562  //*******************************************************************************************
563 
564  //**Subtraction operator*********************************************************************
570  inline DifferenceType operator-( const Iterator& rhs ) const noexcept {
571  return ( SO )?( row_ - rhs.row_ ):( column_ - rhs.column_ );
572  }
573  //*******************************************************************************************
574 
575  //**Addition operator************************************************************************
582  friend inline const Iterator operator+( const Iterator& it, size_t inc ) noexcept {
583  if( SO )
584  return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
585  else
586  return Iterator( *it.matrix_, it.row_, it.column_ + inc );
587  }
588  //*******************************************************************************************
589 
590  //**Addition operator************************************************************************
597  friend inline const Iterator operator+( size_t inc, const Iterator& it ) noexcept {
598  if( SO )
599  return Iterator( *it.matrix_, it.row_ + inc, it.column_ );
600  else
601  return Iterator( *it.matrix_, it.row_, it.column_ + inc );
602  }
603  //*******************************************************************************************
604 
605  //**Subtraction operator*********************************************************************
612  friend inline const Iterator operator-( const Iterator& it, size_t dec ) noexcept {
613  if( SO )
614  return Iterator( *it.matrix_, it.row_ - dec, it.column_ );
615  else
616  return Iterator( *it.matrix_, it.row_, it.column_ - dec );
617  }
618  //*******************************************************************************************
619 
620  private:
621  //**Member variables*************************************************************************
622  MT* matrix_;
623  size_t row_;
624  size_t column_;
625  //*******************************************************************************************
626  };
627  //**********************************************************************************************
628 
629  //**Compilation flags***************************************************************************
631  enum : bool { simdEnabled = MT::simdEnabled };
632 
634  enum : bool { smpAssignable = MT::smpAssignable };
635  //**********************************************************************************************
636 
637  //**Constructors********************************************************************************
640  explicit inline StrictlyLowerMatrix();
641  template< typename A1 > explicit inline StrictlyLowerMatrix( const A1& a1 );
642  explicit inline StrictlyLowerMatrix( size_t n, const ElementType& init );
643 
644  explicit inline StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list );
645 
646  template< typename Other >
647  explicit inline StrictlyLowerMatrix( size_t n, const Other* array );
648 
649  template< typename Other, size_t N >
650  explicit inline StrictlyLowerMatrix( const Other (&array)[N][N] );
651 
652  explicit inline StrictlyLowerMatrix( ElementType* ptr, size_t n );
653  explicit inline StrictlyLowerMatrix( ElementType* ptr, size_t n, size_t nn );
654 
655  template< typename Deleter >
656  explicit inline StrictlyLowerMatrix( ElementType* ptr, size_t n, Deleter d );
657 
658  template< typename Deleter >
659  explicit inline StrictlyLowerMatrix( ElementType* ptr, size_t n, size_t nn, Deleter d );
660 
661  inline StrictlyLowerMatrix( const StrictlyLowerMatrix& m );
662  inline StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept;
664  //**********************************************************************************************
665 
666  //**Destructor**********************************************************************************
667  // No explicitly declared destructor.
668  //**********************************************************************************************
669 
670  //**Data access functions***********************************************************************
673  inline Reference operator()( size_t i, size_t j );
674  inline ConstReference operator()( size_t i, size_t j ) const;
675  inline Reference at( size_t i, size_t j );
676  inline ConstReference at( size_t i, size_t j ) const;
677  inline ConstPointer data () const noexcept;
678  inline ConstPointer data ( size_t i ) const noexcept;
679  inline Iterator begin ( size_t i );
680  inline ConstIterator begin ( size_t i ) const;
681  inline ConstIterator cbegin( size_t i ) const;
682  inline Iterator end ( size_t i );
683  inline ConstIterator end ( size_t i ) const;
684  inline ConstIterator cend ( size_t i ) const;
686  //**********************************************************************************************
687 
688  //**Assignment operators************************************************************************
691  inline StrictlyLowerMatrix& operator=( const ElementType& rhs );
692  inline StrictlyLowerMatrix& operator=( initializer_list< initializer_list<ElementType> > list );
693 
694  template< typename Other, size_t N >
695  inline StrictlyLowerMatrix& operator=( const Other (&array)[N][N] );
696 
697  inline StrictlyLowerMatrix& operator=( const StrictlyLowerMatrix& rhs );
698  inline StrictlyLowerMatrix& operator=( StrictlyLowerMatrix&& rhs ) noexcept;
699 
700  template< typename MT2, bool SO2 >
701  inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
702  operator=( const Matrix<MT2,SO2>& rhs );
703 
704  template< typename MT2, bool SO2 >
705  inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
706  operator=( const Matrix<MT2,SO2>& rhs );
707 
708  template< typename MT2, bool SO2 >
709  inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
710  operator+=( const Matrix<MT2,SO2>& rhs );
711 
712  template< typename MT2, bool SO2 >
713  inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
714  operator+=( const Matrix<MT2,SO2>& rhs );
715 
716  template< typename MT2, bool SO2 >
717  inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
718  operator-=( const Matrix<MT2,SO2>& rhs );
719 
720  template< typename MT2, bool SO2 >
721  inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix& >
722  operator-=( const Matrix<MT2,SO2>& rhs );
723 
724  template< typename MT2, bool SO2 >
725  inline StrictlyLowerMatrix& operator*=( const Matrix<MT2,SO2>& rhs );
726 
727  template< typename Other >
728  inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >& operator*=( Other rhs );
729 
730  template< typename Other >
731  inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix >& operator/=( Other rhs );
733  //**********************************************************************************************
734 
735  //**Utility functions***************************************************************************
738  inline size_t rows() const noexcept;
739  inline size_t columns() const noexcept;
740  inline size_t spacing() const noexcept;
741  inline size_t capacity() const noexcept;
742  inline size_t capacity( size_t i ) const noexcept;
743  inline size_t nonZeros() const;
744  inline size_t nonZeros( size_t i ) const;
745  inline void reset();
746  inline void reset( size_t i );
747  inline void clear();
748  void resize ( size_t n, bool preserve=true );
749  inline void extend ( size_t n, bool preserve=true );
750  inline void reserve( size_t elements );
751  inline void swap( StrictlyLowerMatrix& m ) noexcept;
752 
753  static inline constexpr size_t maxNonZeros() noexcept;
754  static inline constexpr size_t maxNonZeros( size_t n ) noexcept;
756  //**********************************************************************************************
757 
758  //**Numeric functions***************************************************************************
761  template< typename Other > inline StrictlyLowerMatrix& scale( const Other& scalar );
763  //**********************************************************************************************
764 
765  //**Debugging functions*************************************************************************
768  inline bool isIntact() const noexcept;
770  //**********************************************************************************************
771 
772  //**Expression template evaluation functions****************************************************
775  template< typename Other > inline bool canAlias ( const Other* alias ) const noexcept;
776  template< typename Other > inline bool isAliased( const Other* alias ) const noexcept;
777 
778  inline bool isAligned () const noexcept;
779  inline bool canSMPAssign() const noexcept;
780 
781  BLAZE_ALWAYS_INLINE SIMDType load ( size_t i, size_t j ) const noexcept;
782  BLAZE_ALWAYS_INLINE SIMDType loada( size_t i, size_t j ) const noexcept;
783  BLAZE_ALWAYS_INLINE SIMDType loadu( size_t i, size_t j ) const noexcept;
785  //**********************************************************************************************
786 
787  private:
788  //**Construction functions**********************************************************************
791  inline const MT construct( size_t n , TrueType );
792  inline const MT construct( const ElementType& value, FalseType );
793 
794  template< typename MT2, bool SO2, typename T >
795  inline const MT construct( const Matrix<MT2,SO2>& m, T );
797  //**********************************************************************************************
798 
799  //**Member variables****************************************************************************
802  MT matrix_;
803 
804  //**********************************************************************************************
805 
806  //**Friend declarations*************************************************************************
807  template< typename MT2, bool SO2, bool DF2 >
808  friend MT2& derestrict( StrictlyLowerMatrix<MT2,SO2,DF2>& m );
809  //**********************************************************************************************
810 
811  //**Compile time checks*************************************************************************
824  BLAZE_STATIC_ASSERT( Rows<MT>::value == Columns<MT>::value );
825  //**********************************************************************************************
826 };
828 //*************************************************************************************************
829 
830 
831 
832 
833 //=================================================================================================
834 //
835 // CONSTRUCTORS
836 //
837 //=================================================================================================
838 
839 //*************************************************************************************************
843 template< typename MT // Type of the adapted dense matrix
844  , bool SO > // Storage order of the adapted dense matrix
845 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix()
846  : matrix_() // The adapted dense matrix
847 {
848  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
849  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
850 }
852 //*************************************************************************************************
853 
854 
855 //*************************************************************************************************
873 template< typename MT // Type of the adapted dense matrix
874  , bool SO > // Storage order of the adapted dense matrix
875 template< typename A1 > // Type of the constructor argument
876 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( const A1& a1 )
877  : matrix_( construct( a1, typename IsResizable<MT>::Type() ) ) // The adapted dense matrix
878 {
879  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
880  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
881 }
883 //*************************************************************************************************
884 
885 
886 //*************************************************************************************************
893 template< typename MT // Type of the adapted dense matrix
894  , bool SO > // Storage order of the adapted dense matrix
895 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( size_t n, const ElementType& init )
896  : matrix_( n, n, ElementType() ) // The adapted dense matrix
897 {
899 
900  if( SO ) {
901  for( size_t j=0UL; j<columns(); ++j ) {
902  for( size_t i=j+1UL; i<rows(); ++i )
903  matrix_(i,j) = init;
904  }
905  }
906  else {
907  for( size_t i=0UL; i<rows(); ++i ) {
908  for( size_t j=0UL; j<i; ++j )
909  matrix_(i,j) = init;
910  }
911  }
912 
913  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
914  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
915 }
917 //*************************************************************************************************
918 
919 
920 //*************************************************************************************************
943 template< typename MT // Type of the adapted dense matrix
944  , bool SO > // Storage order of the adapted dense matrix
945 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( initializer_list< initializer_list<ElementType> > list )
946  : matrix_( list ) // The adapted dense matrix
947 {
948  if( !isStrictlyLower( matrix_ ) ) {
949  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
950  }
951 
952  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
953 }
955 //*************************************************************************************************
956 
957 
958 //*************************************************************************************************
984 template< typename MT // Type of the adapted dense matrix
985  , bool SO > // Storage order of the adapted dense matrix
986 template< typename Other > // Data type of the initialization array
987 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( size_t n, const Other* array )
988  : matrix_( n, n, array ) // The adapted dense matrix
989 {
990  if( !isStrictlyLower( matrix_ ) ) {
991  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
992  }
993 
994  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
995 }
997 //*************************************************************************************************
998 
999 
1000 //*************************************************************************************************
1023 template< typename MT // Type of the adapted dense matrix
1024  , bool SO > // Storage order of the adapted dense matrix
1025 template< typename Other // Data type of the initialization array
1026  , size_t N > // Number of rows and columns of the initialization array
1027 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( const Other (&array)[N][N] )
1028  : matrix_( array ) // The adapted dense matrix
1029 {
1030  if( !isStrictlyLower( matrix_ ) ) {
1031  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
1032  }
1033 
1034  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1035 }
1037 //*************************************************************************************************
1038 
1039 
1040 //*************************************************************************************************
1062 template< typename MT // Type of the adapted dense matrix
1063  , bool SO > // Storage order of the adapted dense matrix
1064 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr, size_t n )
1065  : matrix_( ptr, n, n ) // The adapted dense matrix
1066 {
1067  if( !isStrictlyLower( matrix_ ) ) {
1068  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
1069  }
1070 
1071  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1072 }
1074 //*************************************************************************************************
1075 
1076 
1077 //*************************************************************************************************
1100 template< typename MT // Type of the adapted dense matrix
1101  , bool SO > // Storage order of the adapted dense matrix
1102 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr, size_t n, size_t nn )
1103  : matrix_( ptr, n, n, nn ) // The adapted dense matrix
1104 {
1105  if( !isStrictlyLower( matrix_ ) ) {
1106  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
1107  }
1108 
1109  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1110 }
1112 //*************************************************************************************************
1113 
1114 
1115 //*************************************************************************************************
1136 template< typename MT // Type of the adapted dense matrix
1137  , bool SO > // Storage order of the adapted dense matrix
1138 template< typename Deleter > // Type of the custom deleter
1139 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr, size_t n, Deleter d )
1140  : matrix_( ptr, n, n, d ) // The adapted dense matrix
1141 {
1142  if( !isStrictlyLower( matrix_ ) ) {
1143  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
1144  }
1145 
1146  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1147 }
1149 //*************************************************************************************************
1150 
1151 
1152 //*************************************************************************************************
1174 template< typename MT // Type of the adapted dense matrix
1175  , bool SO > // Storage order of the adapted dense matrix
1176 template< typename Deleter > // Type of the custom deleter
1177 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( ElementType* ptr, size_t n, size_t nn, Deleter d )
1178  : matrix_( ptr, n, n, nn, d ) // The adapted dense matrix
1179 {
1180  if( !isStrictlyLower( matrix_ ) ) {
1181  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
1182  }
1183 
1184  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1185 }
1187 //*************************************************************************************************
1188 
1189 
1190 //*************************************************************************************************
1196 template< typename MT // Type of the adapted dense matrix
1197  , bool SO > // Storage order of the adapted dense matrix
1198 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( const StrictlyLowerMatrix& m )
1199  : matrix_( m.matrix_ ) // The adapted dense matrix
1200 {
1201  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1202  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1203 }
1205 //*************************************************************************************************
1206 
1207 
1208 //*************************************************************************************************
1214 template< typename MT // Type of the adapted dense matrix
1215  , bool SO > // Storage order of the adapted dense matrix
1216 inline StrictlyLowerMatrix<MT,SO,true>::StrictlyLowerMatrix( StrictlyLowerMatrix&& m ) noexcept
1217  : matrix_( std::move( m.matrix_ ) ) // The adapted dense matrix
1218 {
1219  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1220  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1221 }
1223 //*************************************************************************************************
1224 
1225 
1226 
1227 
1228 //=================================================================================================
1229 //
1230 // DATA ACCESS FUNCTIONS
1231 //
1232 //=================================================================================================
1233 
1234 //*************************************************************************************************
1250 template< typename MT // Type of the adapted dense matrix
1251  , bool SO > // Storage order of the adapted dense matrix
1253  StrictlyLowerMatrix<MT,SO,true>::operator()( size_t i, size_t j )
1254 {
1255  BLAZE_USER_ASSERT( i<rows() , "Invalid row access index" );
1256  BLAZE_USER_ASSERT( j<columns(), "Invalid column access index" );
1257 
1258  return Reference( matrix_, i, j );
1259 }
1261 //*************************************************************************************************
1262 
1263 
1264 //*************************************************************************************************
1280 template< typename MT // Type of the adapted dense matrix
1281  , bool SO > // Storage order of the adapted dense matrix
1283  StrictlyLowerMatrix<MT,SO,true>::operator()( size_t i, size_t j ) const
1284 {
1285  BLAZE_USER_ASSERT( i<rows() , "Invalid row access index" );
1286  BLAZE_USER_ASSERT( j<columns(), "Invalid column access index" );
1287 
1288  return matrix_(i,j);
1289 }
1291 //*************************************************************************************************
1292 
1293 
1294 //*************************************************************************************************
1311 template< typename MT // Type of the adapted dense matrix
1312  , bool SO > // Storage order of the adapted dense matrix
1314  StrictlyLowerMatrix<MT,SO,true>::at( size_t i, size_t j )
1315 {
1316  if( i >= rows() ) {
1317  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
1318  }
1319  if( j >= columns() ) {
1320  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
1321  }
1322  return (*this)(i,j);
1323 }
1325 //*************************************************************************************************
1326 
1327 
1328 //*************************************************************************************************
1345 template< typename MT // Type of the adapted dense matrix
1346  , bool SO > // Storage order of the adapted dense matrix
1348  StrictlyLowerMatrix<MT,SO,true>::at( size_t i, size_t j ) const
1349 {
1350  if( i >= rows() ) {
1351  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
1352  }
1353  if( j >= columns() ) {
1354  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
1355  }
1356  return (*this)(i,j);
1357 }
1359 //*************************************************************************************************
1360 
1361 
1362 //*************************************************************************************************
1375 template< typename MT // Type of the adapted dense matrix
1376  , bool SO > // Storage order of the adapted dense matrix
1377 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1378  StrictlyLowerMatrix<MT,SO,true>::data() const noexcept
1379 {
1380  return matrix_.data();
1381 }
1383 //*************************************************************************************************
1384 
1385 
1386 //*************************************************************************************************
1395 template< typename MT // Type of the adapted dense matrix
1396  , bool SO > // Storage order of the adapted dense matrix
1397 inline typename StrictlyLowerMatrix<MT,SO,true>::ConstPointer
1398  StrictlyLowerMatrix<MT,SO,true>::data( size_t i ) const noexcept
1399 {
1400  return matrix_.data(i);
1401 }
1403 //*************************************************************************************************
1404 
1405 
1406 //*************************************************************************************************
1418 template< typename MT // Type of the adapted dense matrix
1419  , bool SO > // Storage order of the adapted dense matrix
1422 {
1423  if( SO )
1424  return Iterator( matrix_, 0UL, i );
1425  else
1426  return Iterator( matrix_, i, 0UL );
1427 }
1429 //*************************************************************************************************
1430 
1431 
1432 //*************************************************************************************************
1444 template< typename MT // Type of the adapted dense matrix
1445  , bool SO > // Storage order of the adapted dense matrix
1447  StrictlyLowerMatrix<MT,SO,true>::begin( size_t i ) const
1448 {
1449  return matrix_.begin(i);
1450 }
1452 //*************************************************************************************************
1453 
1454 
1455 //*************************************************************************************************
1467 template< typename MT // Type of the adapted dense matrix
1468  , bool SO > // Storage order of the adapted dense matrix
1470  StrictlyLowerMatrix<MT,SO,true>::cbegin( size_t i ) const
1471 {
1472  return matrix_.cbegin(i);
1473 }
1475 //*************************************************************************************************
1476 
1477 
1478 //*************************************************************************************************
1490 template< typename MT // Type of the adapted dense matrix
1491  , bool SO > // Storage order of the adapted dense matrix
1494 {
1495  if( SO )
1496  return Iterator( matrix_, rows(), i );
1497  else
1498  return Iterator( matrix_, i, columns() );
1499 }
1501 //*************************************************************************************************
1502 
1503 
1504 //*************************************************************************************************
1516 template< typename MT // Type of the adapted dense matrix
1517  , bool SO > // Storage order of the adapted dense matrix
1519  StrictlyLowerMatrix<MT,SO,true>::end( size_t i ) const
1520 {
1521  return matrix_.end(i);
1522 }
1524 //*************************************************************************************************
1525 
1526 
1527 //*************************************************************************************************
1539 template< typename MT // Type of the adapted dense matrix
1540  , bool SO > // Storage order of the adapted dense matrix
1542  StrictlyLowerMatrix<MT,SO,true>::cend( size_t i ) const
1543 {
1544  return matrix_.cend(i);
1545 }
1547 //*************************************************************************************************
1548 
1549 
1550 
1551 
1552 //=================================================================================================
1553 //
1554 // ASSIGNMENT OPERATORS
1555 //
1556 //=================================================================================================
1557 
1558 //*************************************************************************************************
1565 template< typename MT // Type of the adapted dense matrix
1566  , bool SO > // Storage order of the adapted dense matrix
1567 inline StrictlyLowerMatrix<MT,SO,true>&
1568  StrictlyLowerMatrix<MT,SO,true>::operator=( const ElementType& rhs )
1569 {
1570  if( SO ) {
1571  for( size_t j=0UL; j<columns(); ++j )
1572  for( size_t i=j+1UL; i<rows(); ++i )
1573  matrix_(i,j) = rhs;
1574  }
1575  else {
1576  for( size_t i=1UL; i<rows(); ++i )
1577  for( size_t j=0UL; j<i; ++j )
1578  matrix_(i,j) = rhs;
1579  }
1580 
1581  return *this;
1582 }
1584 //*************************************************************************************************
1585 
1586 
1587 //*************************************************************************************************
1611 template< typename MT // Type of the adapted dense matrix
1612  , bool SO > // Storage order of the adapted dense matrix
1613 inline StrictlyLowerMatrix<MT,SO,true>&
1614  StrictlyLowerMatrix<MT,SO,true>::operator=( initializer_list< initializer_list<ElementType> > list )
1615 {
1616  MT tmp( list );
1617 
1618  if( !isStrictlyLower( tmp ) ) {
1619  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1620  }
1621 
1622  matrix_ = std::move( tmp );
1623 
1624  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1625  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1626 
1627  return *this;
1628 }
1630 //*************************************************************************************************
1631 
1632 
1633 //*************************************************************************************************
1658 template< typename MT // Type of the adapted dense matrix
1659  , bool SO > // Storage order of the adapted dense matrix
1660 template< typename Other // Data type of the initialization array
1661  , size_t N > // Number of rows and columns of the initialization array
1662 inline StrictlyLowerMatrix<MT,SO,true>&
1663  StrictlyLowerMatrix<MT,SO,true>::operator=( const Other (&array)[N][N] )
1664 {
1665  MT tmp( array );
1666 
1667  if( !isStrictlyLower( tmp ) ) {
1668  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1669  }
1670 
1671  matrix_ = std::move( tmp );
1672 
1673  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1674  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1675 
1676  return *this;
1677 }
1679 //*************************************************************************************************
1680 
1681 
1682 //*************************************************************************************************
1692 template< typename MT // Type of the adapted dense matrix
1693  , bool SO > // Storage order of the adapted dense matrix
1694 inline StrictlyLowerMatrix<MT,SO,true>&
1695  StrictlyLowerMatrix<MT,SO,true>::operator=( const StrictlyLowerMatrix& rhs )
1696 {
1697  matrix_ = rhs.matrix_;
1698 
1699  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1700  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1701 
1702  return *this;
1703 }
1705 //*************************************************************************************************
1706 
1707 
1708 //*************************************************************************************************
1715 template< typename MT // Type of the adapted dense matrix
1716  , bool SO > // Storage order of the adapted dense matrix
1717 inline StrictlyLowerMatrix<MT,SO,true>&
1718  StrictlyLowerMatrix<MT,SO,true>::operator=( StrictlyLowerMatrix&& rhs ) noexcept
1719 {
1720  matrix_ = std::move( rhs.matrix_ );
1721 
1722  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1723  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1724 
1725  return *this;
1726 }
1728 //*************************************************************************************************
1729 
1730 
1731 //*************************************************************************************************
1744 template< typename MT // Type of the adapted dense matrix
1745  , bool SO > // Storage order of the adapted dense matrix
1746 template< typename MT2 // Type of the right-hand side matrix
1747  , bool SO2 > // Storage order of the right-hand side matrix
1748 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1749  StrictlyLowerMatrix<MT,SO,true>::operator=( const Matrix<MT2,SO2>& rhs )
1750 {
1751  if( IsUniTriangular<MT2>::value ||
1752  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) ) {
1753  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1754  }
1755 
1756  matrix_ = ~rhs;
1757 
1758  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1759  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1760 
1761  return *this;
1762 }
1764 //*************************************************************************************************
1765 
1766 
1767 //*************************************************************************************************
1780 template< typename MT // Type of the adapted dense matrix
1781  , bool SO > // Storage order of the adapted dense matrix
1782 template< typename MT2 // Type of the right-hand side matrix
1783  , bool SO2 > // Storage order of the right-hand side matrix
1784 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1785  StrictlyLowerMatrix<MT,SO,true>::operator=( const Matrix<MT2,SO2>& rhs )
1786 {
1787  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) ) {
1788  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1789  }
1790 
1791  if( IsStrictlyLower<MT2>::value ) {
1792  matrix_ = ~rhs;
1793  }
1794  else {
1795  MT tmp( ~rhs );
1796 
1797  if( !isStrictlyLower( tmp ) ) {
1798  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1799  }
1800 
1801  matrix_ = std::move( tmp );
1802  }
1803 
1804  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1805  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1806 
1807  return *this;
1808 }
1810 //*************************************************************************************************
1811 
1812 
1813 //*************************************************************************************************
1826 template< typename MT // Type of the adapted dense matrix
1827  , bool SO > // Storage order of the adapted dense matrix
1828 template< typename MT2 // Type of the right-hand side matrix
1829  , bool SO2 > // Storage order of the right-hand side matrix
1830 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1831  StrictlyLowerMatrix<MT,SO,true>::operator+=( const Matrix<MT2,SO2>& rhs )
1832 {
1833  if( IsUniTriangular<MT2>::value ||
1834  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) ) {
1835  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1836  }
1837 
1838  matrix_ += ~rhs;
1839 
1840  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1841  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1842 
1843  return *this;
1844 }
1846 //*************************************************************************************************
1847 
1848 
1849 //*************************************************************************************************
1862 template< typename MT // Type of the adapted dense matrix
1863  , bool SO > // Storage order of the adapted dense matrix
1864 template< typename MT2 // Type of the right-hand side matrix
1865  , bool SO2 > // Storage order of the right-hand side matrix
1866 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1867  StrictlyLowerMatrix<MT,SO,true>::operator+=( const Matrix<MT2,SO2>& rhs )
1868 {
1869  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) ) {
1870  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1871  }
1872 
1873  if( IsStrictlyLower<MT2>::value ) {
1874  matrix_ += ~rhs;
1875  }
1876  else {
1877  const ResultType_<MT2> tmp( ~rhs );
1878 
1879  if( !isStrictlyLower( tmp ) ) {
1880  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1881  }
1882 
1883  matrix_ += tmp;
1884  }
1885 
1886  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1887  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1888 
1889  return *this;
1890 }
1892 //*************************************************************************************************
1893 
1894 
1895 //*************************************************************************************************
1908 template< typename MT // Type of the adapted dense matrix
1909  , bool SO > // Storage order of the adapted dense matrix
1910 template< typename MT2 // Type of the right-hand side matrix
1911  , bool SO2 > // Storage order of the right-hand side matrix
1912 inline DisableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1913  StrictlyLowerMatrix<MT,SO,true>::operator-=( const Matrix<MT2,SO2>& rhs )
1914 {
1915  if( IsUniTriangular<MT2>::value ||
1916  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( ~rhs ) ) ) {
1917  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1918  }
1919 
1920  matrix_ -= ~rhs;
1921 
1922  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1923  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1924 
1925  return *this;
1926 }
1928 //*************************************************************************************************
1929 
1930 
1931 //*************************************************************************************************
1944 template< typename MT // Type of the adapted dense matrix
1945  , bool SO > // Storage order of the adapted dense matrix
1946 template< typename MT2 // Type of the right-hand side matrix
1947  , bool SO2 > // Storage order of the right-hand side matrix
1948 inline EnableIf_< IsComputation<MT2>, StrictlyLowerMatrix<MT,SO,true>& >
1949  StrictlyLowerMatrix<MT,SO,true>::operator-=( const Matrix<MT2,SO2>& rhs )
1950 {
1951  if( IsUniTriangular<MT2>::value || ( !IsSquare<MT2>::value && !isSquare( ~rhs ) ) ) {
1952  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1953  }
1954 
1955  if( IsStrictlyLower<MT2>::value ) {
1956  matrix_ -= ~rhs;
1957  }
1958  else {
1959  const ResultType_<MT2> tmp( ~rhs );
1960 
1961  if( !isStrictlyLower( tmp ) ) {
1962  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1963  }
1964 
1965  matrix_ -= tmp;
1966  }
1967 
1968  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
1969  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
1970 
1971  return *this;
1972 }
1974 //*************************************************************************************************
1975 
1976 
1977 //*************************************************************************************************
1989 template< typename MT // Type of the adapted dense matrix
1990  , bool SO > // Storage order of the adapted dense matrix
1991 template< typename MT2 // Type of the right-hand side matrix
1992  , bool SO2 > // Storage order of the right-hand side matrix
1993 inline StrictlyLowerMatrix<MT,SO,true>&
1994  StrictlyLowerMatrix<MT,SO,true>::operator*=( const Matrix<MT2,SO2>& rhs )
1995 {
1996  if( matrix_.rows() != (~rhs).columns() ) {
1997  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
1998  }
1999 
2000  MT tmp( matrix_ * ~rhs );
2001 
2002  if( !isStrictlyLower( tmp ) ) {
2003  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment to strictly lower matrix" );
2004  }
2005 
2006  matrix_ = std::move( tmp );
2007 
2008  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
2009  BLAZE_INTERNAL_ASSERT( isIntact(), "Broken invariant detected" );
2010 
2011  return *this;
2012 }
2014 //*************************************************************************************************
2015 
2016 
2017 //*************************************************************************************************
2025 template< typename MT // Type of the adapted dense matrix
2026  , bool SO > // Storage order of the adapted dense matrix
2027 template< typename Other > // Data type of the right-hand side scalar
2028 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,true> >&
2030 {
2031  matrix_ *= rhs;
2032  return *this;
2033 }
2034 //*************************************************************************************************
2035 
2036 
2037 //*************************************************************************************************
2045 template< typename MT // Type of the adapted dense matrix
2046  , bool SO > // Storage order of the adapted dense matrix
2047 template< typename Other > // Data type of the right-hand side scalar
2048 inline EnableIf_< IsNumeric<Other>, StrictlyLowerMatrix<MT,SO,true> >&
2050 {
2051  BLAZE_USER_ASSERT( rhs != Other(0), "Division by zero detected" );
2052 
2053  matrix_ /= rhs;
2054  return *this;
2055 }
2057 //*************************************************************************************************
2058 
2059 
2060 
2061 
2062 //=================================================================================================
2063 //
2064 // UTILITY FUNCTIONS
2065 //
2066 //=================================================================================================
2067 
2068 //*************************************************************************************************
2074 template< typename MT // Type of the adapted dense matrix
2075  , bool SO > // Storage order of the adapted dense matrix
2076 inline size_t StrictlyLowerMatrix<MT,SO,true>::rows() const noexcept
2077 {
2078  return matrix_.rows();
2079 }
2081 //*************************************************************************************************
2082 
2083 
2084 //*************************************************************************************************
2090 template< typename MT // Type of the adapted dense matrix
2091  , bool SO > // Storage order of the adapted dense matrix
2092 inline size_t StrictlyLowerMatrix<MT,SO,true>::columns() const noexcept
2093 {
2094  return matrix_.columns();
2095 }
2097 //*************************************************************************************************
2098 
2099 
2100 //*************************************************************************************************
2111 template< typename MT // Type of the adapted dense matrix
2112  , bool SO > // Storage order of the adapted dense matrix
2113 inline size_t StrictlyLowerMatrix<MT,SO,true>::spacing() const noexcept
2114 {
2115  return matrix_.spacing();
2116 }
2118 //*************************************************************************************************
2119 
2120 
2121 //*************************************************************************************************
2127 template< typename MT // Type of the adapted dense matrix
2128  , bool SO > // Storage order of the adapted dense matrix
2129 inline size_t StrictlyLowerMatrix<MT,SO,true>::capacity() const noexcept
2130 {
2131  return matrix_.capacity();
2132 }
2134 //*************************************************************************************************
2135 
2136 
2137 //*************************************************************************************************
2149 template< typename MT // Type of the adapted dense matrix
2150  , bool SO > // Storage order of the adapted dense matrix
2151 inline size_t StrictlyLowerMatrix<MT,SO,true>::capacity( size_t i ) const noexcept
2152 {
2153  return matrix_.capacity(i);
2154 }
2156 //*************************************************************************************************
2157 
2158 
2159 //*************************************************************************************************
2165 template< typename MT // Type of the adapted dense matrix
2166  , bool SO > // Storage order of the adapted dense matrix
2167 inline size_t StrictlyLowerMatrix<MT,SO,true>::nonZeros() const
2168 {
2169  return matrix_.nonZeros();
2170 }
2172 //*************************************************************************************************
2173 
2174 
2175 //*************************************************************************************************
2187 template< typename MT // Type of the adapted dense matrix
2188  , bool SO > // Storage order of the adapted dense matrix
2189 inline size_t StrictlyLowerMatrix<MT,SO,true>::nonZeros( size_t i ) const
2190 {
2191  return matrix_.nonZeros(i);
2192 }
2194 //*************************************************************************************************
2195 
2196 
2197 //*************************************************************************************************
2203 template< typename MT // Type of the adapted dense matrix
2204  , bool SO > // Storage order of the adapted dense matrix
2206 {
2207  using blaze::clear;
2208 
2209  if( SO ) {
2210  for( size_t j=0UL; j<columns(); ++j )
2211  for( size_t i=j+1UL; i<rows(); ++i )
2212  clear( matrix_(i,j) );
2213  }
2214  else {
2215  for( size_t i=1UL; i<rows(); ++i )
2216  for( size_t j=0UL; j<i; ++j )
2217  clear( matrix_(i,j) );
2218  }
2219 }
2221 //*************************************************************************************************
2222 
2223 
2224 //*************************************************************************************************
2237 template< typename MT // Type of the adapted dense matrix
2238  , bool SO > // Storage order of the adapted dense matrix
2239 inline void StrictlyLowerMatrix<MT,SO,true>::reset( size_t i )
2240 {
2241  using blaze::clear;
2242 
2243  if( SO ) {
2244  for( size_t j=i+1UL; j<rows(); ++j )
2245  clear( matrix_(j,i) );
2246  }
2247  else {
2248  for( size_t j=0UL; j<i; ++j )
2249  clear( matrix_(i,j) );
2250  }
2251 }
2253 //*************************************************************************************************
2254 
2255 
2256 //*************************************************************************************************
2268 template< typename MT // Type of the adapted dense matrix
2269  , bool SO > // Storage order of the adapted dense matrix
2271 {
2272  using blaze::clear;
2273 
2274  if( IsResizable<MT>::value ) {
2275  clear( matrix_ );
2276  }
2277  else {
2278  reset();
2279  }
2280 }
2282 //*************************************************************************************************
2283 
2284 
2285 //*************************************************************************************************
2321 template< typename MT // Type of the adapted dense matrix
2322  , bool SO > // Storage order of the adapted dense matrix
2323 void StrictlyLowerMatrix<MT,SO,true>::resize( size_t n, bool preserve )
2324 {
2326 
2327  UNUSED_PARAMETER( preserve );
2328 
2329  BLAZE_INTERNAL_ASSERT( isSquare( matrix_ ), "Non-square strictly lower matrix detected" );
2330 
2331  const size_t oldsize( matrix_.rows() );
2332 
2333  matrix_.resize( n, n, true );
2334 
2335  if( n > oldsize )
2336  {
2337  const size_t increment( n - oldsize );
2338  submatrix( matrix_, 0UL, oldsize, n, increment ).reset();
2339  }
2340 }
2342 //*************************************************************************************************
2343 
2344 
2345 //*************************************************************************************************
2358 template< typename MT // Type of the adapted dense matrix
2359  , bool SO > // Storage order of the adapted dense matrix
2360 inline void StrictlyLowerMatrix<MT,SO,true>::extend( size_t n, bool preserve )
2361 {
2363 
2364  UNUSED_PARAMETER( preserve );
2365 
2366  resize( rows() + n, true );
2367 }
2368 //*************************************************************************************************
2369 
2370 
2371 //*************************************************************************************************
2381 template< typename MT // Type of the adapted dense matrix
2382  , bool SO > // Storage order of the adapted dense matrix
2383 inline void StrictlyLowerMatrix<MT,SO,true>::reserve( size_t elements )
2384 {
2385  matrix_.reserve( elements );
2386 }
2388 //*************************************************************************************************
2389 
2390 
2391 //*************************************************************************************************
2398 template< typename MT // Type of the adapted dense matrix
2399  , bool SO > // Storage order of the adapted dense matrix
2400 inline void StrictlyLowerMatrix<MT,SO,true>::swap( StrictlyLowerMatrix& m ) noexcept
2401 {
2402  using std::swap;
2403 
2404  swap( matrix_, m.matrix_ );
2405 }
2407 //*************************************************************************************************
2408 
2409 
2410 //*************************************************************************************************
2422 template< typename MT // Type of the adapted dense matrix
2423  , bool SO > // Storage order of the adapted dense matrix
2424 inline constexpr size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros() noexcept
2425 {
2427 
2428  return maxNonZeros( Rows<MT>::value );
2429 }
2431 //*************************************************************************************************
2432 
2433 
2434 //*************************************************************************************************
2444 template< typename MT // Type of the adapted dense matrix
2445  , bool SO > // Storage order of the adapted dense matrix
2446 inline constexpr size_t StrictlyLowerMatrix<MT,SO,true>::maxNonZeros( size_t n ) noexcept
2447 {
2448  return ( ( n - 1UL ) * n ) / 2UL;
2449 }
2451 //*************************************************************************************************
2452 
2453 
2454 
2455 
2456 //=================================================================================================
2457 //
2458 // NUMERIC FUNCTIONS
2459 //
2460 //=================================================================================================
2461 
2462 //*************************************************************************************************
2469 template< typename MT // Type of the adapted dense matrix
2470  , bool SO > // Storage order of the adapted dense matrix
2471 template< typename Other > // Data type of the scalar value
2472 inline StrictlyLowerMatrix<MT,SO,true>&
2473  StrictlyLowerMatrix<MT,SO,true>::scale( const Other& scalar )
2474 {
2475  matrix_.scale( scalar );
2476  return *this;
2477 }
2479 //*************************************************************************************************
2480 
2481 
2482 
2483 
2484 //=================================================================================================
2485 //
2486 // DEBUGGING FUNCTIONS
2487 //
2488 //=================================================================================================
2489 
2490 //*************************************************************************************************
2500 template< typename MT // Type of the adapted dense matrix
2501  , bool SO > // Storage order of the adapted dense matrix
2502 inline bool StrictlyLowerMatrix<MT,SO,true>::isIntact() const noexcept
2503 {
2504  using blaze::isIntact;
2505 
2506  return ( isIntact( matrix_ ) && isStrictlyLower( matrix_ ) );
2507 }
2509 //*************************************************************************************************
2510 
2511 
2512 
2513 
2514 //=================================================================================================
2515 //
2516 // EXPRESSION TEMPLATE EVALUATION FUNCTIONS
2517 //
2518 //=================================================================================================
2519 
2520 //*************************************************************************************************
2531 template< typename MT // Type of the adapted dense matrix
2532  , bool SO > // Storage order of the adapted dense matrix
2533 template< typename Other > // Data type of the foreign expression
2534 inline bool StrictlyLowerMatrix<MT,SO,true>::canAlias( const Other* alias ) const noexcept
2535 {
2536  return matrix_.canAlias( alias );
2537 }
2539 //*************************************************************************************************
2540 
2541 
2542 //*************************************************************************************************
2553 template< typename MT // Type of the adapted dense matrix
2554  , bool SO > // Storage order of the adapted dense matrix
2555 template< typename Other > // Data type of the foreign expression
2556 inline bool StrictlyLowerMatrix<MT,SO,true>::isAliased( const Other* alias ) const noexcept
2557 {
2558  return matrix_.isAliased( alias );
2559 }
2561 //*************************************************************************************************
2562 
2563 
2564 //*************************************************************************************************
2574 template< typename MT // Type of the adapted dense matrix
2575  , bool SO > // Storage order of the adapted dense matrix
2576 inline bool StrictlyLowerMatrix<MT,SO,true>::isAligned() const noexcept
2577 {
2578  return matrix_.isAligned();
2579 }
2581 //*************************************************************************************************
2582 
2583 
2584 //*************************************************************************************************
2595 template< typename MT // Type of the adapted dense matrix
2596  , bool SO > // Storage order of the adapted dense matrix
2597 inline bool StrictlyLowerMatrix<MT,SO,true>::canSMPAssign() const noexcept
2598 {
2599  return matrix_.canSMPAssign();
2600 }
2602 //*************************************************************************************************
2603 
2604 
2605 //*************************************************************************************************
2621 template< typename MT // Type of the adapted dense matrix
2622  , bool SO > // Storage order of the adapted dense matrix
2623 BLAZE_ALWAYS_INLINE typename StrictlyLowerMatrix<MT,SO,true>::SIMDType
2624  StrictlyLowerMatrix<MT,SO,true>::load( size_t i, size_t j ) const noexcept
2625 {
2626  return matrix_.load( i, j );
2627 }
2629 //*************************************************************************************************
2630 
2631 
2632 //*************************************************************************************************
2648 template< typename MT // Type of the adapted dense matrix
2649  , bool SO > // Storage order of the adapted dense matrix
2650 BLAZE_ALWAYS_INLINE typename StrictlyLowerMatrix<MT,SO,true>::SIMDType
2651  StrictlyLowerMatrix<MT,SO,true>::loada( size_t i, size_t j ) const noexcept
2652 {
2653  return matrix_.loada( i, j );
2654 }
2656 //*************************************************************************************************
2657 
2658 
2659 //*************************************************************************************************
2675 template< typename MT // Type of the adapted dense matrix
2676  , bool SO > // Storage order of the adapted dense matrix
2677 BLAZE_ALWAYS_INLINE typename StrictlyLowerMatrix<MT,SO,true>::SIMDType
2678  StrictlyLowerMatrix<MT,SO,true>::loadu( size_t i, size_t j ) const noexcept
2679 {
2680  return matrix_.loadu( i, j );
2681 }
2683 //*************************************************************************************************
2684 
2685 
2686 
2687 
2688 //=================================================================================================
2689 //
2690 // CONSTRUCTION FUNCTIONS
2691 //
2692 //=================================================================================================
2693 
2694 //*************************************************************************************************
2701 template< typename MT // Type of the adapted dense matrix
2702  , bool SO > // Storage order of the adapted dense matrix
2703 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct( size_t n, TrueType )
2704 {
2706 
2707  return MT( n, n, ElementType() );
2708 }
2710 //*************************************************************************************************
2711 
2712 
2713 //*************************************************************************************************
2720 template< typename MT // Type of the adapted dense matrix
2721  , bool SO > // Storage order of the adapted dense matrix
2722 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct( const ElementType& init, FalseType )
2723 {
2726 
2727  MT tmp;
2728 
2729  if( SO ) {
2730  for( size_t j=0UL; j<tmp.columns(); ++j ) {
2731  for( size_t i=j+1UL; i<tmp.rows(); ++i )
2732  tmp(i,j) = init;
2733  }
2734  }
2735  else {
2736  for( size_t i=0UL; i<tmp.rows(); ++i ) {
2737  for( size_t j=0UL; j<i; ++j )
2738  tmp(i,j) = init;
2739  }
2740  }
2741 
2742  return tmp;
2743 }
2745 //*************************************************************************************************
2746 
2747 
2748 //*************************************************************************************************
2759 template< typename MT // Type of the adapted dense matrix
2760  , bool SO > // Storage order of the adapted dense matrix
2761 template< typename MT2 // Type of the foreign matrix
2762  , bool SO2 // Storage order of the foreign matrix
2763  , typename T > // Type of the third argument
2764 inline const MT StrictlyLowerMatrix<MT,SO,true>::construct( const Matrix<MT2,SO2>& m, T )
2765 {
2766  const MT tmp( ~m );
2767 
2768  if( IsUniTriangular<MT2>::value ||
2769  ( !IsStrictlyLower<MT2>::value && !isStrictlyLower( tmp ) ) ) {
2770  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of strictly lower matrix" );
2771  }
2772 
2773  return tmp;
2774 }
2776 //*************************************************************************************************
2777 
2778 } // namespace blaze
2779 
2780 #endif
Constraint on the data type.
Header file for the implementation of the Submatrix view.
#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:79
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
BLAZE_ALWAYS_INLINE size_t spacing(const DenseMatrix< MT, SO > &dm) noexcept
Returns the spacing between the beginning of two rows/columns.
Definition: DenseMatrix.h:102
Header file for auxiliary alias declarations.
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1238
#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 the UNUSED_PARAMETER function template.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:352
Header file for basic type definitions.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
Header file for the FalseType type/value trait base class.
#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:63
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
constexpr bool operator<(const NegativeAccuracy< A > &lhs, const T &rhs)
Less-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:329
BLAZE_ALWAYS_INLINE T1 & operator/=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Division assignment operator for the division of two SIMD packs.
Definition: BasicTypes.h:1339
Constraint on the data type.
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:194
Constraint on the data type.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const DenseIterator< Type, AF > operator+(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Addition between a DenseIterator and an integral value.
Definition: DenseIterator.h:699
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2935
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:223
void clear(CompressedMatrix< Type, SO > &m)
Clearing the given compressed matrix.
Definition: CompressedMatrix.h:5556
CompressedMatrix< Type, true > This
Type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2928
#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:79
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:390
#define BLAZE_CONSTRAINT_MUST_BE_SQUARE(T)
Constraint on the data type.In case the given data type T is not a square matrix type, a compilation error is created.
Definition: Square.h:60
const DenseIterator< Type, AF > operator-(const DenseIterator< Type, AF > &it, ptrdiff_t inc) noexcept
Subtraction between a DenseIterator and an integral value.
Definition: DenseIterator.h:731
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
BLAZE_ALWAYS_INLINE T1 & operator*=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Multiplication assignment operator for the multiplication of two SIMD packs.
Definition: BasicTypes.h:1321
Constraint on the data type.
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loadu(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loadu.h:77
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2931
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:304
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:238
Constraint on the data type.
Constraint on the data type.
Header file for the std::initializer_list aliases.
Header file for the IsSquare type trait.
Constraint on the data type.
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
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
void swap(CompressedMatrix< Type, SO > &a, CompressedMatrix< Type, SO > &b) noexcept
Swapping the contents of two compressed matrices.
Definition: CompressedMatrix.h:5635
Compile time assertion.
bool isIntact(const CompressedMatrix< Type, SO > &m)
Returns whether the invariants of the given compressed matrix are intact.
Definition: CompressedMatrix.h:5618
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
#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:79
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
Header file for the DenseMatrix base class.
Header file for the Columns type trait.
constexpr bool operator>(const NegativeAccuracy< A > &lhs, const T &rhs)
Greater-than comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:367
constexpr bool operator>=(const NegativeAccuracy< A > &, const T &rhs)
Greater-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:443
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:336
BLAZE_ALWAYS_INLINE const EnableIf_< And< IsIntegral< T >, HasSize< T, 1UL > >, If_< IsSigned< T >, SIMDint8, SIMDuint8 > > loada(const T *address) noexcept
Loads a vector of 1-byte integral values.
Definition: Loada.h:80
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
Header file for the IsUniTriangular type trait.
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2932
Constraints on the storage order of matrix types.
Header file for the exception macros of the math module.
#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:81
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:544
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:260
Type ElementType
Type of the compressed matrix elements.
Definition: CompressedMatrix.h:2933
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2937
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for utility functions for dense matrices.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
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:79
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2934
BLAZE_ALWAYS_INLINE T1 & operator+=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Addition assignment operator for the addition of two SIMD packs.
Definition: BasicTypes.h:1285
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:81
#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:79
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2938
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:267
Constraint on the data type.
Constraint on the data type.
Header file for the StrictlyLowerProxy class.
constexpr bool operator<=(const NegativeAccuracy< A > &, const T &rhs)
Less-or-equal-than comparison between a NegativeAccuracy object and a floating point value...
Definition: Accuracy.h:405
#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 &#39;resize&#39; member fu...
Definition: Resizable.h:81
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
SparseMatrix< This, true > BaseType
Base type of this CompressedMatrix instance.
Definition: CompressedMatrix.h:2929
#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 &#39;res...
Definition: Resizable.h:61
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:81
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2930
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2936
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
BLAZE_ALWAYS_INLINE T1 & operator-=(SIMDPack< T1 > &lhs, const SIMDPack< T2 > &rhs)
Subtraction assignment operator for the subtraction of two SIMD packs.
Definition: BasicTypes.h:1303
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#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:112
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:168
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:677
Header file for the IsResizable type trait.
const DMatDMatMultExpr< T1, T2, false, false, false, false > operator*(const DenseMatrix< T1, false > &lhs, const DenseMatrix< T2, false > &rhs)
Multiplication operator for the multiplication of two row-major dense matrices ( ).
Definition: DMatDMatMultExpr.h:7505
System settings for the inline keywords.
#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
Header file for the TrueType type/value trait base class.