LowerMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_LOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_LOWERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
54 #include <blaze/math/Exception.h>
55 #include <blaze/math/Forward.h>
92 #include <blaze/util/Assert.h>
93 #include <blaze/util/EnableIf.h>
94 #include <blaze/util/TrueType.h>
96 #include <blaze/util/Unused.h>
97 
98 
99 namespace blaze {
100 
101 //=================================================================================================
102 //
103 // LOWERMATRIX OPERATORS
104 //
105 //=================================================================================================
106 
107 //*************************************************************************************************
110 template< typename MT, bool SO, bool DF >
111 inline void reset( LowerMatrix<MT,SO,DF>& m );
112 
113 template< typename MT, bool SO, bool DF >
114 inline void reset( LowerMatrix<MT,SO,DF>& m, size_t i );
115 
116 template< typename MT, bool SO, bool DF >
117 inline void clear( LowerMatrix<MT,SO,DF>& m );
118 
119 template< bool RF, typename MT, bool SO, bool DF >
120 inline bool isDefault( const LowerMatrix<MT,SO,DF>& m );
121 
122 template< typename MT, bool SO, bool DF >
123 inline bool isIntact( const LowerMatrix<MT,SO,DF>& m );
124 
125 template< typename MT, bool SO, bool DF >
126 inline void swap( LowerMatrix<MT,SO,DF>& a, LowerMatrix<MT,SO,DF>& b ) noexcept;
128 //*************************************************************************************************
129 
130 
131 //*************************************************************************************************
138 template< typename MT // Type of the adapted matrix
139  , bool SO // Storage order of the adapted matrix
140  , bool DF > // Density flag
141 inline void reset( LowerMatrix<MT,SO,DF>& m )
142 {
143  m.reset();
144 }
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
161 template< typename MT // Type of the adapted matrix
162  , bool SO // Storage order of the adapted matrix
163  , bool DF > // Density flag
164 inline void reset( LowerMatrix<MT,SO,DF>& m, size_t i )
165 {
166  m.reset( i );
167 }
168 //*************************************************************************************************
169 
170 
171 //*************************************************************************************************
178 template< typename MT // Type of the adapted matrix
179  , bool SO // Storage order of the adapted matrix
180  , bool DF > // Density flag
181 inline void clear( LowerMatrix<MT,SO,DF>& m )
182 {
183  m.clear();
184 }
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
216 template< bool RF // Relaxation flag
217  , typename MT // Type of the adapted matrix
218  , bool SO // Storage order of the adapted matrix
219  , bool DF > // Density flag
220 inline bool isDefault( const LowerMatrix<MT,SO,DF>& m )
221 {
222  return isDefault<RF>( m.matrix_ );
223 }
224 //*************************************************************************************************
225 
226 
227 //*************************************************************************************************
248 template< typename MT // Type of the adapted matrix
249  , bool SO // Storage order of the adapted matrix
250  , bool DF > // Density flag
251 inline bool isIntact( const LowerMatrix<MT,SO,DF>& m )
252 {
253  return m.isIntact();
254 }
255 //*************************************************************************************************
256 
257 
258 //*************************************************************************************************
266 template< typename MT // Type of the adapted matrix
267  , bool SO // Storage order of the adapted matrix
268  , bool DF > // Density flag
269 inline void swap( LowerMatrix<MT,SO,DF>& a, LowerMatrix<MT,SO,DF>& b ) noexcept
270 {
271  a.swap( b );
272 }
273 //*************************************************************************************************
274 
275 
276 //*************************************************************************************************
299 template< InversionFlag IF // Inversion algorithm
300  , typename MT // Type of the dense matrix
301  , bool SO > // Storage order of the dense matrix
302 inline void invert( LowerMatrix<MT,SO,true>& m )
303 {
305 
306  if( IF == asUniUpper ) {
307  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
308  return;
309  }
310 
311  constexpr InversionFlag flag( ( IF == byLU || IF == asGeneral || IF == asLower )
312  ? ( asLower )
313  : ( ( IF == asUniLower )
314  ?( asUniLower )
315  :( asDiagonal ) ) );
316 
317  invert<flag>( derestrict( m ) );
318 
319  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
320 }
322 //*************************************************************************************************
323 
324 
325 //*************************************************************************************************
344 template< typename MT1, bool SO1, typename MT2, typename MT3, typename MT4, bool SO2 >
345 inline void lu( const LowerMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
347 {
349 
354 
359 
360  using ET3 = ElementType_<MT3>;
361  using ET4 = ElementType_<MT4>;
362 
363  const size_t n( (~A).rows() );
364 
365  decltype(auto) U2( derestrict( ~U ) );
366 
367  (~L) = A;
368 
369  resize( ~U, n, n );
370  reset( U2 );
371 
372  resize( ~P, n, n );
373  reset( ~P );
374 
375  for( size_t i=0UL; i<n; ++i ) {
376  U2(i,i) = ET3(1);
377  (~P)(i,i) = ET4(1);
378  }
379 }
381 //*************************************************************************************************
382 
383 
384 //*************************************************************************************************
400 template< typename MT // Type of the adapted matrix
401  , bool SO // Storage order of the adapted matrix
402  , bool DF // Density flag
403  , typename ET > // Type of the element
404 inline bool trySet( const LowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
405 {
406  BLAZE_INTERNAL_ASSERT( i < (~mat).rows(), "Invalid row access index" );
407  BLAZE_INTERNAL_ASSERT( j < (~mat).columns(), "Invalid column access index" );
408 
409  UNUSED_PARAMETER( mat );
410 
411  return ( i >= j || isDefault( value ) );
412 }
414 //*************************************************************************************************
415 
416 
417 //*************************************************************************************************
433 template< typename MT // Type of the adapted matrix
434  , bool SO // Storage order of the adapted matrix
435  , bool DF // Density flag
436  , typename ET > // Type of the element
437 inline bool tryAdd( const LowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
438 {
439  return trySet( mat, i, j, value );
440 }
442 //*************************************************************************************************
443 
444 
445 //*************************************************************************************************
461 template< typename MT // Type of the adapted matrix
462  , bool SO // Storage order of the adapted matrix
463  , bool DF // Density flag
464  , typename ET > // Type of the element
465 inline bool trySub( const LowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
466 {
467  return trySet( mat, i, j, value );
468 }
470 //*************************************************************************************************
471 
472 
473 //*************************************************************************************************
489 template< typename MT // Type of the adapted matrix
490  , bool SO // Storage order of the adapted matrix
491  , bool DF // Density flag
492  , typename VT > // Type of the right-hand side dense vector
493 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs,
494  const DenseVector<VT,false>& rhs, size_t row, size_t column )
495 {
497 
498  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
499  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
500  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
501 
502  UNUSED_PARAMETER( lhs );
503 
504  if( column <= row )
505  return true;
506 
507  const size_t iend( min( column - row, (~rhs).size() ) );
508 
509  for( size_t i=0UL; i<iend; ++i ) {
510  if( !isDefault( (~rhs)[i] ) )
511  return false;
512  }
513 
514  return true;
515 }
517 //*************************************************************************************************
518 
519 
520 //*************************************************************************************************
536 template< typename MT // Type of the adapted matrix
537  , bool SO // Storage order of the adapted matrix
538  , bool DF // Density flag
539  , typename VT > // Type of the right-hand side dense vector
540 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs,
541  const DenseVector<VT,true>& rhs, size_t row, size_t column )
542 {
544 
545  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
546  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
547  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
548 
549  UNUSED_PARAMETER( lhs );
550 
551  const size_t ibegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
552 
553  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
554  if( !isDefault( (~rhs)[i] ) )
555  return false;
556  }
557 
558  return true;
559 }
561 //*************************************************************************************************
562 
563 
564 //*************************************************************************************************
582 template< typename MT // Type of the adapted matrix
583  , bool SO // Storage order of the adapted matrix
584  , bool DF // Density flag
585  , typename VT // Type of the right-hand side dense vector
586  , bool TF > // Transpose flag of the right-hand side dense vector
587 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs, const DenseVector<VT,TF>& rhs,
588  ptrdiff_t band, size_t row, size_t column )
589 {
591 
592  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
593  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
594  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
595  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
596 
597  UNUSED_PARAMETER( lhs, row, column );
598 
599  if( band > 0L ) {
600  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
601  if( !isDefault( (~rhs)[i] ) )
602  return false;
603  }
604  }
605 
606  return true;
607 }
609 //*************************************************************************************************
610 
611 
612 //*************************************************************************************************
628 template< typename MT // Type of the adapted matrix
629  , bool SO // Storage order of the adapted matrix
630  , bool DF // Density flag
631  , typename VT > // Type of the right-hand side sparse vector
632 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs,
633  const SparseVector<VT,false>& rhs, size_t row, size_t column )
634 {
636 
637  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
638  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
639  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
640 
641  UNUSED_PARAMETER( lhs );
642 
643  using RhsIterator = typename VT::ConstIterator;
644 
645  if( column <= row )
646  return true;
647 
648  const RhsIterator last( (~rhs).lowerBound( column - row ) );
649 
650  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
651  if( !isDefault( element->value() ) )
652  return false;
653  }
654 
655  return true;
656 }
658 //*************************************************************************************************
659 
660 
661 //*************************************************************************************************
677 template< typename MT // Type of the adapted matrix
678  , bool SO // Storage order of the adapted matrix
679  , bool DF // Density flag
680  , typename VT > // Type of the right-hand side sparse vector
681 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs,
682  const SparseVector<VT,true>& rhs, size_t row, size_t column )
683 {
685 
686  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
687  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
688  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
689 
690  UNUSED_PARAMETER( lhs );
691 
692  using RhsIterator = typename VT::ConstIterator;
693 
694  const RhsIterator last( (~rhs).end() );
695  RhsIterator element( (~rhs).lowerBound( ( row < column )?( 0UL ):( row - column + 1UL ) ) );
696 
697  for( ; element!=last; ++element ) {
698  if( !isDefault( element->value() ) )
699  return false;
700  }
701 
702  return true;
703 }
705 //*************************************************************************************************
706 
707 
708 //*************************************************************************************************
726 template< typename MT // Type of the adapted matrix
727  , bool SO // Storage order of the adapted matrix
728  , bool DF // Density flag
729  , typename VT // Type of the right-hand side sparse vector
730  , bool TF > // Transpose flag of the right-hand side sparse vector
731 inline bool tryAssign( const LowerMatrix<MT,SO,DF>& lhs, const SparseVector<VT,TF>& rhs,
732  ptrdiff_t band, size_t row, size_t column )
733 {
735 
736  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
737  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
738  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
739  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
740 
741  UNUSED_PARAMETER( lhs, row, column );
742 
743  if( band > 0L ) {
744  for( const auto& element : ~rhs ) {
745  if( !isDefault( element.value() ) )
746  return false;
747  }
748  }
749 
750  return true;
751 }
753 //*************************************************************************************************
754 
755 
756 //*************************************************************************************************
772 template< typename MT1 // Type of the adapted matrix
773  , bool SO // Storage order of the adapted matrix
774  , bool DF // Density flag
775  , typename MT2 > // Type of the right-hand side dense matrix
776 inline bool tryAssign( const LowerMatrix<MT1,SO,DF>& lhs,
777  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
778 {
780 
781  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
782  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
783  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
784  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
785 
786  UNUSED_PARAMETER( lhs );
787 
788  const size_t M( (~rhs).rows() );
789  const size_t N( (~rhs).columns() );
790 
791  if( row + 1UL >= column + N )
792  return true;
793 
794  const size_t iend( min( column + N - row - 1UL, M ) );
795 
796  for( size_t i=0UL; i<iend; ++i )
797  {
798  const bool containsDiagonal( row + i >= column );
799  const size_t jbegin( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
800 
801  for( size_t j=jbegin; j<N; ++j ) {
802  if( !isDefault( (~rhs)(i,j) ) )
803  return false;
804  }
805  }
806 
807  return true;
808 }
810 //*************************************************************************************************
811 
812 
813 //*************************************************************************************************
829 template< typename MT1 // Type of the adapted matrix
830  , bool SO // Storage order of the adapted matrix
831  , bool DF // Density flag
832  , typename MT2 > // Type of the right-hand side dense matrix
833 inline bool tryAssign( const LowerMatrix<MT1,SO,DF>& lhs,
834  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
835 {
837 
838  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
839  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
840  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
841  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
842 
843  UNUSED_PARAMETER( lhs );
844 
845  const size_t M( (~rhs).rows() );
846  const size_t N( (~rhs).columns() );
847 
848  if( row + 1UL >= column + N )
849  return true;
850 
851  const size_t jbegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
852 
853  for( size_t j=jbegin; j<N; ++j )
854  {
855  const size_t iend( min( column + j - row, M ) );
856 
857  for( size_t i=0UL; i<iend; ++i ) {
858  if( !isDefault( (~rhs)(i,j) ) )
859  return false;
860  }
861  }
862 
863  return true;
864 }
866 //*************************************************************************************************
867 
868 
869 //*************************************************************************************************
885 template< typename MT1 // Type of the adapted matrix
886  , bool SO // Storage order of the adapted matrix
887  , bool DF // Density flag
888  , typename MT2 > // Type of the right-hand side sparse matrix
889 inline bool tryAssign( const LowerMatrix<MT1,SO,DF>& lhs,
890  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
891 {
893 
894  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
895  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
896  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
897  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
898 
899  UNUSED_PARAMETER( lhs );
900 
901  using RhsIterator = typename MT2::ConstIterator;
902 
903  const size_t M( (~rhs).rows() );
904  const size_t N( (~rhs).columns() );
905 
906  if( row + 1UL >= column + N )
907  return true;
908 
909  const size_t iend( min( column + N - row - 1UL, M ) );
910 
911  for( size_t i=0UL; i<iend; ++i )
912  {
913  const bool containsDiagonal( row + i >= column );
914  const size_t index( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
915 
916  const RhsIterator last( (~rhs).end(i) );
917  RhsIterator element( (~rhs).lowerBound( i, index ) );
918 
919  for( ; element!=last; ++element ) {
920  if( !isDefault( element->value() ) )
921  return false;
922  }
923  }
924 
925  return true;
926 }
928 //*************************************************************************************************
929 
930 
931 //*************************************************************************************************
947 template< typename MT1 // Type of the adapted matrix
948  , bool SO // Storage order of the adapted matrix
949  , bool DF // Density flag
950  , typename MT2 > // Type of the right-hand side sparse matrix
951 inline bool tryAssign( const LowerMatrix<MT1,SO,DF>& lhs,
952  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
953 {
955 
956  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
957  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
958  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
959  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
960 
961  UNUSED_PARAMETER( lhs );
962 
963  using RhsIterator = typename MT2::ConstIterator;
964 
965  const size_t M( (~rhs).rows() );
966  const size_t N( (~rhs).columns() );
967 
968  if( row + 1UL >= column + N )
969  return true;
970 
971  const size_t jbegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
972 
973  for( size_t j=jbegin; j<N; ++j )
974  {
975  const size_t index( column + j - row );
976  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
977 
978  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
979  if( !isDefault( element->value() ) )
980  return false;
981  }
982  }
983 
984  return true;
985 }
987 //*************************************************************************************************
988 
989 
990 //*************************************************************************************************
1006 template< typename MT // Type of the adapted matrix
1007  , bool SO // Storage order of the adapted matrix
1008  , bool DF // Density flag
1009  , typename VT // Type of the right-hand side vector
1010  , bool TF > // Transpose flag of the right-hand side vector
1011 inline bool tryAddAssign( const LowerMatrix<MT,SO,DF>& lhs,
1012  const Vector<VT,TF>& rhs, size_t row, size_t column )
1013 {
1014  return tryAssign( lhs, ~rhs, row, column );
1015 }
1017 //*************************************************************************************************
1018 
1019 
1020 //*************************************************************************************************
1038 template< typename MT // Type of the adapted matrix
1039  , bool SO // Storage order of the adapted matrix
1040  , bool DF // Density flag
1041  , typename VT // Type of the right-hand side vector
1042  , bool TF > // Transpose flag of the right-hand side vector
1043 inline bool tryAddAssign( const LowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1044  ptrdiff_t band, size_t row, size_t column )
1045 {
1046  return tryAssign( lhs, ~rhs, band, row, column );
1047 }
1049 //*************************************************************************************************
1050 
1051 
1052 //*************************************************************************************************
1068 template< typename MT1 // Type of the adapted matrix
1069  , bool SO1 // Storage order of the adapted matrix
1070  , bool DF // Density flag
1071  , typename MT2 // Type of the right-hand side matrix
1072  , bool SO2 > // Storage order of the right-hand side matrix
1073 inline bool tryAddAssign( const LowerMatrix<MT1,SO1,DF>& lhs,
1074  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1075 {
1076  return tryAssign( lhs, ~rhs, row, column );
1077 }
1079 //*************************************************************************************************
1080 
1081 
1082 //*************************************************************************************************
1098 template< typename MT // Type of the adapted matrix
1099  , bool SO // Storage order of the adapted matrix
1100  , bool DF // Density flag
1101  , typename VT // Type of the right-hand side vector
1102  , bool TF > // Transpose flag of the right-hand side vector
1103 inline bool trySubAssign( const LowerMatrix<MT,SO,DF>& lhs,
1104  const Vector<VT,TF>& rhs, size_t row, size_t column )
1105 {
1106  return tryAssign( lhs, ~rhs, row, column );
1107 }
1109 //*************************************************************************************************
1110 
1111 
1112 //*************************************************************************************************
1130 template< typename MT // Type of the adapted matrix
1131  , bool SO // Storage order of the adapted matrix
1132  , bool DF // Density flag
1133  , typename VT // Type of the right-hand side vector
1134  , bool TF > // Transpose flag of the right-hand side vector
1135 inline bool trySubAssign( const LowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1136  ptrdiff_t band, size_t row, size_t column )
1137 {
1138  return tryAssign( lhs, ~rhs, band, row, column );
1139 }
1141 //*************************************************************************************************
1142 
1143 
1144 //*************************************************************************************************
1160 template< typename MT1 // Type of the adapted matrix
1161  , bool SO1 // Storage order of the adapted matrix
1162  , bool DF // Density flag
1163  , typename MT2 // Type of the right-hand side matrix
1164  , bool SO2 > // Storage order of the right-hand side matrix
1165 inline bool trySubAssign( const LowerMatrix<MT1,SO1,DF>& lhs,
1166  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1167 {
1168  return tryAssign( lhs, ~rhs, row, column );
1169 }
1171 //*************************************************************************************************
1172 
1173 
1174 //*************************************************************************************************
1188 template< typename MT // Type of the adapted matrix
1189  , bool SO // Storage order of the adapted matrix
1190  , bool DF > // Density flag
1191 inline MT& derestrict( LowerMatrix<MT,SO,DF>& m )
1192 {
1193  return m.matrix_;
1194 }
1196 //*************************************************************************************************
1197 
1198 
1199 
1200 
1201 //=================================================================================================
1202 //
1203 // SIZE SPECIALIZATIONS
1204 //
1205 //=================================================================================================
1206 
1207 //*************************************************************************************************
1209 template< typename MT, bool SO, bool DF >
1210 struct Size< LowerMatrix<MT,SO,DF>, 0UL >
1211  : public Size<MT,0UL>
1212 {};
1213 
1214 template< typename MT, bool SO, bool DF >
1215 struct Size< LowerMatrix<MT,SO,DF>, 1UL >
1216  : public Size<MT,1UL>
1217 {};
1219 //*************************************************************************************************
1220 
1221 
1222 
1223 
1224 //=================================================================================================
1225 //
1226 // ISSQUARE SPECIALIZATIONS
1227 //
1228 //=================================================================================================
1229 
1230 //*************************************************************************************************
1232 template< typename MT, bool SO, bool DF >
1233 struct IsSquare< LowerMatrix<MT,SO,DF> >
1234  : public TrueType
1235 {};
1237 //*************************************************************************************************
1238 
1239 
1240 
1241 
1242 //=================================================================================================
1243 //
1244 // ISLOWER SPECIALIZATIONS
1245 //
1246 //=================================================================================================
1247 
1248 //*************************************************************************************************
1250 template< typename MT, bool SO, bool DF >
1251 struct IsLower< LowerMatrix<MT,SO,DF> >
1252  : public TrueType
1253 {};
1255 //*************************************************************************************************
1256 
1257 
1258 
1259 
1260 //=================================================================================================
1261 //
1262 // ISADAPTOR SPECIALIZATIONS
1263 //
1264 //=================================================================================================
1265 
1266 //*************************************************************************************************
1268 template< typename MT, bool SO, bool DF >
1269 struct IsAdaptor< LowerMatrix<MT,SO,DF> >
1270  : public TrueType
1271 {};
1273 //*************************************************************************************************
1274 
1275 
1276 
1277 
1278 //=================================================================================================
1279 //
1280 // ISRESTRICTED SPECIALIZATIONS
1281 //
1282 //=================================================================================================
1283 
1284 //*************************************************************************************************
1286 template< typename MT, bool SO, bool DF >
1287 struct IsRestricted< LowerMatrix<MT,SO,DF> >
1288  : public TrueType
1289 {};
1291 //*************************************************************************************************
1292 
1293 
1294 
1295 
1296 //=================================================================================================
1297 //
1298 // HASCONSTDATAACCESS SPECIALIZATIONS
1299 //
1300 //=================================================================================================
1301 
1302 //*************************************************************************************************
1304 template< typename MT, bool SO >
1305 struct HasConstDataAccess< LowerMatrix<MT,SO,true> >
1306  : public TrueType
1307 {};
1309 //*************************************************************************************************
1310 
1311 
1312 
1313 
1314 //=================================================================================================
1315 //
1316 // ISALIGNED SPECIALIZATIONS
1317 //
1318 //=================================================================================================
1319 
1320 //*************************************************************************************************
1322 template< typename MT, bool SO, bool DF >
1323 struct IsAligned< LowerMatrix<MT,SO,DF> >
1324  : public IsAligned<MT>
1325 {};
1327 //*************************************************************************************************
1328 
1329 
1330 
1331 
1332 //=================================================================================================
1333 //
1334 // ISCONTIGUOUS SPECIALIZATIONS
1335 //
1336 //=================================================================================================
1337 
1338 //*************************************************************************************************
1340 template< typename MT, bool SO, bool DF >
1341 struct IsContiguous< LowerMatrix<MT,SO,DF> >
1342  : public IsContiguous<MT>
1343 {};
1345 //*************************************************************************************************
1346 
1347 
1348 
1349 
1350 //=================================================================================================
1351 //
1352 // ISPADDED SPECIALIZATIONS
1353 //
1354 //=================================================================================================
1355 
1356 //*************************************************************************************************
1358 template< typename MT, bool SO, bool DF >
1359 struct IsPadded< LowerMatrix<MT,SO,DF> >
1360  : public IsPadded<MT>
1361 {};
1363 //*************************************************************************************************
1364 
1365 
1366 
1367 
1368 //=================================================================================================
1369 //
1370 // ISRESIZABLE SPECIALIZATIONS
1371 //
1372 //=================================================================================================
1373 
1374 //*************************************************************************************************
1376 template< typename MT, bool SO, bool DF >
1377 struct IsResizable< LowerMatrix<MT,SO,DF> >
1378  : public IsResizable<MT>
1379 {};
1381 //*************************************************************************************************
1382 
1383 
1384 
1385 
1386 //=================================================================================================
1387 //
1388 // ISSHRINKABLE SPECIALIZATIONS
1389 //
1390 //=================================================================================================
1391 
1392 //*************************************************************************************************
1394 template< typename MT, bool SO, bool DF >
1395 struct IsShrinkable< LowerMatrix<MT,SO,DF> >
1396  : public IsShrinkable<MT>
1397 {};
1399 //*************************************************************************************************
1400 
1401 
1402 
1403 
1404 //=================================================================================================
1405 //
1406 // REMOVEADAPTOR SPECIALIZATIONS
1407 //
1408 //=================================================================================================
1409 
1410 //*************************************************************************************************
1412 template< typename MT, bool SO, bool DF >
1413 struct RemoveAdaptor< LowerMatrix<MT,SO,DF> >
1414 {
1415  using Type = MT;
1416 };
1418 //*************************************************************************************************
1419 
1420 
1421 
1422 
1423 //=================================================================================================
1424 //
1425 // ADDTRAIT SPECIALIZATIONS
1426 //
1427 //=================================================================================================
1428 
1429 //*************************************************************************************************
1431 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1432 struct AddTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1433 {
1435 };
1436 
1437 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1438 struct AddTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1439 {
1440  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1441 };
1442 
1443 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1444 struct AddTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1445 {
1447 };
1448 
1449 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1450 struct AddTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1451 {
1452  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1453 };
1454 
1455 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1456 struct AddTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1457 {
1458  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1459 };
1460 
1461 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1462 struct AddTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1463 {
1464  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1465 };
1466 
1467 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1468 struct AddTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1469 {
1471 };
1472 
1473 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1474 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1475 {
1476  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1477 };
1478 
1479 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1480 struct AddTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1481 {
1483 };
1484 
1485 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1486 struct AddTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1487 {
1488  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1489 };
1490 
1491 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1492 struct AddTrait< LowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
1493 {
1495 };
1496 
1497 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1498 struct AddTrait< IdentityMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1499 {
1500  using Type = LowerMatrix< AddTrait_< IdentityMatrix<T,SO1>, MT > >;
1501 };
1502 
1503 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1504 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1505 {
1506  using Type = AddTrait_<MT1,MT2>;
1507 };
1508 
1509 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1510 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1511 {
1512  using Type = AddTrait_<MT1,MT2>;
1513 };
1514 
1515 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1516 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1517 {
1518  using Type = AddTrait_<MT1,MT2>;
1519 };
1520 
1521 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1522 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1523 {
1524  using Type = AddTrait_<MT1,MT2>;
1525 };
1526 
1527 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1528 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1529 {
1530  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1531 };
1533 //*************************************************************************************************
1534 
1535 
1536 
1537 
1538 //=================================================================================================
1539 //
1540 // SUBTRAIT SPECIALIZATIONS
1541 //
1542 //=================================================================================================
1543 
1544 //*************************************************************************************************
1546 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1547 struct SubTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1548 {
1550 };
1551 
1552 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1553 struct SubTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1554 {
1555  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1556 };
1557 
1558 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1559 struct SubTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1560 {
1562 };
1563 
1564 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1565 struct SubTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1566 {
1567  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1568 };
1569 
1570 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1571 struct SubTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1572 {
1573  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1574 };
1575 
1576 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1577 struct SubTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1578 {
1579  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1580 };
1581 
1582 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1583 struct SubTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1584 {
1586 };
1587 
1588 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1589 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1590 {
1591  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1592 };
1593 
1594 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1595 struct SubTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1596 {
1598 };
1599 
1600 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1601 struct SubTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1602 {
1603  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1604 };
1605 
1606 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1607 struct SubTrait< LowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
1608 {
1610 };
1611 
1612 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1613 struct SubTrait< IdentityMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1614 {
1615  using Type = LowerMatrix< SubTrait_< IdentityMatrix<T,SO1>, MT > >;
1616 };
1617 
1618 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1619 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1620 {
1621  using Type = SubTrait_<MT1,MT2>;
1622 };
1623 
1624 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1625 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1626 {
1627  using Type = SubTrait_<MT1,MT2>;
1628 };
1629 
1630 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1631 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1632 {
1633  using Type = SubTrait_<MT1,MT2>;
1634 };
1635 
1636 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1637 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1638 {
1639  using Type = SubTrait_<MT1,MT2>;
1640 };
1641 
1642 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1643 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1644 {
1645  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1646 };
1648 //*************************************************************************************************
1649 
1650 
1651 
1652 
1653 //=================================================================================================
1654 //
1655 // SCHURTRAIT SPECIALIZATIONS
1656 //
1657 //=================================================================================================
1658 
1659 //*************************************************************************************************
1661 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1662 struct SchurTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1663 {
1665 };
1666 
1667 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1668 struct SchurTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1669 {
1671 };
1672 
1673 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1674 struct SchurTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1675 {
1677 };
1678 
1679 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1680 struct SchurTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1681 {
1683 };
1684 
1685 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1686 struct SchurTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1687 {
1689 };
1690 
1691 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1692 struct SchurTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1693 {
1695 };
1696 
1697 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1698 struct SchurTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1699 {
1701 };
1702 
1703 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1704 struct SchurTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1705 {
1707 };
1708 
1709 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1710 struct SchurTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1711 {
1713 };
1714 
1715 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1716 struct SchurTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1717 {
1719 };
1720 
1721 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1722 struct SchurTrait< LowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
1723 {
1725 };
1726 
1727 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1728 struct SchurTrait< IdentityMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1729 {
1731 };
1732 
1733 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1734 struct SchurTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1735 {
1736  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
1737 };
1738 
1739 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1740 struct SchurTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1741 {
1742  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
1743 };
1744 
1745 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1746 struct SchurTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1747 {
1748  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
1749 };
1750 
1751 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1752 struct SchurTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1753 {
1754  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
1755 };
1756 
1757 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1758 struct SchurTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1759 {
1760  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
1761 };
1763 //*************************************************************************************************
1764 
1765 
1766 
1767 
1768 //=================================================================================================
1769 //
1770 // MULTTRAIT SPECIALIZATIONS
1771 //
1772 //=================================================================================================
1773 
1774 //*************************************************************************************************
1776 template< typename MT, bool SO, bool DF, typename T >
1777 struct MultTrait< LowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1778 {
1779  using Type = LowerMatrix< MultTrait_<MT,T> >;
1780 };
1781 
1782 template< typename T, typename MT, bool SO, bool DF >
1783 struct MultTrait< T, LowerMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
1784 {
1785  using Type = LowerMatrix< MultTrait_<T,MT> >;
1786 };
1787 
1788 template< typename MT, bool SO, bool DF, typename T, size_t N >
1789 struct MultTrait< LowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1790 {
1792 };
1793 
1794 template< typename T, size_t N, typename MT, bool SO, bool DF >
1795 struct MultTrait< StaticVector<T,N,true>, LowerMatrix<MT,SO,DF> >
1796 {
1797  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1798 };
1799 
1800 template< typename MT, bool SO, bool DF, typename T, size_t N >
1801 struct MultTrait< LowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1802 {
1804 };
1805 
1806 template< typename T, size_t N, typename MT, bool SO, bool DF >
1807 struct MultTrait< HybridVector<T,N,true>, LowerMatrix<MT,SO,DF> >
1808 {
1809  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1810 };
1811 
1812 template< typename MT, bool SO, bool DF, typename T >
1813 struct MultTrait< LowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
1814 {
1816 };
1817 
1818 template< typename T, typename MT, bool SO, bool DF >
1819 struct MultTrait< DynamicVector<T,true>, LowerMatrix<MT,SO,DF> >
1820 {
1821  using Type = MultTrait_< DynamicVector<T,true>, MT >;
1822 };
1823 
1824 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
1825 struct MultTrait< LowerMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1826 {
1828 };
1829 
1830 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
1831 struct MultTrait< CustomVector<T,AF,PF,true>, LowerMatrix<MT,SO,DF> >
1832 {
1833  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1834 };
1835 
1836 template< typename MT, bool SO, bool DF, typename T >
1837 struct MultTrait< LowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
1838 {
1840 };
1841 
1842 template< typename T, typename MT, bool SO, bool DF >
1843 struct MultTrait< CompressedVector<T,true>, LowerMatrix<MT,SO,DF> >
1844 {
1845  using Type = MultTrait_< CompressedVector<T,true>, MT >;
1846 };
1847 
1848 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1849 struct MultTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1850 {
1852 };
1853 
1854 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1855 struct MultTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1856 {
1857  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1858 };
1859 
1860 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1861 struct MultTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1862 {
1864 };
1865 
1866 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1867 struct MultTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1868 {
1869  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1870 };
1871 
1872 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1873 struct MultTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1874 {
1875  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1876 };
1877 
1878 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1879 struct MultTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1880 {
1881  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1882 };
1883 
1884 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1885 struct MultTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1886 {
1888 };
1889 
1890 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1891 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1892 {
1893  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1894 };
1895 
1896 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1897 struct MultTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1898 {
1900 };
1901 
1902 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1903 struct MultTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1904 {
1905  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1906 };
1907 
1908 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1909 struct MultTrait< LowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
1910 {
1912 };
1913 
1914 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1915 struct MultTrait< IdentityMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1916 {
1918 };
1919 
1920 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1921 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1922 {
1923  using Type = MultTrait_<MT1,MT2>;
1924 };
1925 
1926 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1927 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1928 {
1929  using Type = MultTrait_<MT1,MT2>;
1930 };
1931 
1932 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1933 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1934 {
1935  using Type = MultTrait_<MT1,MT2>;
1936 };
1937 
1938 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1939 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1940 {
1941  using Type = MultTrait_<MT1,MT2>;
1942 };
1943 
1944 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1945 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1946 {
1947  using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1948 };
1950 //*************************************************************************************************
1951 
1952 
1953 
1954 
1955 //=================================================================================================
1956 //
1957 // DIVTRAIT SPECIALIZATIONS
1958 //
1959 //=================================================================================================
1960 
1961 //*************************************************************************************************
1963 template< typename MT, bool SO, bool DF, typename T >
1964 struct DivTrait< LowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1965 {
1966  using Type = LowerMatrix< DivTrait_<MT,T> >;
1967 };
1969 //*************************************************************************************************
1970 
1971 
1972 
1973 
1974 //=================================================================================================
1975 //
1976 // UNARYMAPTRAIT SPECIALIZATIONS
1977 //
1978 //=================================================================================================
1979 
1980 //*************************************************************************************************
1982 template< typename MT, bool SO, bool DF >
1983 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Abs >
1984 {
1985  using Type = LowerMatrix< UnaryMapTrait_<MT,Abs> >;
1986 };
1987 
1988 template< typename MT, bool SO, bool DF >
1989 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Floor >
1990 {
1992 };
1993 
1994 template< typename MT, bool SO, bool DF >
1995 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Ceil >
1996 {
1997  using Type = LowerMatrix< UnaryMapTrait_<MT,Ceil> >;
1998 };
1999 
2000 template< typename MT, bool SO, bool DF >
2001 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Trunc >
2002 {
2004 };
2005 
2006 template< typename MT, bool SO, bool DF >
2007 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Round >
2008 {
2010 };
2011 
2012 template< typename MT, bool SO, bool DF >
2013 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Conj >
2014 {
2015  using Type = LowerMatrix< UnaryMapTrait_<MT,Conj> >;
2016 };
2017 
2018 template< typename MT, bool SO, bool DF >
2019 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Real >
2020 {
2021  using Type = LowerMatrix< UnaryMapTrait_<MT,Real> >;
2022 };
2023 
2024 template< typename MT, bool SO, bool DF >
2025 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Imag >
2026 {
2027  using Type = LowerMatrix< UnaryMapTrait_<MT,Imag> >;
2028 };
2029 
2030 template< typename MT, bool SO, bool DF >
2031 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Sqrt >
2032 {
2033  using Type = LowerMatrix< UnaryMapTrait_<MT,Sqrt> >;
2034 };
2035 
2036 template< typename MT, bool SO, bool DF >
2037 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Cbrt >
2038 {
2039  using Type = LowerMatrix< UnaryMapTrait_<MT,Cbrt> >;
2040 };
2041 
2042 template< typename MT, bool SO, bool DF >
2043 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Sin >
2044 {
2045  using Type = LowerMatrix< UnaryMapTrait_<MT,Sin> >;
2046 };
2047 
2048 template< typename MT, bool SO, bool DF >
2049 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Asin >
2050 {
2051  using Type = LowerMatrix< UnaryMapTrait_<MT,Asin> >;
2052 };
2053 
2054 template< typename MT, bool SO, bool DF >
2055 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Sinh >
2056 {
2057  using Type = LowerMatrix< UnaryMapTrait_<MT,Sinh> >;
2058 };
2059 
2060 template< typename MT, bool SO, bool DF >
2061 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Asinh >
2062 {
2064 };
2065 
2066 template< typename MT, bool SO, bool DF >
2067 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Tan >
2068 {
2069  using Type = LowerMatrix< UnaryMapTrait_<MT,Tan> >;
2070 };
2071 
2072 template< typename MT, bool SO, bool DF >
2073 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Atan >
2074 {
2075  using Type = LowerMatrix< UnaryMapTrait_<MT,Atan> >;
2076 };
2077 
2078 template< typename MT, bool SO, bool DF >
2079 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Tanh >
2080 {
2081  using Type = LowerMatrix< UnaryMapTrait_<MT,Tanh> >;
2082 };
2083 
2084 template< typename MT, bool SO, bool DF >
2085 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Atanh >
2086 {
2088 };
2089 
2090 template< typename MT, bool SO, bool DF >
2091 struct UnaryMapTrait< LowerMatrix<MT,SO,DF>, Erf >
2092 {
2093  using Type = LowerMatrix< UnaryMapTrait_<MT,Erf> >;
2094 };
2096 //*************************************************************************************************
2097 
2098 
2099 
2100 
2101 //=================================================================================================
2102 //
2103 // BINARYMAPTRAIT SPECIALIZATIONS
2104 //
2105 //=================================================================================================
2106 
2107 //*************************************************************************************************
2109 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2110 struct BinaryMapTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2>, Min >
2111 {
2113 };
2114 
2115 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2116 struct BinaryMapTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2>, Max >
2117 {
2119 };
2121 //*************************************************************************************************
2122 
2123 
2124 
2125 
2126 //=================================================================================================
2127 //
2128 // DECLSYMTRAIT SPECIALIZATIONS
2129 //
2130 //=================================================================================================
2131 
2132 //*************************************************************************************************
2134 template< typename MT, bool SO, bool DF >
2135 struct DeclSymTrait< LowerMatrix<MT,SO,DF> >
2136 {
2137  using Type = DiagonalMatrix<MT>;
2138 };
2140 //*************************************************************************************************
2141 
2142 
2143 
2144 
2145 //=================================================================================================
2146 //
2147 // DECLHERMTRAIT SPECIALIZATIONS
2148 //
2149 //=================================================================================================
2150 
2151 //*************************************************************************************************
2153 template< typename MT, bool SO, bool DF >
2154 struct DeclHermTrait< LowerMatrix<MT,SO,DF> >
2155 {
2156  using Type = HermitianMatrix<MT>;
2157 };
2159 //*************************************************************************************************
2160 
2161 
2162 
2163 
2164 //=================================================================================================
2165 //
2166 // DECLLOWTRAIT SPECIALIZATIONS
2167 //
2168 //=================================================================================================
2169 
2170 //*************************************************************************************************
2172 template< typename MT, bool SO, bool DF >
2173 struct DeclLowTrait< LowerMatrix<MT,SO,DF> >
2174 {
2175  using Type = LowerMatrix<MT,SO,DF>;
2176 };
2178 //*************************************************************************************************
2179 
2180 
2181 
2182 
2183 //=================================================================================================
2184 //
2185 // DECLUPPTRAIT SPECIALIZATIONS
2186 //
2187 //=================================================================================================
2188 
2189 //*************************************************************************************************
2191 template< typename MT, bool SO, bool DF >
2192 struct DeclUppTrait< LowerMatrix<MT,SO,DF> >
2193 {
2194  using Type = DiagonalMatrix<MT,SO,DF>;
2195 };
2197 //*************************************************************************************************
2198 
2199 
2200 
2201 
2202 //=================================================================================================
2203 //
2204 // DECLDIAGTRAIT SPECIALIZATIONS
2205 //
2206 //=================================================================================================
2207 
2208 //*************************************************************************************************
2210 template< typename MT, bool SO, bool DF >
2211 struct DeclDiagTrait< LowerMatrix<MT,SO,DF> >
2212 {
2213  using Type = DiagonalMatrix<MT,SO,DF>;
2214 };
2216 //*************************************************************************************************
2217 
2218 
2219 
2220 
2221 //=================================================================================================
2222 //
2223 // HIGHTYPE SPECIALIZATIONS
2224 //
2225 //=================================================================================================
2226 
2227 //*************************************************************************************************
2229 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2230 struct HighType< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2231 {
2233 };
2235 //*************************************************************************************************
2236 
2237 
2238 
2239 
2240 //=================================================================================================
2241 //
2242 // LOWTYPE SPECIALIZATIONS
2243 //
2244 //=================================================================================================
2245 
2246 //*************************************************************************************************
2248 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2249 struct LowType< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2250 {
2252 };
2254 //*************************************************************************************************
2255 
2256 
2257 
2258 
2259 //=================================================================================================
2260 //
2261 // SUBMATRIXTRAIT SPECIALIZATIONS
2262 //
2263 //=================================================================================================
2264 
2265 //*************************************************************************************************
2267 template< typename MT, bool SO, bool DF, size_t... CSAs >
2268 struct SubmatrixTrait< LowerMatrix<MT,SO,DF>, CSAs... >
2269 {
2270  using Type = SubmatrixTrait_<MT,CSAs...>;
2271 };
2273 //*************************************************************************************************
2274 
2275 
2276 
2277 
2278 //=================================================================================================
2279 //
2280 // ROWTRAIT SPECIALIZATIONS
2281 //
2282 //=================================================================================================
2283 
2284 //*************************************************************************************************
2286 template< typename MT, bool SO, bool DF, size_t... CRAs >
2287 struct RowTrait< LowerMatrix<MT,SO,DF>, CRAs... >
2288 {
2289  using Type = RowTrait_<MT,CRAs...>;
2290 };
2292 //*************************************************************************************************
2293 
2294 
2295 
2296 
2297 //=================================================================================================
2298 //
2299 // ROWSTRAIT SPECIALIZATIONS
2300 //
2301 //=================================================================================================
2302 
2303 //*************************************************************************************************
2305 template< typename MT, bool SO, bool DF, size_t... CRAs >
2306 struct RowsTrait< LowerMatrix<MT,SO,DF>, CRAs... >
2307 {
2308  using Type = RowsTrait_<MT,CRAs...>;
2309 };
2311 //*************************************************************************************************
2312 
2313 
2314 
2315 
2316 //=================================================================================================
2317 //
2318 // COLUMNTRAIT SPECIALIZATIONS
2319 //
2320 //=================================================================================================
2321 
2322 //*************************************************************************************************
2324 template< typename MT, bool SO, bool DF, size_t... CCAs >
2325 struct ColumnTrait< LowerMatrix<MT,SO,DF>, CCAs... >
2326 {
2327  using Type = ColumnTrait_<MT,CCAs...>;
2328 };
2330 //*************************************************************************************************
2331 
2332 
2333 
2334 
2335 //=================================================================================================
2336 //
2337 // COLUMNSTRAIT SPECIALIZATIONS
2338 //
2339 //=================================================================================================
2340 
2341 //*************************************************************************************************
2343 template< typename MT, bool SO, bool DF, size_t... CCAs >
2344 struct ColumnsTrait< LowerMatrix<MT,SO,DF>, CCAs... >
2345 {
2346  using Type = ColumnsTrait_<MT,CCAs...>;
2347 };
2349 //*************************************************************************************************
2350 
2351 
2352 
2353 
2354 //=================================================================================================
2355 //
2356 // BANDTRAIT SPECIALIZATIONS
2357 //
2358 //=================================================================================================
2359 
2360 //*************************************************************************************************
2362 template< typename MT, bool SO, bool DF, ptrdiff_t... CBAs >
2363 struct BandTrait< LowerMatrix<MT,SO,DF>, CBAs... >
2364 {
2365  using Type = BandTrait_<MT,CBAs...>;
2366 };
2368 //*************************************************************************************************
2369 
2370 } // namespace blaze
2371 
2372 #endif
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
Headerfile for the generic min algorithm.
Header file for the decldiag trait.
Header file for the Schur product trait.
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Flag for the inversion of a diagonal matrix.
Definition: InversionFlag.h:115
Flag for the inversion of a general matrix (same as byLU).
Definition: InversionFlag.h:108
Header file for the row trait.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:109
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Base template for the DeclUppTrait class.
Definition: DeclUppTrait.h:113
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Matrix adapter for lower triangular matrices.
Definition: BaseTemplate.h:553
Header file for the dense matrix inversion flags.
Base template for the SchurTrait class.
Definition: SchurTrait.h:112
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:364
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1903
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:87
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:291
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:145
Constraint on the data type.
typename RowTrait< MT, CRAs... >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:145
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
Header file for the band trait.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1827
Constraint on the data type.
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Header file for the IsSquare type trait.
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Base template for the RowTrait class.
Definition: RowTrait.h:109
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
Constraint on the data type.
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:144
Header file for the LowType type trait.
Flag for the inversion of a lower triangular matrix.
Definition: InversionFlag.h:111
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the unary map trait.
typename ColumnsTrait< MT, CCAs... >::Type ColumnsTrait_
Auxiliary alias declaration for the ColumnsTrait type trait.The ColumnsTrait_ alias declaration provi...
Definition: ColumnsTrait.h:145
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Header file for the IsShrinkable type trait.
Header file for all forward declarations of the math module.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Header file for the decllow trait.
void lu(const DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO1 > &L, DenseMatrix< MT3, SO1 > &U, Matrix< MT4, SO2 > &P)
LU decomposition of the given dense matrix.
Definition: LU.h:221
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
Header file for the IsLower type trait.
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:506
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:113
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:714
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:430
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
typename BandTrait< MT, CBAs... >::Type BandTrait_
Auxiliary alias declaration for the BandTrait type trait.The BandTrait_ alias declaration provides a ...
Definition: BandTrait.h:145
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:134
typename RowsTrait< MT, CRAs... >::Type RowsTrait_
Auxiliary alias declaration for the RowsTrait type trait.The RowsTrait_ alias declaration provides a ...
Definition: RowsTrait.h:145
Compile time check for shrinkable data types.This type trait tests whether the given data type is a s...
Definition: IsShrinkable.h:75
Constraint on the data type.
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the declupp trait.
#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
Header file for the binary map trait.
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:119
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:113
Base template for the MultTrait class.
Definition: MultTrait.h:119
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
Header file for the IsContiguous type trait.
Header file for the columns trait.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
#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
Header file for the declsym trait.
Matrix adapter for Hermitian matrices.
Definition: BaseTemplate.h:611
Header file for the column trait.
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:272
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a BLAS compatible data type (i...
Definition: BLASCompatible.h:61
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
Base template for the DivTrait class.
Definition: DivTrait.h:120
Header file for the rows trait.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:490
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:113
Removal of top level adaptor types.In case the given type is an adaptor type (SymmetricMatrix, LowerMatrix, UpperMatrix, ...), the RemoveAdaptor type trait removes the adaptor and extracts the contained general matrix type. Else the given type is returned as is. Note that cv-qualifiers are preserved.
Definition: RemoveAdaptor.h:76
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:177
Header file for the implementation of the base template of the LowerMatrix.
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:291
LowerMatrix specialization for sparse matrices.
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
Header file for the isDivisor shim.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
#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
Base template for the SubTrait class.
Definition: SubTrait.h:119
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:560
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:113
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
Header file for the Size type trait.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:291
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#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
LowerMatrix specialization for dense matrices.
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.
Base template for the BandTrait class.
Definition: BandTrait.h:109