Blaze  3.6
StrictlyLowerMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
47 #include <blaze/math/Forward.h>
92 #include <blaze/util/Assert.h>
93 #include <blaze/util/EnableIf.h>
95 #include <blaze/util/MaybeUnused.h>
97 
98 
99 namespace blaze {
100 
101 //=================================================================================================
102 //
103 // STRICTLYLOWERMATRIX OPERATORS
104 //
105 //=================================================================================================
106 
107 //*************************************************************************************************
110 template< typename MT, bool SO, bool DF >
111 void reset( StrictlyLowerMatrix<MT,SO,DF>& m );
112 
113 template< typename MT, bool SO, bool DF >
114 void reset( StrictlyLowerMatrix<MT,SO,DF>& m, size_t i );
115 
116 template< typename MT, bool SO, bool DF >
117 void clear( StrictlyLowerMatrix<MT,SO,DF>& m );
118 
119 template< bool RF, typename MT, bool SO, bool DF >
120 bool isDefault( const StrictlyLowerMatrix<MT,SO,DF>& m );
121 
122 template< typename MT, bool SO, bool DF >
123 bool isIntact( const StrictlyLowerMatrix<MT,SO,DF>& m );
124 
125 template< typename MT, bool SO, bool DF >
126 void swap( StrictlyLowerMatrix<MT,SO,DF>& a, StrictlyLowerMatrix<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
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( StrictlyLowerMatrix<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
182 {
183  m.clear();
184 }
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
199 template< bool RF // Relaxation flag
200  , typename MT // Type of the adapted matrix
201  , bool SO // Storage order of the adapted matrix
202  , bool DF > // Density flag
203 inline bool isDefault_backend( const StrictlyLowerMatrix<MT,SO,DF>& m, TrueType )
204 {
205  return ( m.rows() == 0UL );
206 }
208 //*************************************************************************************************
209 
210 
211 //*************************************************************************************************
222 template< bool RF // Relaxation flag
223  , typename MT // Type of the adapted matrix
224  , bool SO // Storage order of the adapted matrix
225  , bool DF > // Density flag
226 inline bool isDefault_backend( const StrictlyLowerMatrix<MT,SO,DF>& m, FalseType )
227 {
228  if( SO ) {
229  for( size_t j=0UL; j<m.columns(); ++j ) {
230  for( size_t i=j+1UL; i<m.rows(); ++i ) {
231  if( !isDefault<RF>( m(i,j) ) )
232  return false;
233  }
234  }
235  }
236  else {
237  for( size_t i=1UL; i<m.rows(); ++i ) {
238  for( size_t j=0UL; j<i; ++j ) {
239  if( !isDefault<RF>( m(i,j) ) )
240  return false;
241  }
242  }
243  }
244 
245  return true;
246 }
248 //*************************************************************************************************
249 
250 
251 //*************************************************************************************************
277 template< bool RF // Relaxation flag
278  , typename MT // Type of the adapted matrix
279  , bool SO // Storage order of the adapted matrix
280  , bool DF > // Density flag
282 {
283  return isDefault_backend<RF>( m, typename IsResizable<MT>::Type() );
284 }
285 //*************************************************************************************************
286 
287 
288 //*************************************************************************************************
309 template< typename MT // Type of the adapted matrix
310  , bool SO // Storage order of the adapted matrix
311  , bool DF > // Density flag
313 {
314  return m.isIntact();
315 }
316 //*************************************************************************************************
317 
318 
319 //*************************************************************************************************
327 template< typename MT // Type of the adapted matrix
328  , bool SO // Storage order of the adapted matrix
329  , bool DF > // Density flag
331 {
332  a.swap( b );
333 }
334 //*************************************************************************************************
335 
336 
337 //*************************************************************************************************
353 template< typename MT // Type of the adapted matrix
354  , bool SO // Storage order of the adapted matrix
355  , bool DF // Density flag
356  , typename ET > // Type of the element
357 inline bool trySet( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
358 {
359  BLAZE_INTERNAL_ASSERT( i < (~mat).rows(), "Invalid row access index" );
360  BLAZE_INTERNAL_ASSERT( j < (~mat).columns(), "Invalid column access index" );
361 
362  MAYBE_UNUSED( mat );
363 
364  return ( i > j || isDefault( value ) );
365 }
367 //*************************************************************************************************
368 
369 
370 //*************************************************************************************************
388 template< typename MT // Type of the adapted matrix
389  , bool SO // Storage order of the adapted matrix
390  , bool DF // Density flag
391  , typename ET > // Type of the element
393  trySet( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
394 {
395  BLAZE_INTERNAL_ASSERT( row <= (~mat).rows(), "Invalid row access index" );
396  BLAZE_INTERNAL_ASSERT( column <= (~mat).columns(), "Invalid column access index" );
397  BLAZE_INTERNAL_ASSERT( row + m <= (~mat).rows(), "Invalid number of rows" );
398  BLAZE_INTERNAL_ASSERT( column + n <= (~mat).columns(), "Invalid number of columns" );
399 
400  MAYBE_UNUSED( mat );
401 
402  return ( m == 0UL ) ||
403  ( n == 0UL ) ||
404  ( row >= column + n ) ||
405  isDefault( value );
406 }
408 //*************************************************************************************************
409 
410 
411 //*************************************************************************************************
427 template< typename MT // Type of the adapted matrix
428  , bool SO // Storage order of the adapted matrix
429  , bool DF // Density flag
430  , typename ET > // Type of the element
431 inline bool tryAdd( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
432 {
433  return trySet( mat, i, j, value );
434 }
436 //*************************************************************************************************
437 
438 
439 //*************************************************************************************************
457 template< typename MT // Type of the adapted matrix
458  , bool SO // Storage order of the adapted matrix
459  , bool DF // Density flag
460  , typename ET > // Type of the element
462  tryAdd( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
463 {
464  return trySet( mat, row, column, m, n, value );
465 }
467 //*************************************************************************************************
468 
469 
470 //*************************************************************************************************
487 template< typename MT // Type of the adapted matrix
488  , bool SO // Storage order of the adapted matrix
489  , bool DF // Density flag
490  , typename ET > // Type of the element
491 inline bool trySub( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
492 {
493  return trySet( mat, i, j, value );
494 }
496 //*************************************************************************************************
497 
498 
499 //*************************************************************************************************
518 template< typename MT // Type of the adapted matrix
519  , bool SO // Storage order of the adapted matrix
520  , bool DF // Density flag
521  , typename ET > // Type of the element
523  trySub( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
524 {
525  return trySet( mat, row, column, m, n, value );
526 }
528 //*************************************************************************************************
529 
530 
531 //*************************************************************************************************
547 template< typename MT // Type of the adapted matrix
548  , bool SO // Storage order of the adapted matrix
549  , bool DF // Density flag
550  , typename ET > // Type of the element
551 inline bool tryBitor( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
552 {
553  return trySet( mat, i, j, value );
554 }
556 //*************************************************************************************************
557 
558 
559 //*************************************************************************************************
577 template< typename MT // Type of the adapted matrix
578  , bool SO // Storage order of the adapted matrix
579  , bool DF // Density flag
580  , typename ET > // Type of the element
582  tryBitor( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
583 {
584  return trySet( mat, row, column, m, n, value );
585 }
587 //*************************************************************************************************
588 
589 
590 //*************************************************************************************************
606 template< typename MT // Type of the adapted matrix
607  , bool SO // Storage order of the adapted matrix
608  , bool DF // Density flag
609  , typename ET > // Type of the element
610 inline bool tryBitxor( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
611 {
612  return tryAdd( mat, i, j, value );
613 }
615 //*************************************************************************************************
616 
617 
618 //*************************************************************************************************
636 template< typename MT // Type of the adapted matrix
637  , bool SO // Storage order of the adapted matrix
638  , bool DF // Density flag
639  , typename ET > // Type of the element
641  tryBitxor( const StrictlyLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
642 {
643  return tryAdd( mat, row, column, m, n, value );
644 }
646 //*************************************************************************************************
647 
648 
649 //*************************************************************************************************
666 template< typename MT // Type of the adapted matrix
667  , bool SO // Storage order of the adapted matrix
668  , bool DF // Density flag
669  , typename VT > // Type of the right-hand side dense vector
670 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
671  const DenseVector<VT,false>& rhs, size_t row, size_t column )
672 {
674 
675  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
676  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
677  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
678 
679  MAYBE_UNUSED( lhs );
680 
681  if( column < row )
682  return true;
683 
684  const size_t iend( min( column - row + 1UL, (~rhs).size() ) );
685 
686  for( size_t i=0UL; i<iend; ++i ) {
687  if( !isDefault( (~rhs)[i] ) )
688  return false;
689  }
690 
691  return true;
692 }
694 //*************************************************************************************************
695 
696 
697 //*************************************************************************************************
714 template< typename MT // Type of the adapted matrix
715  , bool SO // Storage order of the adapted matrix
716  , bool DF // Density flag
717  , typename VT > // Type of the right-hand side dense vector
718 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
719  const DenseVector<VT,true>& rhs, size_t row, size_t column )
720 {
722 
723  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
724  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
725  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
726 
727  MAYBE_UNUSED( lhs );
728 
729  const size_t ibegin( ( row <= column )?( 0UL ):( row - column ) );
730 
731  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
732  if( !isDefault( (~rhs)[i] ) )
733  return false;
734  }
735 
736  return true;
737 }
739 //*************************************************************************************************
740 
741 
742 //*************************************************************************************************
760 template< typename MT // Type of the adapted matrix
761  , bool SO // Storage order of the adapted matrix
762  , bool DF // Density flag
763  , typename VT // Type of the right-hand side dense vector
764  , bool TF > // Transpose flag of the right-hand side dense vector
765 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const DenseVector<VT,TF>& rhs,
766  ptrdiff_t band, size_t row, size_t column )
767 {
769 
770  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
771  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
772  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
773  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
774 
775  MAYBE_UNUSED( lhs, row, column );
776 
777  if( band >= 0L ) {
778  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
779  if( !isDefault( (~rhs)[i] ) )
780  return false;
781  }
782  }
783 
784  return true;
785 }
787 //*************************************************************************************************
788 
789 
790 //*************************************************************************************************
807 template< typename MT // Type of the adapted matrix
808  , bool SO // Storage order of the adapted matrix
809  , bool DF // Density flag
810  , typename VT > // Type of the right-hand side sparse vector
811 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
812  const SparseVector<VT,false>& rhs, size_t row, size_t column )
813 {
815 
816  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
817  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
818  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
819 
820  MAYBE_UNUSED( lhs );
821 
822  if( column < row )
823  return true;
824 
825  const auto last( (~rhs).lowerBound( column - row + 1UL ) );
826 
827  for( auto element=(~rhs).begin(); element!=last; ++element ) {
828  if( !isDefault( element->value() ) )
829  return false;
830  }
831 
832  return true;
833 }
835 //*************************************************************************************************
836 
837 
838 //*************************************************************************************************
855 template< typename MT // Type of the adapted matrix
856  , bool SO // Storage order of the adapted matrix
857  , bool DF // Density flag
858  , typename VT > // Type of the right-hand side sparse vector
859 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
860  const SparseVector<VT,true>& rhs, size_t row, size_t column )
861 {
863 
864  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
865  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
866  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
867 
868  MAYBE_UNUSED( lhs );
869 
870  const auto last( (~rhs).end() );
871  auto element( (~rhs).lowerBound( ( row <= column )?( 0UL ):( row - column ) ) );
872 
873  for( ; element!=last; ++element ) {
874  if( !isDefault( element->value() ) )
875  return false;
876  }
877 
878  return true;
879 }
881 //*************************************************************************************************
882 
883 
884 //*************************************************************************************************
902 template< typename MT // Type of the adapted matrix
903  , bool SO // Storage order of the adapted matrix
904  , bool DF // Density flag
905  , typename VT // Type of the right-hand side sparse vector
906  , bool TF > // Transpose flag of the right-hand side sparse vector
907 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const SparseVector<VT,TF>& rhs,
908  ptrdiff_t band, size_t row, size_t column )
909 {
911 
912  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
913  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
914  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
915  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
916 
917  MAYBE_UNUSED( lhs, row, column );
918 
919  if( band >= 0L ) {
920  for( const auto& element : ~rhs ) {
921  if( !isDefault( element.value() ) )
922  return false;
923  }
924  }
925 
926  return true;
927 }
929 //*************************************************************************************************
930 
931 
932 //*************************************************************************************************
949 template< typename MT1 // Type of the adapted matrix
950  , bool SO // Storage order of the adapted matrix
951  , bool DF // Density flag
952  , typename MT2 > // Type of the right-hand side dense matrix
953 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
954  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
955 {
957 
958  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
959  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
960  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
961  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
962 
963  MAYBE_UNUSED( lhs );
964 
965  const size_t M( (~rhs).rows() );
966  const size_t N( (~rhs).columns() );
967 
968  if( row >= column + N )
969  return true;
970 
971  const size_t iend( min( column + N - row, M ) );
972 
973  for( size_t i=0UL; i<iend; ++i )
974  {
975  const bool containsDiagonal( row + i >= column );
976  const size_t jbegin( ( containsDiagonal )?( row + i - column ):( 0UL ) );
977 
978  for( size_t j=jbegin; j<N; ++j ) {
979  if( !isDefault( (~rhs)(i,j) ) )
980  return false;
981  }
982  }
983 
984  return true;
985 }
987 //*************************************************************************************************
988 
989 
990 //*************************************************************************************************
1007 template< typename MT1 // Type of the adapted matrix
1008  , bool SO // Storage order of the adapted matrix
1009  , bool DF // Density flag
1010  , typename MT2 > // Type of the right-hand side dense matrix
1011 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
1012  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
1013 {
1015 
1016  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1017  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1018  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1019  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1020 
1021  MAYBE_UNUSED( lhs );
1022 
1023  const size_t M( (~rhs).rows() );
1024  const size_t N( (~rhs).columns() );
1025 
1026  if( row >= column + N )
1027  return true;
1028 
1029  const size_t jbegin( ( row <= column )?( 0UL ):( row - column ) );
1030 
1031  for( size_t j=jbegin; j<N; ++j )
1032  {
1033  const size_t iend( min( column + j - row + 1UL, M ) );
1034 
1035  for( size_t i=0UL; i<iend; ++i ) {
1036  if( !isDefault( (~rhs)(i,j) ) )
1037  return false;
1038  }
1039  }
1040 
1041  return true;
1042 }
1044 //*************************************************************************************************
1045 
1046 
1047 //*************************************************************************************************
1064 template< typename MT1 // Type of the adapted matrix
1065  , bool SO // Storage order of the adapted matrix
1066  , bool DF // Density flag
1067  , typename MT2 > // Type of the right-hand side sparse matrix
1068 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
1069  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
1070 {
1072 
1073  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1074  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1075  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1076  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1077 
1078  MAYBE_UNUSED( lhs );
1079 
1080  const size_t M( (~rhs).rows() );
1081  const size_t N( (~rhs).columns() );
1082 
1083  if( row >= column + N )
1084  return true;
1085 
1086  const size_t iend( min( column + N - row, M ) );
1087 
1088  for( size_t i=0UL; i<iend; ++i )
1089  {
1090  const bool containsDiagonal( row + i >= column );
1091  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1092 
1093  const auto last( (~rhs).end(i) );
1094  auto element( (~rhs).lowerBound( i, index ) );
1095 
1096  for( ; element!=last; ++element ) {
1097  if( !isDefault( element->value() ) )
1098  return false;
1099  }
1100  }
1101 
1102  return true;
1103 }
1105 //*************************************************************************************************
1106 
1107 
1108 //*************************************************************************************************
1125 template< typename MT1 // Type of the adapted matrix
1126  , bool SO // Storage order of the adapted matrix
1127  , bool DF // Density flag
1128  , typename MT2 > // Type of the right-hand side sparse matrix
1129 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
1130  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
1131 {
1133 
1134  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1135  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1136  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1137  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1138 
1139  MAYBE_UNUSED( lhs );
1140 
1141  const size_t M( (~rhs).rows() );
1142  const size_t N( (~rhs).columns() );
1143 
1144  if( row >= column + N )
1145  return true;
1146 
1147  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
1148 
1149  for( size_t j=jbegin; j<N; ++j )
1150  {
1151  const size_t index( column + j - row + 1UL );
1152  const auto last( (~rhs).lowerBound( min( index, M ), j ) );
1153 
1154  for( auto element=(~rhs).begin(j); element!=last; ++element ) {
1155  if( !isDefault( element->value() ) )
1156  return false;
1157  }
1158  }
1159 
1160  return true;
1161 }
1163 //*************************************************************************************************
1164 
1165 
1166 //*************************************************************************************************
1183 template< typename MT // Type of the adapted matrix
1184  , bool SO // Storage order of the adapted matrix
1185  , bool DF // Density flag
1186  , typename VT // Type of the right-hand side vector
1187  , bool TF > // Transpose flag of the right-hand side vector
1188 inline bool tryAddAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
1189  const Vector<VT,TF>& rhs, size_t row, size_t column )
1190 {
1191  return tryAssign( lhs, ~rhs, row, column );
1192 }
1194 //*************************************************************************************************
1195 
1196 
1197 //*************************************************************************************************
1215 template< typename MT // Type of the adapted matrix
1216  , bool SO // Storage order of the adapted matrix
1217  , bool DF // Density flag
1218  , typename VT // Type of the right-hand side vector
1219  , bool TF > // Transpose flag of the right-hand side vector
1220 inline bool tryAddAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1221  ptrdiff_t band, size_t row, size_t column )
1222 {
1223  return tryAssign( lhs, ~rhs, band, row, column );
1224 }
1226 //*************************************************************************************************
1227 
1228 
1229 //*************************************************************************************************
1246 template< typename MT1 // Type of the adapted matrix
1247  , bool SO1 // Storage order of the adapted matrix
1248  , bool DF // Density flag
1249  , typename MT2 // Type of the right-hand side matrix
1250  , bool SO2 > // Storage order of the right-hand side matrix
1251 inline bool tryAddAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
1252  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1253 {
1254  return tryAssign( lhs, ~rhs, row, column );
1255 }
1257 //*************************************************************************************************
1258 
1259 
1260 //*************************************************************************************************
1277 template< typename MT // Type of the adapted matrix
1278  , bool SO // Storage order of the adapted matrix
1279  , bool DF // Density flag
1280  , typename VT // Type of the right-hand side vector
1281  , bool TF > // Transpose flag of the right-hand side vector
1282 inline bool trySubAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
1283  const Vector<VT,TF>& rhs, size_t row, size_t column )
1284 {
1285  return tryAssign( lhs, ~rhs, row, column );
1286 }
1288 //*************************************************************************************************
1289 
1290 
1291 //*************************************************************************************************
1309 template< typename MT // Type of the adapted matrix
1310  , bool SO // Storage order of the adapted matrix
1311  , bool DF // Density flag
1312  , typename VT // Type of the right-hand side vector
1313  , bool TF > // Transpose flag of the right-hand side vector
1314 inline bool trySubAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1315  ptrdiff_t band, size_t row, size_t column )
1316 {
1317  return tryAssign( lhs, ~rhs, band, row, column );
1318 }
1320 //*************************************************************************************************
1321 
1322 
1323 //*************************************************************************************************
1340 template< typename MT1 // Type of the adapted matrix
1341  , bool SO1 // Storage order of the adapted matrix
1342  , bool DF // Density flag
1343  , typename MT2 // Type of the right-hand side matrix
1344  , bool SO2 > // Storage order of the right-hand side matrix
1345 inline bool trySubAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
1346  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1347 {
1348  return tryAssign( lhs, ~rhs, row, column );
1349 }
1351 //*************************************************************************************************
1352 
1353 
1354 //*************************************************************************************************
1371 template< typename MT // Type of the adapted matrix
1372  , bool SO // Storage order of the adapted matrix
1373  , bool DF // Density flag
1374  , typename VT // Type of the right-hand side vector
1375  , bool TF > // Transpose flag of the right-hand side vector
1376 inline bool tryBitorAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
1377  const Vector<VT,TF>& rhs, size_t row, size_t column )
1378 {
1379  return tryAssign( lhs, ~rhs, row, column );
1380 }
1382 //*************************************************************************************************
1383 
1384 
1385 //*************************************************************************************************
1402 template< typename MT // Type of the adapted matrix
1403  , bool SO // Storage order of the adapted matrix
1404  , bool DF // Density flag
1405  , typename VT // Type of the right-hand side vector
1406  , bool TF > // Transpose flag of the right-hand side vector
1407 inline bool tryBitorAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1408  ptrdiff_t band, size_t row, size_t column )
1409 {
1410  return tryAssign( lhs, ~rhs, band, row, column );
1411 }
1413 //*************************************************************************************************
1414 
1415 
1416 //*************************************************************************************************
1433 template< typename MT1 // Type of the adapted matrix
1434  , bool SO1 // Storage order of the adapted matrix
1435  , bool DF // Density flag
1436  , typename MT2 // Type of the right-hand side matrix
1437  , bool SO2 > // Storage order of the right-hand side matrix
1438 inline bool tryBitorAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
1439  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1440 {
1441  return tryAssign( lhs, ~rhs, row, column );
1442 }
1444 //*************************************************************************************************
1445 
1446 
1447 //*************************************************************************************************
1464 template< typename MT // Type of the adapted matrix
1465  , bool SO // Storage order of the adapted matrix
1466  , bool DF // Density flag
1467  , typename VT // Type of the right-hand side vector
1468  , bool TF > // Transpose flag of the right-hand side vector
1469 inline bool tryBitxorAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
1470  const Vector<VT,TF>& rhs, size_t row, size_t column )
1471 {
1472  return tryAssign( lhs, ~rhs, row, column );
1473 }
1475 //*************************************************************************************************
1476 
1477 
1478 //*************************************************************************************************
1495 template< typename MT // Type of the adapted matrix
1496  , bool SO // Storage order of the adapted matrix
1497  , bool DF // Density flag
1498  , typename VT // Type of the right-hand side vector
1499  , bool TF > // Transpose flag of the right-hand side vector
1500 inline bool tryBitxorAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1501  ptrdiff_t band, size_t row, size_t column )
1502 {
1503  return tryAssign( lhs, ~rhs, band, row, column );
1504 }
1506 //*************************************************************************************************
1507 
1508 
1509 //*************************************************************************************************
1526 template< typename MT1 // Type of the adapted matrix
1527  , bool SO1 // Storage order of the adapted matrix
1528  , bool DF // Density flag
1529  , typename MT2 // Type of the right-hand side matrix
1530  , bool SO2 > // Storage order of the right-hand side matrix
1531 inline bool tryBitxorAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
1532  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1533 {
1534  return tryAssign( lhs, ~rhs, row, column );
1535 }
1537 //*************************************************************************************************
1538 
1539 
1540 //*************************************************************************************************
1554 template< typename MT // Type of the adapted matrix
1555  , bool SO // Storage order of the adapted matrix
1556  , bool DF > // Density flag
1557 inline MT& derestrict( StrictlyLowerMatrix<MT,SO,DF>& m )
1558 {
1559  return m.matrix_;
1560 }
1562 //*************************************************************************************************
1563 
1564 
1565 
1566 
1567 //=================================================================================================
1568 //
1569 // SIZE SPECIALIZATIONS
1570 //
1571 //=================================================================================================
1572 
1573 //*************************************************************************************************
1575 template< typename MT, bool SO, bool DF >
1576 struct Size< StrictlyLowerMatrix<MT,SO,DF>, 0UL >
1577  : public Size<MT,0UL>
1578 {};
1579 
1580 template< typename MT, bool SO, bool DF >
1581 struct Size< StrictlyLowerMatrix<MT,SO,DF>, 1UL >
1582  : public Size<MT,1UL>
1583 {};
1585 //*************************************************************************************************
1586 
1587 
1588 
1589 
1590 //=================================================================================================
1591 //
1592 // MAXSIZE SPECIALIZATIONS
1593 //
1594 //=================================================================================================
1595 
1596 //*************************************************************************************************
1598 template< typename MT, bool SO, bool DF >
1599 struct MaxSize< StrictlyLowerMatrix<MT,SO,DF>, 0UL >
1600  : public MaxSize<MT,0UL>
1601 {};
1602 
1603 template< typename MT, bool SO, bool DF >
1604 struct MaxSize< StrictlyLowerMatrix<MT,SO,DF>, 1UL >
1605  : public MaxSize<MT,1UL>
1606 {};
1608 //*************************************************************************************************
1609 
1610 
1611 
1612 
1613 //=================================================================================================
1614 //
1615 // ISSQUARE SPECIALIZATIONS
1616 //
1617 //=================================================================================================
1618 
1619 //*************************************************************************************************
1621 template< typename MT, bool SO, bool DF >
1622 struct IsSquare< StrictlyLowerMatrix<MT,SO,DF> >
1623  : public TrueType
1624 {};
1626 //*************************************************************************************************
1627 
1628 
1629 
1630 
1631 //=================================================================================================
1632 //
1633 // ISUNIFORM SPECIALIZATIONS
1634 //
1635 //=================================================================================================
1636 
1637 //*************************************************************************************************
1639 template< typename MT, bool SO, bool DF >
1640 struct IsUniform< StrictlyLowerMatrix<MT,SO,DF> >
1641  : public IsUniform<MT>
1642 {};
1644 //*************************************************************************************************
1645 
1646 
1647 
1648 
1649 //=================================================================================================
1650 //
1651 // ISSYMMETRIC SPECIALIZATIONS
1652 //
1653 //=================================================================================================
1654 
1655 //*************************************************************************************************
1657 template< typename MT, bool SO, bool DF >
1658 struct IsSymmetric< StrictlyLowerMatrix<MT,SO,DF> >
1659  : public IsUniform<MT>
1660 {};
1662 //*************************************************************************************************
1663 
1664 
1665 
1666 
1667 //=================================================================================================
1668 //
1669 // ISHERMITIAN SPECIALIZATIONS
1670 //
1671 //=================================================================================================
1672 
1673 //*************************************************************************************************
1675 template< typename MT, bool SO, bool DF >
1676 struct IsHermitian< StrictlyLowerMatrix<MT,SO,DF> >
1677  : public IsUniform<MT>
1678 {};
1680 //*************************************************************************************************
1681 
1682 
1683 
1684 
1685 //=================================================================================================
1686 //
1687 // ISSTRICTLYLOWER SPECIALIZATIONS
1688 //
1689 //=================================================================================================
1690 
1691 //*************************************************************************************************
1693 template< typename MT, bool SO, bool DF >
1694 struct IsStrictlyLower< StrictlyLowerMatrix<MT,SO,DF> >
1695  : public TrueType
1696 {};
1698 //*************************************************************************************************
1699 
1700 
1701 
1702 
1703 //=================================================================================================
1704 //
1705 // ISSTRICTLYUPPER SPECIALIZATIONS
1706 //
1707 //=================================================================================================
1708 
1709 //*************************************************************************************************
1711 template< typename MT, bool SO, bool DF >
1712 struct IsStrictlyUpper< StrictlyLowerMatrix<MT,SO,DF> >
1713  : public IsUniform<MT>
1714 {};
1716 //*************************************************************************************************
1717 
1718 
1719 
1720 
1721 //=================================================================================================
1722 //
1723 // ISADAPTOR SPECIALIZATIONS
1724 //
1725 //=================================================================================================
1726 
1727 //*************************************************************************************************
1729 template< typename MT, bool SO, bool DF >
1730 struct IsAdaptor< StrictlyLowerMatrix<MT,SO,DF> >
1731  : public TrueType
1732 {};
1734 //*************************************************************************************************
1735 
1736 
1737 
1738 
1739 //=================================================================================================
1740 //
1741 // ISRESTRICTED SPECIALIZATIONS
1742 //
1743 //=================================================================================================
1744 
1745 //*************************************************************************************************
1747 template< typename MT, bool SO, bool DF >
1748 struct IsRestricted< StrictlyLowerMatrix<MT,SO,DF> >
1749  : public TrueType
1750 {};
1752 //*************************************************************************************************
1753 
1754 
1755 
1756 
1757 //=================================================================================================
1758 //
1759 // HASCONSTDATAACCESS SPECIALIZATIONS
1760 //
1761 //=================================================================================================
1762 
1763 //*************************************************************************************************
1765 template< typename MT, bool SO >
1766 struct HasConstDataAccess< StrictlyLowerMatrix<MT,SO,true> >
1767  : public TrueType
1768 {};
1770 //*************************************************************************************************
1771 
1772 
1773 
1774 
1775 //=================================================================================================
1776 //
1777 // ISALIGNED SPECIALIZATIONS
1778 //
1779 //=================================================================================================
1780 
1781 //*************************************************************************************************
1783 template< typename MT, bool SO, bool DF >
1784 struct IsAligned< StrictlyLowerMatrix<MT,SO,DF> >
1785  : public IsAligned<MT>
1786 {};
1788 //*************************************************************************************************
1789 
1790 
1791 
1792 
1793 //=================================================================================================
1794 //
1795 // ISCONTIGUOUS SPECIALIZATIONS
1796 //
1797 //=================================================================================================
1798 
1799 //*************************************************************************************************
1801 template< typename MT, bool SO, bool DF >
1802 struct IsContiguous< StrictlyLowerMatrix<MT,SO,DF> >
1803  : public IsContiguous<MT>
1804 {};
1806 //*************************************************************************************************
1807 
1808 
1809 
1810 
1811 //=================================================================================================
1812 //
1813 // ISPADDED SPECIALIZATIONS
1814 //
1815 //=================================================================================================
1816 
1817 //*************************************************************************************************
1819 template< typename MT, bool SO, bool DF >
1820 struct IsPadded< StrictlyLowerMatrix<MT,SO,DF> >
1821  : public IsPadded<MT>
1822 {};
1824 //*************************************************************************************************
1825 
1826 
1827 
1828 
1829 //=================================================================================================
1830 //
1831 // ISRESIZABLE SPECIALIZATIONS
1832 //
1833 //=================================================================================================
1834 
1835 //*************************************************************************************************
1837 template< typename MT, bool SO, bool DF >
1838 struct IsResizable< StrictlyLowerMatrix<MT,SO,DF> >
1839  : public IsResizable<MT>
1840 {};
1842 //*************************************************************************************************
1843 
1844 
1845 
1846 
1847 //=================================================================================================
1848 //
1849 // ISSHRINKABLE SPECIALIZATIONS
1850 //
1851 //=================================================================================================
1852 
1853 //*************************************************************************************************
1855 template< typename MT, bool SO, bool DF >
1856 struct IsShrinkable< StrictlyLowerMatrix<MT,SO,DF> >
1857  : public IsShrinkable<MT>
1858 {};
1860 //*************************************************************************************************
1861 
1862 
1863 
1864 
1865 //=================================================================================================
1866 //
1867 // REMOVEADAPTOR SPECIALIZATIONS
1868 //
1869 //=================================================================================================
1870 
1871 //*************************************************************************************************
1873 template< typename MT, bool SO, bool DF >
1874 struct RemoveAdaptor< StrictlyLowerMatrix<MT,SO,DF> >
1875 {
1876  using Type = MT;
1877 };
1879 //*************************************************************************************************
1880 
1881 
1882 
1883 
1884 //=================================================================================================
1885 //
1886 // ADDTRAIT SPECIALIZATIONS
1887 //
1888 //=================================================================================================
1889 
1890 //*************************************************************************************************
1892 template< typename T1, typename T2 >
1893 struct AddTraitEval1< T1, T2
1894  , EnableIf_t< IsMatrix_v<T1> &&
1895  IsMatrix_v<T2> &&
1896  ( IsStrictlyLower_v<T1> && IsStrictlyLower_v<T2> ) &&
1897  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1898 {
1899  using Type = StrictlyLowerMatrix< typename AddTraitEval2<T1,T2>::Type >;
1900 };
1902 //*************************************************************************************************
1903 
1904 
1905 
1906 
1907 //=================================================================================================
1908 //
1909 // SUBTRAIT SPECIALIZATIONS
1910 //
1911 //=================================================================================================
1912 
1913 //*************************************************************************************************
1915 template< typename T1, typename T2 >
1916 struct SubTraitEval1< T1, T2
1917  , EnableIf_t< IsMatrix_v<T1> &&
1918  IsMatrix_v<T2> &&
1919  ( ( IsUniLower_v<T1> && IsUniLower_v<T2> ) ||
1920  ( IsStrictlyLower_v<T1> && IsStrictlyLower_v<T2> ) ) &&
1921  !( IsIdentity_v<T1> && IsIdentity_v<T2> ) &&
1922  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1923 {
1924  using Type = StrictlyLowerMatrix< typename SubTraitEval2<T1,T2>::Type >;
1925 };
1927 //*************************************************************************************************
1928 
1929 
1930 
1931 
1932 //=================================================================================================
1933 //
1934 // SCHURTRAIT SPECIALIZATIONS
1935 //
1936 //=================================================================================================
1937 
1938 //*************************************************************************************************
1940 template< typename T1, typename T2 >
1941 struct SchurTraitEval1< T1, T2
1942  , EnableIf_t< IsMatrix_v<T1> &&
1943  IsMatrix_v<T2> &&
1944  ( ( IsStrictlyLower_v<T1> && !IsUpper_v<T2> ) ||
1945  ( !IsUpper_v<T1> && IsStrictlyLower_v<T2> ) ) &&
1946  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1947 {
1948  using Type = StrictlyLowerMatrix< typename SchurTraitEval2<T1,T2>::Type >;
1949 };
1951 //*************************************************************************************************
1952 
1953 
1954 
1955 
1956 //=================================================================================================
1957 //
1958 // MULTTRAIT SPECIALIZATIONS
1959 //
1960 //=================================================================================================
1961 
1962 //*************************************************************************************************
1964 template< typename T1, typename T2 >
1965 struct MultTraitEval1< T1, T2
1966  , EnableIf_t< IsMatrix_v<T1> &&
1967  IsNumeric_v<T2> &&
1968  ( IsStrictlyLower_v<T1> && !IsUniform_v<T1> ) > >
1969 {
1970  using Type = StrictlyLowerMatrix< typename MultTraitEval2<T1,T2>::Type >;
1971 };
1972 
1973 template< typename T1, typename T2 >
1974 struct MultTraitEval1< T1, T2
1975  , EnableIf_t< IsNumeric_v<T1> &&
1976  IsMatrix_v<T2> &&
1977  ( IsStrictlyLower_v<T2> && !IsUniform_v<T2> ) > >
1978 {
1979  using Type = StrictlyLowerMatrix< typename MultTraitEval2<T1,T2>::Type >;
1980 };
1981 
1982 template< typename T1, typename T2 >
1983 struct MultTraitEval1< T1, T2
1984  , EnableIf_t< IsMatrix_v<T1> &&
1985  IsMatrix_v<T2> &&
1986  ( ( IsStrictlyLower_v<T1> && IsLower_v<T2> ) ||
1987  ( IsLower_v<T1> && IsStrictlyLower_v<T2> ) ) &&
1988  !( IsIdentity_v<T1> || IsIdentity_v<T2> ) &&
1989  !( IsZero_v<T1> || IsZero_v<T2> ) > >
1990 {
1991  using Type = StrictlyLowerMatrix< typename MultTraitEval2<T1,T2>::Type >;
1992 };
1994 //*************************************************************************************************
1995 
1996 
1997 
1998 
1999 //=================================================================================================
2000 //
2001 // KRONTRAIT SPECIALIZATIONS
2002 //
2003 //=================================================================================================
2004 
2005 //*************************************************************************************************
2007 template< typename T1, typename T2 >
2008 struct KronTraitEval1< T1, T2
2009  , EnableIf_t< IsMatrix_v<T1> &&
2010  IsMatrix_v<T2> &&
2011  ( ( IsStrictlyLower_v<T1> ) ||
2012  ( IsLower_v<T1> && IsStrictlyLower_v<T2> ) ) &&
2013  !( IsZero_v<T1> || IsZero_v<T2> ) > >
2014 {
2015  using Type = StrictlyLowerMatrix< typename KronTraitEval2<T1,T2>::Type >;
2016 };
2018 //*************************************************************************************************
2019 
2020 
2021 
2022 
2023 //=================================================================================================
2024 //
2025 // DIVTRAIT SPECIALIZATIONS
2026 //
2027 //=================================================================================================
2028 
2029 //*************************************************************************************************
2031 template< typename T1, typename T2 >
2032 struct DivTraitEval1< T1, T2
2033  , EnableIf_t< IsStrictlyLower_v<T1> && IsNumeric_v<T2> > >
2034 {
2035  using Type = StrictlyLowerMatrix< typename DivTraitEval2<T1,T2>::Type >;
2036 };
2038 //*************************************************************************************************
2039 
2040 
2041 
2042 
2043 //=================================================================================================
2044 //
2045 // MAPTRAIT SPECIALIZATIONS
2046 //
2047 //=================================================================================================
2048 
2049 //*************************************************************************************************
2051 template< typename T, typename OP >
2052 struct UnaryMapTraitEval1< T, OP
2053  , EnableIf_t< YieldsStrictlyLower_v<OP,T> &&
2054  !YieldsZero_v<OP,T> > >
2055 {
2056  using Type = StrictlyLowerMatrix< typename UnaryMapTraitEval2<T,OP>::Type, StorageOrder_v<T> >;
2057 };
2059 //*************************************************************************************************
2060 
2061 
2062 //*************************************************************************************************
2064 template< typename T1, typename T2, typename OP >
2065 struct BinaryMapTraitEval1< T1, T2, OP
2066  , EnableIf_t< YieldsStrictlyLower_v<OP,T1,T2> &&
2067  !YieldsDiagonal_v<OP,T1,T2> > >
2068 {
2069  using Type = StrictlyLowerMatrix< typename BinaryMapTraitEval2<T1,T2,OP>::Type >;
2070 };
2072 //*************************************************************************************************
2073 
2074 
2075 
2076 
2077 //=================================================================================================
2078 //
2079 // DECLSYMTRAIT SPECIALIZATIONS
2080 //
2081 //=================================================================================================
2082 
2083 //*************************************************************************************************
2085 template< typename MT, bool SO, bool DF >
2086 struct DeclSymTrait< StrictlyLowerMatrix<MT,SO,DF> >
2087 {
2088  using Type = ZeroMatrix< typename MT::ElementType, SO >;
2089 };
2091 //*************************************************************************************************
2092 
2093 
2094 
2095 
2096 //=================================================================================================
2097 //
2098 // DECLHERMTRAIT SPECIALIZATIONS
2099 //
2100 //=================================================================================================
2101 
2102 //*************************************************************************************************
2104 template< typename MT, bool SO, bool DF >
2105 struct DeclHermTrait< StrictlyLowerMatrix<MT,SO,DF> >
2106 {
2107  using Type = ZeroMatrix< typename MT::ElementType, SO >;
2108 };
2110 //*************************************************************************************************
2111 
2112 
2113 
2114 
2115 //=================================================================================================
2116 //
2117 // DECLLOWTRAIT SPECIALIZATIONS
2118 //
2119 //=================================================================================================
2120 
2121 //*************************************************************************************************
2123 template< typename MT, bool SO, bool DF >
2124 struct DeclLowTrait< StrictlyLowerMatrix<MT,SO,DF> >
2125 {
2126  using Type = StrictlyLowerMatrix<MT,SO,DF>;
2127 };
2129 //*************************************************************************************************
2130 
2131 
2132 
2133 
2134 //=================================================================================================
2135 //
2136 // DECLUPPTRAIT SPECIALIZATIONS
2137 //
2138 //=================================================================================================
2139 
2140 //*************************************************************************************************
2142 template< typename MT, bool SO, bool DF >
2143 struct DeclUppTrait< StrictlyLowerMatrix<MT,SO,DF> >
2144 {
2145  using Type = ZeroMatrix< typename MT::ElementType, SO >;
2146 };
2148 //*************************************************************************************************
2149 
2150 
2151 
2152 
2153 //=================================================================================================
2154 //
2155 // DECLDIAGTRAIT SPECIALIZATIONS
2156 //
2157 //=================================================================================================
2158 
2159 //*************************************************************************************************
2161 template< typename MT, bool SO, bool DF >
2162 struct DeclDiagTrait< StrictlyLowerMatrix<MT,SO,DF> >
2163 {
2164  using Type = ZeroMatrix< typename MT::ElementType, SO >;
2165 };
2167 //*************************************************************************************************
2168 
2169 
2170 
2171 
2172 //=================================================================================================
2173 //
2174 // HIGHTYPE SPECIALIZATIONS
2175 //
2176 //=================================================================================================
2177 
2178 //*************************************************************************************************
2180 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2181 struct HighType< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
2182 {
2183  using Type = StrictlyLowerMatrix< typename HighType<MT1,MT2>::Type >;
2184 };
2186 //*************************************************************************************************
2187 
2188 
2189 
2190 
2191 //=================================================================================================
2192 //
2193 // LOWTYPE SPECIALIZATIONS
2194 //
2195 //=================================================================================================
2196 
2197 //*************************************************************************************************
2199 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2200 struct LowType< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
2201 {
2202  using Type = StrictlyLowerMatrix< typename LowType<MT1,MT2>::Type >;
2203 };
2205 //*************************************************************************************************
2206 
2207 
2208 
2209 
2210 //=================================================================================================
2211 //
2212 // SUBMATRIXTRAIT SPECIALIZATIONS
2213 //
2214 //=================================================================================================
2215 
2216 //*************************************************************************************************
2218 template< typename MT, size_t I, size_t N >
2219 struct SubmatrixTraitEval1< MT, I, I, N, N
2220  , EnableIf_t< IsStrictlyLower_v<MT> > >
2221 {
2222  using Type = StrictlyLowerMatrix< typename SubmatrixTraitEval2<MT,I,I,N,N>::Type >;
2223 };
2225 //*************************************************************************************************
2226 
2227 } // namespace blaze
2228 
2229 #endif
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Headerfile for the generic min algorithm.
Header file for the decldiag trait.
Header file for the Schur product trait.
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.The IsMatrix_v variable template provides a c...
Definition: IsMatrix.h:138
StrictlyLowerMatrix specialization for sparse matrices.
Header file for the subtraction trait.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
Header file for the declherm trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsZero type trait.
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Header file for the MAYBE_UNUSED function template.
Header file for the IsIdentity type trait.
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Header file for all forward declarations of the math module.
Header file for the IsUniLower type trait.
Header file for the MaxSize type trait.
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
constexpr bool IsStrictlyLower_v
Auxiliary variable template for the IsStrictlyLower type trait.The IsStrictlyLower_v variable templat...
Definition: IsStrictlyLower.h:173
constexpr bool YieldsStrictlyLower_v
Auxiliary variable template for the YieldsStrictlyLower type trait.The YieldsStrictlyLower_v variable...
Definition: YieldsStrictlyLower.h:124
Header file for the IsMatrix type trait.
Header file for the IsSquare type trait.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Header file for the LowType type trait.
Header file for the IsUniform type trait.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the IsShrinkable type trait.
StrictlyLowerMatrix specialization for dense matrices.
decltype(auto) min(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the componentwise minimum of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1162
Header file for the decllow trait.
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.The IsNumeric_v variable template provides a...
Definition: IsNumeric.h:143
Header file for the IsLower type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
Header file for the IsAligned type trait.
Header file for the Kron product trait.
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:438
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
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:137
Header file for the IsNumeric type trait.
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:74
Header file for the declupp trait.
Header file for run time assertion macros.
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Header file for the IsContiguous type trait.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
Header file for the IsZero type trait.
Header file for the declsym trait.
Matrix adapter for strictly lower triangular matrices.
Definition: BaseTemplate.h:558
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:282
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
#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
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
Header file for the YieldsDiagonal type trait.
Header file for the StorageOrder type trait.
Header file for the IntegralConstant class template.
Header file for the map trait.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
Header file for the IsUpper type trait.
Header file for the IsHermitian type trait.
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Header file for the Size type trait.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
Header file for the HighType type trait.