Band.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_VIEWS_BAND_H_
36 #define _BLAZE_MATH_VIEWS_BAND_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
70 #include <blaze/math/views/Check.h>
74 #include <blaze/util/Assert.h>
75 #include <blaze/util/DisableIf.h>
76 #include <blaze/util/EnableIf.h>
78 #include <blaze/util/mpl/And.h>
79 #include <blaze/util/mpl/If.h>
80 #include <blaze/util/mpl/Minimum.h>
81 #include <blaze/util/mpl/Not.h>
83 #include <blaze/util/TrueType.h>
84 #include <blaze/util/Types.h>
85 
86 
87 namespace blaze {
88 
89 //=================================================================================================
90 //
91 // GLOBAL FUNCTIONS
92 //
93 //=================================================================================================
94 
95 //*************************************************************************************************
130 template< ptrdiff_t I // Band index
131  , typename MT // Type of the matrix
132  , bool SO // Storage order
133  , typename... RBAs > // Optional band arguments
134 inline decltype(auto) band( Matrix<MT,SO>& matrix, RBAs... args )
135 {
137 
138  using ReturnType = Band_<MT,I>;
139  return ReturnType( ~matrix, args... );
140 }
141 //*************************************************************************************************
142 
143 
144 //*************************************************************************************************
179 template< ptrdiff_t I // Band index
180  , typename MT // Type of the matrix
181  , bool SO // Storage order
182  , typename... RBAs > // Optional band arguments
183 inline decltype(auto) band( const Matrix<MT,SO>& matrix, RBAs... args )
184 {
186 
187  using ReturnType = const Band_<const MT,I>;
188  return ReturnType( ~matrix, args... );
189 }
190 //*************************************************************************************************
191 
192 
193 //*************************************************************************************************
207 template< ptrdiff_t I // Band index
208  , typename MT // Type of the matrix
209  , bool SO // Storage order
210  , typename... RBAs > // Optional band arguments
211 inline decltype(auto) band( Matrix<MT,SO>&& matrix, RBAs... args )
212 {
214 
215  using ReturnType = Band_<MT,I>;
216  return ReturnType( ~matrix, args... );
217 }
218 //*************************************************************************************************
219 
220 
221 //*************************************************************************************************
257 template< typename MT // Type of the matrix
258  , bool SO // Storage order
259  , typename... RBAs > // Optional band arguments
260 inline decltype(auto) band( Matrix<MT,SO>& matrix, ptrdiff_t index, RBAs... args )
261 {
263 
264  using ReturnType = Band_<MT>;
265  return ReturnType( ~matrix, index, args... );
266 }
267 //*************************************************************************************************
268 
269 
270 //*************************************************************************************************
306 template< typename MT // Type of the matrix
307  , bool SO // Storage order
308  , typename... RBAs > // Optional band arguments
309 inline decltype(auto) band( const Matrix<MT,SO>& matrix, ptrdiff_t index, RBAs... args )
310 {
312 
313  using ReturnType = const Band_<const MT>;
314  return ReturnType( ~matrix, index, args... );
315 }
316 //*************************************************************************************************
317 
318 
319 //*************************************************************************************************
334 template< typename MT // Type of the matrix
335  , bool SO // Storage order
336  , typename... RBAs > // Optional band arguments
337 inline decltype(auto) band( Matrix<MT,SO>&& matrix, ptrdiff_t index, RBAs... args )
338 {
340 
341  using ReturnType = Band_<MT>;
342  return ReturnType( ~matrix, index, args... );
343 }
344 //*************************************************************************************************
345 
346 
347 //*************************************************************************************************
371 template< typename MT // Type of the matrix
372  , bool SO // Storage order
373  , typename... RDAs > // Optional diagonal arguments
374 inline decltype(auto) diagonal( Matrix<MT,SO>& matrix, RDAs... args )
375 {
377 
378  return band<0L>( ~matrix, args... );
379 }
380 //*************************************************************************************************
381 
382 
383 //*************************************************************************************************
406 template< typename MT // Type of the matrix
407  , bool SO // Storage order
408  , typename... RDAs > // Optional diagonal arguments
409 inline decltype(auto) diagonal( const Matrix<MT,SO>& matrix, RDAs... args )
410 {
412 
413  return band<0L>( ~matrix, args... );
414 }
415 //*************************************************************************************************
416 
417 
418 //*************************************************************************************************
430 template< typename MT // Type of the matrix
431  , bool SO // Storage order
432  , typename... RDAs > // Optional diagonal arguments
433 inline decltype(auto) diagonal( Matrix<MT,SO>&& matrix, RDAs... args )
434 {
436 
437  return band<0L>( ~matrix, args... );
438 }
439 //*************************************************************************************************
440 
441 
442 
443 
444 //=================================================================================================
445 //
446 // GLOBAL RESTRUCTURING FUNCTIONS
447 //
448 //=================================================================================================
449 
450 //*************************************************************************************************
462 template< ptrdiff_t... CBAs // Compile time band arguments
463  , typename MT // Type of the matrix
464  , typename... RBAs > // Runtime band arguments
465 inline decltype(auto) band( const MatMatAddExpr<MT>& matrix, RBAs... args )
466 {
468 
469  return band<CBAs...>( (~matrix).leftOperand(), args... ) +
470  band<CBAs...>( (~matrix).rightOperand(), args... );
471 }
473 //*************************************************************************************************
474 
475 
476 //*************************************************************************************************
488 template< ptrdiff_t... CBAs // Compile time band arguments
489  , typename MT // Type of the matrix
490  , typename... RBAs > // Runtime band arguments
491 inline decltype(auto) band( const MatMatSubExpr<MT>& matrix, RBAs... args )
492 {
494 
495  return band<CBAs...>( (~matrix).leftOperand(), args... ) -
496  band<CBAs...>( (~matrix).rightOperand(), args... );
497 }
499 //*************************************************************************************************
500 
501 
502 //*************************************************************************************************
513 template< ptrdiff_t... CBAs // Compile time band arguments
514  , typename MT // Type of the matrix
515  , typename... RBAs > // Runtime band arguments
516 inline decltype(auto) band( const SchurExpr<MT>& matrix, RBAs... args )
517 {
519 
520  return band<CBAs...>( (~matrix).leftOperand(), args... ) *
521  band<CBAs...>( (~matrix).rightOperand(), args... );
522 }
524 //*************************************************************************************************
525 
526 
527 //*************************************************************************************************
537 template< ptrdiff_t I // Band index
538  , typename MT > // Type of the matrix
539 inline decltype(auto) band( const VecTVecMultExpr<MT>& matrix )
540 {
542 
543  decltype(auto) leftOperand ( (~matrix).leftOperand() );
544  decltype(auto) rightOperand( (~matrix).rightOperand() );
545 
546  const size_t row ( I < 0L ? -I : 0UL );
547  const size_t column( I >= 0L ? I : 0UL );
548  const size_t size ( min( leftOperand.size() - row, rightOperand.size() - column ) );
549 
550  return transTo<defaultTransposeFlag>( subvector( leftOperand , row , size ) ) *
551  transTo<defaultTransposeFlag>( subvector( rightOperand, column, size ) );
552 }
554 //*************************************************************************************************
555 
556 
557 //*************************************************************************************************
568 template< typename MT > // Type of the matrix
569 inline decltype(auto) band( const VecTVecMultExpr<MT>& matrix, ptrdiff_t index )
570 {
572 
573  decltype(auto) leftOperand ( (~matrix).leftOperand() );
574  decltype(auto) rightOperand( (~matrix).rightOperand() );
575 
576  const size_t row ( index < 0L ? -index : 0UL );
577  const size_t column( index >= 0L ? index : 0UL );
578  const size_t size ( min( leftOperand.size() - row, rightOperand.size() - column ) );
579 
580  return transTo<defaultTransposeFlag>( subvector( leftOperand , row , size ) ) *
581  transTo<defaultTransposeFlag>( subvector( rightOperand, column, size ) );
582 }
584 //*************************************************************************************************
585 
586 
587 //*************************************************************************************************
599 template< ptrdiff_t... CBAs // Compile time band arguments
600  , typename MT // Type of the matrix
601  , typename... RBAs > // Runtime band arguments
602 inline decltype(auto) band( const MatScalarMultExpr<MT>& matrix, RBAs... args )
603 {
605 
606  return band<CBAs...>( (~matrix).leftOperand(), args... ) * (~matrix).rightOperand();
607 }
609 //*************************************************************************************************
610 
611 
612 //*************************************************************************************************
624 template< ptrdiff_t... CBAs // Compile time band arguments
625  , typename MT // Type of the matrix
626  , typename... RBAs > // Runtime band arguments
627 inline decltype(auto) band( const MatScalarDivExpr<MT>& matrix, RBAs... args )
628 {
630 
631  return band<CBAs...>( (~matrix).leftOperand(), args... ) / (~matrix).rightOperand();
632 }
634 //*************************************************************************************************
635 
636 
637 //*************************************************************************************************
649 template< ptrdiff_t... CBAs // Compile time band arguments
650  , typename MT // Type of the matrix
651  , typename... RBAs > // Runtime band arguments
652 inline decltype(auto) band( const MatMapExpr<MT>& matrix, RBAs... args )
653 {
655 
656  return map( band<CBAs...>( (~matrix).operand(), args... ), (~matrix).operation() );
657 }
659 //*************************************************************************************************
660 
661 
662 //*************************************************************************************************
674 template< ptrdiff_t... CBAs // Compile time band arguments
675  , typename MT // Type of the matrix
676  , typename... RBAs > // Runtime band arguments
677 inline decltype(auto) band( const MatMatMapExpr<MT>& matrix, RBAs... args )
678 {
680 
681  return map( band<CBAs...>( (~matrix).leftOperand(), args... ),
682  band<CBAs...>( (~matrix).rightOperand(), args... ),
683  (~matrix).operation() );
684 }
686 //*************************************************************************************************
687 
688 
689 //*************************************************************************************************
701 template< ptrdiff_t... CBAs // Compile time band arguments
702  , typename MT // Type of the matrix
703  , typename... RBAs > // Runtime band arguments
704 inline decltype(auto) band( const MatEvalExpr<MT>& matrix, RBAs... args )
705 {
707 
708  return eval( band<CBAs...>( (~matrix).operand(), args... ) );
709 }
711 //*************************************************************************************************
712 
713 
714 //*************************************************************************************************
726 template< ptrdiff_t... CBAs // Compile time band arguments
727  , typename MT // Type of the matrix
728  , typename... RBAs > // Runtime band arguments
729 inline decltype(auto) band( const MatSerialExpr<MT>& matrix, RBAs... args )
730 {
732 
733  return serial( band<CBAs...>( (~matrix).operand(), args... ) );
734 }
736 //*************************************************************************************************
737 
738 
739 //*************************************************************************************************
751 template< ptrdiff_t... CBAs // Compile time band arguments
752  , typename MT // Type of the matrix
753  , typename... RBAs > // Runtime band arguments
754 inline decltype(auto) band( const DeclExpr<MT>& matrix, RBAs... args )
755 {
757 
758  return band<CBAs...>( (~matrix).operand(), args... );
759 }
761 //*************************************************************************************************
762 
763 
764 //*************************************************************************************************
776 template< ptrdiff_t... CBAs // Compile time band arguments
777  , typename MT // Type of the matrix
778  , typename... RBAs > // Runtime band arguments
779 inline decltype(auto) band( const MatTransExpr<MT>& matrix, RBAs... args )
780 {
782 
783  return band<-CBAs...>( (~matrix).operand(), -args... );
784 }
786 //*************************************************************************************************
787 
788 
789 
790 
791 //=================================================================================================
792 //
793 // GLOBAL RESTRUCTURING FUNCTIONS (SUBVECTOR)
794 //
795 //=================================================================================================
796 
797 //*************************************************************************************************
808 template< AlignmentFlag AF // Alignment flag
809  , size_t I1 // Index of the first subvector element
810  , size_t N // Size of the subvector
811  , typename MT // Type of the matrix
812  , bool TF // Transpose flag
813  , bool DF // Density flag
814  , bool MF // Multiplication flag
815  , ptrdiff_t I2 // Band index
816  , typename... RSAs > // Optional subvector arguments
817 inline decltype(auto) subvector( Band<MT,TF,DF,MF,I2>& b, RSAs... args )
818 {
820 
821  constexpr size_t row ( ( I2 >= 0L ? 0UL : -I2 ) + I1 );
822  constexpr size_t column( ( I2 >= 0L ? I2 : 0UL ) + I1 );
823 
824  return diagonal( submatrix<AF,row,column,N,N>( b.operand(), args... ), unchecked );
825 }
827 //*************************************************************************************************
828 
829 
830 //*************************************************************************************************
842 template< AlignmentFlag AF // Alignment flag
843  , size_t I1 // Index of the first subvector element
844  , size_t N // Size of the subvector
845  , typename MT // Type of the matrix
846  , bool TF // Transpose flag
847  , bool DF // Density flag
848  , bool MF // Multiplication flag
849  , ptrdiff_t I2 // Band index
850  , typename... RSAs > // Optional subvector arguments
851 inline decltype(auto) subvector( const Band<MT,TF,DF,MF,I2>& b, RSAs... args )
852 {
854 
855  constexpr size_t row ( ( I2 >= 0L ? 0UL : -I2 ) + I1 );
856  constexpr size_t column( ( I2 >= 0L ? I2 : 0UL ) + I1 );
857 
858  return diagonal( submatrix<AF,row,column,N,N>( b.operand(), args... ), unchecked );
859 }
861 //*************************************************************************************************
862 
863 
864 //*************************************************************************************************
876 template< AlignmentFlag AF // Alignment flag
877  , size_t I1 // Index of the first subvector element
878  , size_t N // Size of the subvector
879  , typename MT // Type of the matrix
880  , bool TF // Transpose flag
881  , bool DF // Density flag
882  , bool MF // Multiplication flag
883  , ptrdiff_t I2 // Band index
884  , typename... RSAs > // Optional subvector arguments
885 inline decltype(auto) subvector( Band<MT,TF,DF,MF,I2>&& b, RSAs... args )
886 {
888 
889  constexpr size_t row ( ( I2 >= 0L ? 0UL : -I2 ) + I1 );
890  constexpr size_t column( ( I2 >= 0L ? I2 : 0UL ) + I1 );
891 
892  return diagonal( submatrix<AF,row,column,N,N>( b.operand(), args... ), unchecked );
893 }
895 //*************************************************************************************************
896 
897 
898 //*************************************************************************************************
909 template< AlignmentFlag AF // Alignment flag
910  , size_t... CSAs // Compile time subvector arguments
911  , typename MT // Type of the matrix
912  , bool TF // Transpose flag
913  , bool DF // Density flag
914  , bool MF // Multiplication flag
915  , ptrdiff_t... CBAs // Compile time band arguments
916  , typename... RSAs > // Optional subvector arguments
917 inline decltype(auto) subvector( Band<MT,TF,DF,MF,CBAs...>& b, RSAs... args )
918 {
920 
921  const SubvectorData<CSAs...> sd( args... );
922 
923  const size_t row ( b.row() + sd.offset() );
924  const size_t column( b.column() + sd.offset() );
925 
926  return diagonal( submatrix<AF>( b.operand(), row, column, sd.size(), sd.size(), args... ), unchecked );
927 }
929 //*************************************************************************************************
930 
931 
932 //*************************************************************************************************
944 template< AlignmentFlag AF // Alignment flag
945  , size_t... CSAs // Compile time subvector arguments
946  , typename MT // Type of the matrix
947  , bool TF // Transpose flag
948  , bool DF // Density flag
949  , bool MF // Multiplication flag
950  , ptrdiff_t... CBAs // Compile time band arguments
951  , typename... RSAs > // Optional subvector arguments
952 inline decltype(auto) subvector( const Band<MT,TF,DF,MF,CBAs...>& b, RSAs... args )
953 {
955 
956  const SubvectorData<CSAs...> sd( args... );
957 
958  const size_t row ( b.row() + sd.offset() );
959  const size_t column( b.column() + sd.offset() );
960 
961  return diagonal( submatrix<AF>( b.operand(), row, column, sd.size(), sd.size(), args... ), unchecked );
962 }
964 //*************************************************************************************************
965 
966 
967 //*************************************************************************************************
979 template< AlignmentFlag AF // Alignment flag
980  , size_t... CSAs // Compile time subvector arguments
981  , typename MT // Type of the matrix
982  , bool TF // Transpose flag
983  , bool DF // Density flag
984  , bool MF // Multiplication flag
985  , ptrdiff_t... CBAs // Compile time band arguments
986  , typename... RSAs > // Optional subvector arguments
987 inline decltype(auto) subvector( Band<MT,TF,DF,MF,CBAs...>&& b, RSAs... args )
988 {
990 
991  const SubvectorData<CSAs...> sd( args... );
992 
993  const size_t row ( b.row() + sd.offset() );
994  const size_t column( b.column() + sd.offset() );
995 
996  return diagonal( submatrix<AF>( b.operand(), row, column, sd.size(), sd.size(), args... ), unchecked );
997 }
999 //*************************************************************************************************
1000 
1001 
1002 
1003 
1004 //=================================================================================================
1005 //
1006 // BAND OPERATORS
1007 //
1008 //=================================================================================================
1009 
1010 //*************************************************************************************************
1018 template< typename MT // Type of the matrix
1019  , bool TF // Transpose flag
1020  , bool DF // Density flag
1021  , bool MF // Multiplication flag
1022  , ptrdiff_t... CBAs > // Compile time band arguments
1023 inline void reset( Band<MT,TF,DF,MF,CBAs...>& band )
1024 {
1025  band.reset();
1026 }
1028 //*************************************************************************************************
1029 
1030 
1031 //*************************************************************************************************
1039 template< typename MT // Type of the matrix
1040  , bool TF // Transpose flag
1041  , bool DF // Density flag
1042  , bool MF // Multiplication flag
1043  , ptrdiff_t... CBAs > // Compile time band arguments
1044 inline void reset( Band<MT,TF,DF,MF,CBAs...>&& band )
1045 {
1046  band.reset();
1047 }
1049 //*************************************************************************************************
1050 
1051 
1052 //*************************************************************************************************
1062 template< typename MT // Type of the matrix
1063  , bool TF // Transpose flag
1064  , bool DF // Density flag
1065  , bool MF // Multiplication flag
1066  , ptrdiff_t... CBAs > // Compile time band arguments
1067 inline void clear( Band<MT,TF,DF,MF,CBAs...>& band )
1068 {
1069  band.reset();
1070 }
1072 //*************************************************************************************************
1073 
1074 
1075 //*************************************************************************************************
1085 template< typename MT // Type of the matrix
1086  , bool TF // Transpose flag
1087  , bool DF // Density flag
1088  , bool MF // Multiplication flag
1089  , ptrdiff_t... CBAs > // Compile time band arguments
1090 inline void clear( Band<MT,TF,DF,MF,CBAs...>&& band )
1091 {
1092  band.reset();
1093 }
1095 //*************************************************************************************************
1096 
1097 
1098 //*************************************************************************************************
1124 template< bool RF // Relaxation flag
1125  , typename MT // Type of the dense matrix
1126  , bool TF // Transpose flag
1127  , bool MF // Multiplication flag
1128  , ptrdiff_t... CBAs > // Compile time band arguments
1129 inline bool isDefault( const Band<MT,TF,true,MF,CBAs...>& band )
1130 {
1131  using blaze::isDefault;
1132 
1133  for( size_t i=0UL; i<band.size(); ++i )
1134  if( !isDefault<RF>( band[i] ) ) return false;
1135  return true;
1136 }
1138 //*************************************************************************************************
1139 
1140 
1141 //*************************************************************************************************
1167 template< bool RF // Relaxation flag
1168  , typename MT // Type of the sparse matrix
1169  , bool TF // Transpose flag
1170  , bool MF // Multiplication flag
1171  , ptrdiff_t... CBAs > // Compile time band arguments
1172 inline bool isDefault( const Band<MT,TF,false,MF,CBAs...>& band )
1173 {
1174  using blaze::isDefault;
1175 
1176  for( const auto& element : band )
1177  if( !isDefault<RF>( element.value() ) ) return false;
1178  return true;
1179 }
1181 //*************************************************************************************************
1182 
1183 
1184 //*************************************************************************************************
1202 template< typename MT // Type of the matrix
1203  , bool TF // Transpose flag
1204  , bool DF // Density flag
1205  , bool MF // Multiplication flag
1206  , ptrdiff_t... CBAs > // Compile time band arguments
1207 inline bool isIntact( const Band<MT,TF,DF,MF,CBAs...>& band ) noexcept
1208 {
1209  const ptrdiff_t index( band.band() );
1210 
1211  return ( ( index >= 0L || size_t( -index ) < band.operand().rows() ) &&
1212  ( index < 0L || size_t( index ) < band.operand().columns() ) &&
1213  isIntact( band.operand() ) );
1214 }
1216 //*************************************************************************************************
1217 
1218 
1219 //*************************************************************************************************
1232 template< typename MT1 // Type of the matrix of the left-hand side band
1233  , bool TF // Transpose flag
1234  , bool DF // Density flag
1235  , bool MF // Multiplication flag
1236  , ptrdiff_t... CBAs1 // Compile time band arguments of the left-hand side band
1237  , typename MT2 // Type of the matrix of the right-hand side band
1238  , ptrdiff_t... CBAs2 > // Compile time band arguments of the right-hand side band
1240  isSame_backend( const Band<MT1,TF,DF,MF,CBAs1...>& a,
1241  const Band<MT2,TF,DF,MF,CBAs2...>& b ) noexcept
1242 {
1243  return ( isSame( a.operand(), b.operand() ) && ( a.band() == b.band() ) );
1244 }
1246 //*************************************************************************************************
1247 
1248 
1249 //*************************************************************************************************
1262 template< typename MT1 // Type of the submatrix of the left-hand side band
1263  , bool TF // Transpose flag
1264  , bool DF // Density flag
1265  , bool MF // Multiplication flag
1266  , ptrdiff_t... CBAs1 // Compile time band arguments of the left-hand side band
1267  , typename MT2 // Type of the matrix of the right-hand side band
1268  , ptrdiff_t... CBAs2 > // Compile time band arguments of the right-hand side band
1270  isSame_backend( const Band<MT1,TF,DF,MF,CBAs1...>& a,
1271  const Band<MT2,TF,DF,MF,CBAs2...>& b ) noexcept
1272 {
1273  return ( isSame( a.operand().operand(), b.operand() ) &&
1274  ( a.size() == b.size() ) &&
1275  ( a.row() + a.operand().row() == b.row() ) &&
1276  ( a.column() + a.operand().column() == b.column() ) );
1277 }
1279 //*************************************************************************************************
1280 
1281 
1282 //*************************************************************************************************
1295 template< typename MT1 // Type of the matrix of the left-hand side band
1296  , bool TF // Transpose flag
1297  , bool DF // Density flag
1298  , bool MF // Multiplication flag
1299  , ptrdiff_t... CBAs1 // Compile time band arguments of the left-hand side band
1300  , typename MT2 // Type of the submatrix of the right-hand side band
1301  , ptrdiff_t... CBAs2 > // Compile time band arguments of the right-hand side band
1302 inline EnableIf_< And< Not< IsSubmatrix<MT1> >, IsSubmatrix<MT2> >, bool >
1303  isSame_backend( const Band<MT1,TF,DF,MF,CBAs1...>& a,
1304  const Band<MT2,TF,DF,MF,CBAs2...>& b ) noexcept
1305 {
1306  return ( isSame( a.operand(), b.operand().operand() ) &&
1307  ( a.size() == b.size() ) &&
1308  ( a.row() == b.row() + b.operand().row() ) &&
1309  ( a.column() == b.column() + b.operand().column() ) );
1310 }
1312 //*************************************************************************************************
1313 
1314 
1315 //*************************************************************************************************
1328 template< typename MT1 // Type of the submatrix of the left-hand side band
1329  , bool TF // Transpose flag
1330  , bool DF // Density flag
1331  , bool MF // Multiplication flag
1332  , ptrdiff_t... CBAs1 // Compile time band arguments of the left-hand side band
1333  , typename MT2 // Type of the submatrix of the right-hand side band
1334  , ptrdiff_t... CBAs2 > // Compile time band arguments of the right-hand side band
1335 inline EnableIf_< And< IsSubmatrix<MT1>, IsSubmatrix<MT2> >, bool >
1336  isSame_backend( const Band<MT1,TF,DF,MF,CBAs1...>& a,
1337  const Band<MT2,TF,DF,MF,CBAs2...>& b ) noexcept
1338 {
1339  return ( isSame( a.operand().operand(), b.operand().operand() ) &&
1340  ( a.size() == b.size() ) &&
1341  ( a.row() + a.operand().row() == b.row() + b.operand().row() ) &&
1342  ( a.column() + a.operand().column() == b.column() + b.operand().column() ) );
1343 }
1345 //*************************************************************************************************
1346 
1347 
1348 //*************************************************************************************************
1361 template< typename MT1 // Type of the matrix of the left-hand side band
1362  , bool TF // Transpose flag
1363  , bool DF // Density flag
1364  , bool MF // Multiplication flag
1365  , ptrdiff_t... CBAs1 // Compile time band arguments of the left-hand side band
1366  , typename MT2 // Type of the matrix of the right-hand side band
1367  , ptrdiff_t... CBAs2 > // Compile time band arguments of the right-hand side band
1368 inline bool isSame( const Band<MT1,TF,DF,MF,CBAs1...>& a,
1369  const Band<MT2,TF,DF,MF,CBAs2...>& b ) noexcept
1370 {
1371  return isSame_backend( a, b );
1372 }
1374 //*************************************************************************************************
1375 
1376 
1377 //*************************************************************************************************
1392 template< typename MT // Type of the matrix
1393  , bool TF // Transpose flag
1394  , bool DF // Density flag
1395  , bool MF // Multiplication flag
1396  , ptrdiff_t... CBAs // Compile time band arguments
1397  , typename ET > // Type of the element
1398 inline bool trySet( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, const ET& value )
1399 {
1400  BLAZE_INTERNAL_ASSERT( index < band.size(), "Invalid vector access index" );
1401 
1402  return trySet( band.operand(), band.row()+index, band.column()+index, value );
1403 }
1405 //*************************************************************************************************
1406 
1407 
1408 //*************************************************************************************************
1423 template< typename MT // Type of the matrix
1424  , bool TF // Transpose flag
1425  , bool DF // Density flag
1426  , bool MF // Multiplication flag
1427  , ptrdiff_t... CBAs // Compile time band arguments
1428  , typename ET > // Type of the element
1429 inline bool tryAdd( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, const ET& value )
1430 {
1431  BLAZE_INTERNAL_ASSERT( index < band.size(), "Invalid vector access index" );
1432 
1433  return tryAdd( band.operand(), band.row()+index, band.column()+index, value );
1434 }
1436 //*************************************************************************************************
1437 
1438 
1439 //*************************************************************************************************
1454 template< typename MT // Type of the matrix
1455  , bool TF // Transpose flag
1456  , bool DF // Density flag
1457  , bool MF // Multiplication flag
1458  , ptrdiff_t... CBAs // Compile time band arguments
1459  , typename ET > // Type of the element
1460 inline bool trySub( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, const ET& value )
1461 {
1462  BLAZE_INTERNAL_ASSERT( index < band.size(), "Invalid vector access index" );
1463 
1464  return trySub( band.operand(), band.row()+index, band.column()+index, value );
1465 }
1467 //*************************************************************************************************
1468 
1469 
1470 //*************************************************************************************************
1485 template< typename MT // Type of the matrix
1486  , bool TF // Transpose flag
1487  , bool DF // Density flag
1488  , bool MF // Multiplication flag
1489  , ptrdiff_t... CBAs // Compile time band arguments
1490  , typename ET > // Type of the element
1491 inline bool tryMult( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, const ET& value )
1492 {
1493  BLAZE_INTERNAL_ASSERT( index < band.size(), "Invalid vector access index" );
1494 
1495  return tryMult( band.operand(), band.row()+index, band.column()+index, value );
1496 }
1498 //*************************************************************************************************
1499 
1500 
1501 //*************************************************************************************************
1517 template< typename MT // Type of the matrix
1518  , bool TF // Transpose flag
1519  , bool DF // Density flag
1520  , bool MF // Multiplication flag
1521  , ptrdiff_t... CBAs // Compile time band arguments
1522  , typename ET > // Type of the element
1524  tryMult( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, size_t size, const ET& value )
1525 {
1526  BLAZE_INTERNAL_ASSERT( index <= (~band).size(), "Invalid vector access index" );
1527  BLAZE_INTERNAL_ASSERT( index + size <= (~band).size(), "Invalid range size" );
1528 
1529  const size_t iend( index + size );
1530 
1531  for( size_t i=index; i<iend; ++i ) {
1532  if( !tryMult( band.operand(), band.row()+i, band.column()+i, value ) )
1533  return false;
1534  }
1535 
1536  return true;
1537 }
1539 //*************************************************************************************************
1540 
1541 
1542 //*************************************************************************************************
1557 template< typename MT // Type of the matrix
1558  , bool TF // Transpose flag
1559  , bool DF // Density flag
1560  , bool MF // Multiplication flag
1561  , ptrdiff_t... CBAs // Compile time band arguments
1562  , typename ET > // Type of the element
1563 inline bool tryDiv( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, const ET& value )
1564 {
1565  BLAZE_INTERNAL_ASSERT( index < band.size(), "Invalid vector access index" );
1566 
1567  return tryDiv( band.operand(), band.row()+index, band.column()+index, value );
1568 }
1570 //*************************************************************************************************
1571 
1572 
1573 //*************************************************************************************************
1589 template< typename MT // Type of the matrix
1590  , bool TF // Transpose flag
1591  , bool DF // Density flag
1592  , bool MF // Multiplication flag
1593  , ptrdiff_t... CBAs // Compile time band arguments
1594  , typename ET > // Type of the element
1596  tryDiv( const Band<MT,TF,DF,MF,CBAs...>& band, size_t index, size_t size, const ET& value )
1597 {
1598  BLAZE_INTERNAL_ASSERT( index <= (~band).size(), "Invalid vector access index" );
1599  BLAZE_INTERNAL_ASSERT( index + size <= (~band).size(), "Invalid range size" );
1600 
1601  const size_t iend( index + size );
1602 
1603  for( size_t i=index; i<iend; ++i ) {
1604  if( !tryDiv( band.operand(), band.row()+i, band.column()+i, value ) )
1605  return false;
1606  }
1607 
1608  return true;
1609 }
1611 //*************************************************************************************************
1612 
1613 
1614 //*************************************************************************************************
1629 template< typename MT // Type of the matrix
1630  , bool TF // Transpose flag
1631  , bool DF // Density flag
1632  , bool MF // Multiplication flag
1633  , ptrdiff_t... CBAs // Compile time band arguments
1634  , typename VT > // Type of the right-hand side vector
1635 inline bool tryAssign( const Band<MT,TF,DF,MF,CBAs...>& lhs,
1636  const Vector<VT,TF>& rhs, size_t index )
1637 {
1638  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1639  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1640 
1641  return tryAssign( lhs.operand(), ~rhs, lhs.band(), lhs.row()+index, lhs.column()+index );
1642 }
1644 //*************************************************************************************************
1645 
1646 
1647 //*************************************************************************************************
1662 template< typename MT // Type of the matrix
1663  , bool TF // Transpose flag
1664  , bool DF // Density flag
1665  , bool MF // Multiplication flag
1666  , ptrdiff_t... CBAs // Compile time band arguments
1667  , typename VT > // Type of the right-hand side vector
1668 inline bool tryAddAssign( const Band<MT,TF,DF,MF,CBAs...>& lhs,
1669  const Vector<VT,TF>& rhs, size_t index )
1670 {
1671  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1672  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1673 
1674  return tryAddAssign( lhs.operand(), ~rhs, lhs.band(), lhs.row()+index, lhs.column()+index );
1675 }
1677 //*************************************************************************************************
1678 
1679 
1680 //*************************************************************************************************
1695 template< typename MT // Type of the matrix
1696  , bool TF // Transpose flag
1697  , bool DF // Density flag
1698  , bool MF // Multiplication flag
1699  , ptrdiff_t... CBAs // Compile time band arguments
1700  , typename VT > // Type of the right-hand side vector
1701 inline bool trySubAssign( const Band<MT,TF,DF,MF,CBAs...>& lhs,
1702  const Vector<VT,TF>& rhs, size_t index )
1703 {
1704  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1705  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1706 
1707  return trySubAssign( lhs.operand(), ~rhs, lhs.band(), lhs.row()+index, lhs.column()+index );
1708 }
1710 //*************************************************************************************************
1711 
1712 
1713 //*************************************************************************************************
1728 template< typename MT // Type of the matrix
1729  , bool TF // Transpose flag
1730  , bool DF // Density flag
1731  , bool MF // Multiplication flag
1732  , ptrdiff_t... CBAs // Compile time band arguments
1733  , typename VT > // Type of the right-hand side vector
1734 inline bool tryMultAssign( const Band<MT,TF,DF,MF,CBAs...>& lhs,
1735  const Vector<VT,TF>& rhs, size_t index )
1736 {
1737  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1738  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1739 
1740  return tryMultAssign( lhs.operand(), ~rhs, lhs.band(), lhs.row()+index, lhs.column()+index );
1741 }
1743 //*************************************************************************************************
1744 
1745 
1746 //*************************************************************************************************
1761 template< typename MT // Type of the matrix
1762  , bool TF // Transpose flag
1763  , bool DF // Density flag
1764  , bool MF // Multiplication flag
1765  , ptrdiff_t... CBAs // Compile time band arguments
1766  , typename VT > // Type of the right-hand side vector
1767 inline bool tryDivAssign( const Band<MT,TF,DF,MF,CBAs...>& lhs,
1768  const Vector<VT,TF>& rhs, size_t index )
1769 {
1770  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1771  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1772 
1773  return tryDivAssign( lhs.operand(), ~rhs, lhs.band(), lhs.row()+index, lhs.column()+index );
1774 }
1776 //*************************************************************************************************
1777 
1778 
1779 //*************************************************************************************************
1794 template< typename MT // Type of the matrix
1795  , bool TF // Transpose flag
1796  , bool DF // Density flag
1797  , bool MF // Multiplication flag
1798  , ptrdiff_t I > // Band index
1799 inline decltype(auto) derestrict( Band<MT,TF,DF,MF,I>& b )
1800 {
1801  return band<I>( derestrict( b.operand() ), unchecked );
1802 }
1804 //*************************************************************************************************
1805 
1806 
1807 //*************************************************************************************************
1822 template< typename MT // Type of the matrix
1823  , bool TF // Transpose flag
1824  , bool DF // Density flag
1825  , bool MF // Multiplication flag
1826  , ptrdiff_t I > // Band index
1827 inline decltype(auto) derestrict( Band<MT,TF,DF,MF,I>&& b )
1828 {
1829  return band<I>( derestrict( b.operand() ), unchecked );
1830 }
1832 //*************************************************************************************************
1833 
1834 
1835 //*************************************************************************************************
1850 template< typename MT // Type of the matrix
1851  , bool TF // Transpose flag
1852  , bool DF // Density flag
1853  , bool MF > // Multiplication flag
1854 inline decltype(auto) derestrict( Band<MT,TF,DF,MF>& b )
1855 {
1856  return band( derestrict( b.operand() ), b.band(), unchecked );
1857 }
1859 //*************************************************************************************************
1860 
1861 
1862 //*************************************************************************************************
1877 template< typename MT // Type of the matrix
1878  , bool TF // Transpose flag
1879  , bool DF // Density flag
1880  , bool MF > // Multiplication flag
1881 inline decltype(auto) derestrict( Band<MT,TF,DF,MF>&& b )
1882 {
1883  return band( derestrict( b.operand() ), b.band(), unchecked );
1884 }
1886 //*************************************************************************************************
1887 
1888 
1889 
1890 
1891 //=================================================================================================
1892 //
1893 // SIZE SPECIALIZATIONS
1894 //
1895 //=================================================================================================
1896 
1897 //*************************************************************************************************
1899 template< typename MT, bool TF, bool DF, bool MF, ptrdiff_t I >
1900 struct Size< Band<MT,TF,DF,MF,I>, 0UL >
1901  : public IfTrue_< ( Size<MT,0UL>::value >= 0L && Size<MT,1UL>::value >= 0L )
1902  , Minimum< PtrdiffT< Size<MT,0UL>::value - ( I >= 0L ? 0L : -I ) >
1903  , PtrdiffT< Size<MT,1UL>::value - ( I >= 0L ? I : 0L ) > >
1904  , PtrdiffT<-1L> >
1905 {};
1907 //*************************************************************************************************
1908 
1909 
1910 
1911 
1912 //=================================================================================================
1913 //
1914 // ISRESTRICTED SPECIALIZATIONS
1915 //
1916 //=================================================================================================
1917 
1918 //*************************************************************************************************
1920 template< typename MT, bool TF, bool DF, bool MF, ptrdiff_t... CBAs >
1921 struct IsRestricted< Band<MT,TF,DF,MF,CBAs...> >
1922  : public IsRestricted<MT>
1923 {};
1925 //*************************************************************************************************
1926 
1927 
1928 
1929 
1930 //=================================================================================================
1931 //
1932 // HASCONSTDATAACCESS SPECIALIZATIONS
1933 //
1934 //=================================================================================================
1935 
1936 //*************************************************************************************************
1938 template< typename MT, bool TF, bool MF, ptrdiff_t... CBAs >
1939 struct HasConstDataAccess< Band<MT,TF,true,MF,CBAs...> >
1940  : public HasConstDataAccess<MT>
1941 {};
1943 //*************************************************************************************************
1944 
1945 
1946 
1947 
1948 //=================================================================================================
1949 //
1950 // HASMUTABLEDATAACCESS SPECIALIZATIONS
1951 //
1952 //=================================================================================================
1953 
1954 //*************************************************************************************************
1956 template< typename MT, bool TF, bool MF, ptrdiff_t... CBAs >
1957 struct HasMutableDataAccess< Band<MT,TF,true,MF,CBAs...> >
1958  : public HasMutableDataAccess<MT>
1959 {};
1961 //*************************************************************************************************
1962 
1963 
1964 
1965 
1966 //=================================================================================================
1967 //
1968 // ISOPPOSEDVIEW SPECIALIZATIONS
1969 //
1970 //=================================================================================================
1971 
1972 //*************************************************************************************************
1974 template< typename MT, bool TF, bool DF, bool MF, ptrdiff_t... CBAs >
1975 struct IsOpposedView< Band<MT,TF,DF,MF,CBAs...> >
1976  : public TrueType
1977 {};
1979 //*************************************************************************************************
1980 
1981 
1982 
1983 
1984 //=================================================================================================
1985 //
1986 // SUBVECTORTRAIT SPECIALIZATIONS
1987 //
1988 //=================================================================================================
1989 
1990 //*************************************************************************************************
1992 template< typename MT, bool TF, bool DF, bool MF, ptrdiff_t... CBAs, size_t... CSAs >
1993 struct SubvectorTrait< Band<MT,TF,DF,MF,CBAs...>, CSAs... >
1994 {
1995  using Type = SubvectorTrait_< ResultType_< Band<MT,TF,DF,MF,CBAs...> >, CSAs... >;
1996 };
1998 //*************************************************************************************************
1999 
2000 
2001 
2002 
2003 //=================================================================================================
2004 //
2005 // ELEMENTSTRAIT SPECIALIZATIONS
2006 //
2007 //=================================================================================================
2008 
2009 //*************************************************************************************************
2011 template< typename MT, bool TF, bool DF, bool MF, ptrdiff_t... CBAs, size_t... CEAs >
2012 struct ElementsTrait< Band<MT,TF,DF,MF,CBAs...>, CEAs... >
2013 {
2014  using Type = ElementsTrait_< ResultType_< Band<MT,TF,DF,MF,CBAs...> >, CEAs... >;
2015 };
2017 //*************************************************************************************************
2018 
2019 } // namespace blaze
2020 
2021 #endif
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:329
AlignmentFlag
Alignment flag for (un-)aligned vectors and matrices.Via these flags it is possible to specify subvec...
Definition: AlignmentFlag.h:62
Pointer difference type of the Blaze library.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
Header file for the blaze::checked and blaze::unchecked instances.
Base class for all binary matrix map expression templates.The MatMatMapExpr class serves as a tag for...
Definition: MatMatMapExpr.h:66
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
BLAZE_ALWAYS_INLINE bool isSame(const Matrix< MT1, SO1 > &a, const Matrix< MT2, SO2 > &b) noexcept
Returns whether the two given matrices represent the same observable state.
Definition: Matrix.h:949
Header file for basic type definitions.
Base class for all matrix serial evaluation expression templates.The MatSerialExpr class serves as a ...
Definition: MatSerialExpr.h:67
Base class for all matrix/scalar division expression templates.The MatScalarDivExpr class serves as a...
Definition: MatScalarDivExpr.h:66
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the MatTransExpr base class.
Compile time check for resizable data types.This type trait tests whether the given data type is an o...
Definition: IsOpposedView.h:81
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
Base class for all matrix/scalar multiplication expression templates.The MatScalarMultExpr class serv...
Definition: MatScalarMultExpr.h:67
Header file for the And class template.
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1903
Header file for the MatEvalExpr base class.
Auxiliary class template for the data members of the Subvector class.The auxiliary SubvectorData clas...
Definition: SubvectorData.h:64
Header file for the implementation of the Band base template.
typename ElementsTrait< VT, CEAs... >::Type ElementsTrait_
Auxiliary alias declaration for the ElementsTrait type trait.The ElementsTrait_ alias declaration pro...
Definition: ElementsTrait.h:144
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
Header file for the elements trait.
Header file for the band trait.
typename IfTrue< Condition, T1, T2 >::Type IfTrue_
Auxiliary alias declaration for the IfTrue class template.The IfTrue_ alias declaration provides a co...
Definition: If.h:109
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Base template for the SubvectorTrait class.
Definition: SubvectorTrait.h:109
Compile time check for low-level access to mutable data.This type trait tests whether the given data ...
Definition: HasMutableDataAccess.h:75
Header file for the MatMapExpr base class.
Band specialization for sparse matrices.
Header file for the DisableIf class template.
Base class for all matrix/matrix subtraction expression templates.The MatMatSubExpr class serves as a...
Definition: MatMatSubExpr.h:67
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 If class template.
Header file for the IsSubmatrix type trait.
Header file for the Not class template.
Header file for the implementation of the SubvectorData class template.
Header file for the subvector trait.
Base class for all matrix/matrix addition expression templates.The MatMatAddExpr class serves as a ta...
Definition: MatMatAddExpr.h:66
Header file for the MatMatSubExpr base class.
Base class for all unary matrix map expression templates.The MatMapExpr class serves as a tag for all...
Definition: MatMapExpr.h:66
Header file for the IsOpposedView type trait.
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:794
Base template for the ElementsTrait class.
Definition: ElementsTrait.h:108
decltype(auto) diagonal(Matrix< MT, SO > &matrix, RDAs... args)
Creating a view on the diagonal of the given matrix.
Definition: Band.h:374
Header file for all forward declarations for expression class templates.
Header file for the MatSerialExpr base class.
Header file for the VecTVecMultExpr base class.
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
typename SubvectorTrait< VT, CSAs... >::Type SubvectorTrait_
Auxiliary alias declaration for the SubvectorTrait type trait.The SubvectorTrait_ alias declaration p...
Definition: SubvectorTrait.h:145
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:134
Header file for the HasConstDataAccess type trait.
Header file for the DeclExpr base class.
Header file for the Matrix base class.
Header file for the PtrdiffT class template.
Header file for all forward declarations for views.
Header file for the MatScalarMultExpr base class.
Base class for all Schur product expression templates.The SchurExpr class serves as a tag for all exp...
Definition: SchurExpr.h:66
Header file for run time assertion macros.
Header file for the SchurExpr base class.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
Compile time integral constant wrapper for ptrdiff_t.The PtrdiffT class template represents an integr...
Definition: PtrdiffT.h:72
Base class for all matrix evaluation expression templates.The MatEvalExpr class serves as a tag for a...
Definition: MatEvalExpr.h:66
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Compile time type negation.The Not alias declaration negates the given compile time condition...
Definition: Not.h:70
Header file for the isDefault shim.
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:816
Base class for all matrix transposition expression templates.The MatTransExpr class serves as a tag f...
Definition: MatTransExpr.h:66
Header file for the HasMutableDataAccess type trait.
Header file for the MatMatAddExpr base class.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Base class for all outer product expression templates.The VecTVecMultExpr class serves as a tag for a...
Definition: VecTVecMultExpr.h:67
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3080
Compile time check for submatrices.This type trait tests whether or not the given template parameter ...
Definition: IsSubmatrix.h:90
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:177
Band specialization for dense matrices.
Header file for the MatMatMapExpr base class.
Header file for the default transpose flag for all vectors of the Blaze library.
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
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
Header file for the Minimum class template.
Header file for the MatScalarDivExpr base class.
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, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the TrueType type/value trait base class.
Header file for the function trace functionality.
Compile time value evaluation.The Minimum alias declaration selects the smaller of the two given temp...
Definition: Minimum.h:73
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs...
Definition: DMatDMatMapExpr.h:1134