Blaze  3.6
Column.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_VIEWS_COLUMN_H_
36 #define _BLAZE_MATH_VIEWS_COLUMN_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
44 #include <blaze/math/Exception.h>
72 #include <blaze/math/views/Check.h>
77 #include <blaze/util/Assert.h>
78 #include <blaze/util/EnableIf.h>
81 #include <blaze/util/MaybeUnused.h>
82 #include <blaze/util/TypeList.h>
83 #include <blaze/util/Types.h>
84 
85 
86 namespace blaze {
87 
88 //=================================================================================================
89 //
90 // GLOBAL FUNCTIONS
91 //
92 //=================================================================================================
93 
94 //*************************************************************************************************
129 template< size_t I // Column index
130  , typename MT // Type of the matrix
131  , bool SO // Storage order
132  , typename... RCAs > // Optional column arguments
133 inline decltype(auto) column( Matrix<MT,SO>& matrix, RCAs... args )
134 {
136 
137  using ReturnType = Column_<MT,I>;
138  return ReturnType( ~matrix, args... );
139 }
140 //*************************************************************************************************
141 
142 
143 //*************************************************************************************************
178 template< size_t I // Column index
179  , typename MT // Type of the matrix
180  , bool SO // Storage order
181  , typename... RCAs > // Optional column arguments
182 inline decltype(auto) column( const Matrix<MT,SO>& matrix, RCAs... args )
183 {
185 
186  using ReturnType = const Column_<const MT,I>;
187  return ReturnType( ~matrix, args... );
188 }
189 //*************************************************************************************************
190 
191 
192 //*************************************************************************************************
206 template< size_t I // Column index
207  , typename MT // Type of the matrix
208  , bool SO // Storage order
209  , typename... RCAs > // Optional column arguments
210 inline decltype(auto) column( Matrix<MT,SO>&& matrix, RCAs... args )
211 {
213 
214  using ReturnType = Column_<MT,I>;
215  return ReturnType( ~matrix, args... );
216 }
217 //*************************************************************************************************
218 
219 
220 //*************************************************************************************************
256 template< typename MT // Type of the matrix
257  , bool SO // Storage order
258  , typename... RCAs > // Optional column arguments
259 inline decltype(auto) column( Matrix<MT,SO>& matrix, size_t index, RCAs... args )
260 {
262 
263  using ReturnType = Column_<MT>;
264  return ReturnType( ~matrix, index, args... );
265 }
266 //*************************************************************************************************
267 
268 
269 //*************************************************************************************************
305 template< typename MT // Type of the matrix
306  , bool SO // Storage order
307  , typename... RCAs > // Optional column arguments
308 inline decltype(auto) column( const Matrix<MT,SO>& matrix, size_t index, RCAs... args )
309 {
311 
312  using ReturnType = const Column_<const MT>;
313  return ReturnType( ~matrix, index, args... );
314 }
315 //*************************************************************************************************
316 
317 
318 //*************************************************************************************************
333 template< typename MT // Type of the matrix
334  , bool SO // Storage order
335  , typename... RCAs > // Optional column arguments
336 inline decltype(auto) column( Matrix<MT,SO>&& matrix, size_t index, RCAs... args )
337 {
339 
340  using ReturnType = Column_<MT>;
341  return ReturnType( ~matrix, index, args... );
342 }
343 //*************************************************************************************************
344 
345 
346 
347 
348 //=================================================================================================
349 //
350 // GLOBAL RESTRUCTURING FUNCTIONS
351 //
352 //=================================================================================================
353 
354 //*************************************************************************************************
366 template< size_t... CCAs // Compile time column arguments
367  , typename MT // Matrix base type of the expression
368  , typename... RCAs > // Runtime column arguments
369 inline decltype(auto) column( const MatMatAddExpr<MT>& matrix, RCAs... args )
370 {
372 
373  return column<CCAs...>( (~matrix).leftOperand(), args... ) +
374  column<CCAs...>( (~matrix).rightOperand(), args... );
375 }
377 //*************************************************************************************************
378 
379 
380 //*************************************************************************************************
392 template< size_t... CCAs // Compile time column arguments
393  , typename MT // Matrix base type of the expression
394  , typename... RCAs > // Runtime column arguments
395 inline decltype(auto) column( const MatMatSubExpr<MT>& matrix, RCAs... args )
396 {
398 
399  return column<CCAs...>( (~matrix).leftOperand(), args... ) -
400  column<CCAs...>( (~matrix).rightOperand(), args... );
401 }
403 //*************************************************************************************************
404 
405 
406 //*************************************************************************************************
418 template< size_t... CCAs // Compile time column arguments
419  , typename MT // Matrix base type of the expression
420  , typename... RCAs > // Runtime column arguments
421 inline decltype(auto) column( const SchurExpr<MT>& matrix, RCAs... args )
422 {
424 
425  return column<CCAs...>( (~matrix).leftOperand(), args... ) *
426  column<CCAs...>( (~matrix).rightOperand(), args... );
427 }
429 //*************************************************************************************************
430 
431 
432 //*************************************************************************************************
444 template< size_t... CCAs // Compile time column arguments
445  , typename MT // Matrix base type of the expression
446  , typename... RCAs > // Runtime column arguments
447 inline decltype(auto) column( const MatMatMultExpr<MT>& matrix, RCAs... args )
448 {
450 
451  return (~matrix).leftOperand() * column<CCAs...>( (~matrix).rightOperand(), args... );
452 }
454 //*************************************************************************************************
455 
456 
457 //*************************************************************************************************
469 template< size_t... CCAs // Compile time column arguments
470  , typename MT // Matrix base type of the expression
471  , typename... RCAs > // Runtime column arguments
472 inline decltype(auto) column( const MatMatKronExpr<MT>& matrix, RCAs... args )
473 {
475 
476  MAYBE_UNUSED( args... );
477 
478  const ColumnData<CCAs...> cd( args... );
479 
480  if( !Contains_v< TypeList<RCAs...>, Unchecked > ) {
481  if( (~matrix).columns() <= cd.column() ) {
482  BLAZE_THROW_INVALID_ARGUMENT( "Invalid column access index" );
483  }
484  }
485 
486  const size_t columns( (~matrix).rightOperand().columns() );
487 
488  return kron( column( (~matrix).leftOperand(), cd.column()/columns ),
489  column( (~matrix).rightOperand(), cd.column()%columns ) );
490 }
492 //*************************************************************************************************
493 
494 
495 //*************************************************************************************************
508 template< size_t I // Column index
509  , typename MT // Matrix base type of the expression
510  , typename... RCAs > // Optional column arguments
511 inline decltype(auto) column( const VecTVecMultExpr<MT>& matrix, RCAs... args )
512 {
514 
515  MAYBE_UNUSED( args... );
516 
517  if( !Contains_v< TypeList<RCAs...>, Unchecked > ) {
518  if( (~matrix).columns() <= I ) {
519  BLAZE_THROW_INVALID_ARGUMENT( "Invalid column access index" );
520  }
521  }
522 
523  return (~matrix).leftOperand() * (~matrix).rightOperand()[I];
524 }
526 //*************************************************************************************************
527 
528 
529 //*************************************************************************************************
543 template< typename MT // Matrix base type of the expression
544  , typename... RCAs > // Optional column arguments
545 inline decltype(auto) column( const VecTVecMultExpr<MT>& matrix, size_t index, RCAs... args )
546 {
548 
549  MAYBE_UNUSED( args... );
550 
551  if( !Contains_v< TypeList<RCAs...>, Unchecked > ) {
552  if( (~matrix).columns() <= index ) {
553  BLAZE_THROW_INVALID_ARGUMENT( "Invalid column access index" );
554  }
555  }
556 
557  return (~matrix).leftOperand() * (~matrix).rightOperand()[index];
558 }
560 //*************************************************************************************************
561 
562 
563 //*************************************************************************************************
575 template< size_t... CCAs // Compile time column arguments
576  , typename MT // Matrix base type of the expression
577  , typename... RCAs > // Runtime column arguments
578 inline decltype(auto) column( const MatScalarMultExpr<MT>& matrix, RCAs... args )
579 {
581 
582  return column<CCAs...>( (~matrix).leftOperand(), args... ) * (~matrix).rightOperand();
583 }
585 //*************************************************************************************************
586 
587 
588 //*************************************************************************************************
600 template< size_t... CCAs // Compile time column arguments
601  , typename MT // Matrix base type of the expression
602  , typename... RCAs > // Runtime column arguments
603 inline decltype(auto) column( const MatScalarDivExpr<MT>& matrix, RCAs... args )
604 {
606 
607  return column<CCAs...>( (~matrix).leftOperand(), args... ) / (~matrix).rightOperand();
608 }
610 //*************************************************************************************************
611 
612 
613 //*************************************************************************************************
625 template< size_t... CCAs // Compile time column arguments
626  , typename MT // Matrix base type of the expression
627  , typename... RCAs > // Runtime column arguments
628 inline decltype(auto) column( const MatMapExpr<MT>& matrix, RCAs... args )
629 {
631 
632  return map( column<CCAs...>( (~matrix).operand(), args... ), (~matrix).operation() );
633 }
635 //*************************************************************************************************
636 
637 
638 //*************************************************************************************************
650 template< size_t... CCAs // Compile time column arguments
651  , typename MT // Matrix base type of the expression
652  , typename... RCAs > // Runtime column arguments
653 inline decltype(auto) column( const MatMatMapExpr<MT>& matrix, RCAs... args )
654 {
656 
657  return map( column<CCAs...>( (~matrix).leftOperand(), args... ),
658  column<CCAs...>( (~matrix).rightOperand(), args... ),
659  (~matrix).operation() );
660 }
662 //*************************************************************************************************
663 
664 
665 //*************************************************************************************************
677 template< size_t... CCAs // Compile time column arguments
678  , typename MT // Matrix base type of the expression
679  , typename... RCAs > // Runtime column arguments
680 inline decltype(auto) column( const MatEvalExpr<MT>& matrix, RCAs... args )
681 {
683 
684  return eval( column<CCAs...>( (~matrix).operand(), args... ) );
685 }
687 //*************************************************************************************************
688 
689 
690 //*************************************************************************************************
702 template< size_t... CCAs // Compile time column arguments
703  , typename MT // Matrix base type of the expression
704  , typename... RCAs > // Runtime column arguments
705 inline decltype(auto) column( const MatSerialExpr<MT>& matrix, RCAs... args )
706 {
708 
709  return serial( column<CCAs...>( (~matrix).operand(), args... ) );
710 }
712 //*************************************************************************************************
713 
714 
715 //*************************************************************************************************
727 template< size_t... CCAs // Compile time column arguments
728  , typename MT // Matrix base type of the expression
729  , typename... RCAs > // Runtime column arguments
730 inline decltype(auto) column( const DeclExpr<MT>& matrix, RCAs... args )
731 {
733 
734  return column<CCAs...>( (~matrix).operand(), args... );
735 }
737 //*************************************************************************************************
738 
739 
740 //*************************************************************************************************
752 template< size_t... CCAs // Compile time column arguments
753  , typename MT // Matrix base type of the expression
754  , typename... RCAs > // Runtime column arguments
755 inline decltype(auto) column( const MatTransExpr<MT>& matrix, RCAs... args )
756 {
758 
759  return trans( row<CCAs...>( (~matrix).operand(), args... ) );
760 }
762 //*************************************************************************************************
763 
764 
765 //*************************************************************************************************
777 template< size_t... CCAs // Compile time column arguments
778  , typename MT // Matrix base type of the expression
779  , size_t... CEAs // Compile time expansion arguments
780  , typename... RCAs // Runtime column arguments
781  , EnableIf_t< IsColumnMajorMatrix_v<MT> >* = nullptr >
782 inline decltype(auto) column( const VecExpandExpr<MT,CEAs...>& matrix, RCAs... args )
783 {
785 
786  MAYBE_UNUSED( args... );
787 
788  return subvector( (~matrix).operand(), 0UL, (~matrix).rows() );
789 }
791 //*************************************************************************************************
792 
793 
794 //*************************************************************************************************
806 template< size_t... CCAs // Compile time column arguments
807  , typename MT // Matrix base type of the expression
808  , size_t... CEAs // Compile time expansion arguments
809  , typename... RCAs // Runtime column arguments
810  , EnableIf_t< !IsColumnMajorMatrix_v<MT> >* = nullptr >
811 inline decltype(auto) column( const VecExpandExpr<MT,CEAs...>& matrix, RCAs... args )
812 {
814 
815  using ET = ElementType_t< MatrixType_t<MT> >;
816 
817  const ColumnData<CCAs...> cd( args... );
818 
819  return UniformVector<ET,columnVector>( (~matrix).rows(), (~matrix).operand()[cd.column()] );
820 }
822 //*************************************************************************************************
823 
824 
825 
826 
827 //=================================================================================================
828 //
829 // COLUMN OPERATORS
830 //
831 //=================================================================================================
832 
833 //*************************************************************************************************
841 template< typename MT // Type of the matrix
842  , bool SO // Storage order
843  , bool DF // Density flag
844  , bool SF // Symmetry flag
845  , size_t... CCAs > // Compile time column arguments
846 inline void reset( Column<MT,SO,DF,SF,CCAs...>& column )
847 {
848  column.reset();
849 }
851 //*************************************************************************************************
852 
853 
854 //*************************************************************************************************
862 template< typename MT // Type of the matrix
863  , bool SO // Storage order
864  , bool DF // Density flag
865  , bool SF // Symmetry flag
866  , size_t... CCAs > // Compile time column arguments
867 inline void reset( Column<MT,SO,DF,SF,CCAs...>&& column )
868 {
869  column.reset();
870 }
872 //*************************************************************************************************
873 
874 
875 //*************************************************************************************************
885 template< typename MT // Type of the matrix
886  , bool SO // Storage order
887  , bool DF // Density flag
888  , bool SF // Symmetry flag
889  , size_t... CCAs > // Compile time column arguments
890 inline void clear( Column<MT,SO,DF,SF,CCAs...>& column )
891 {
892  column.reset();
893 }
895 //*************************************************************************************************
896 
897 
898 //*************************************************************************************************
908 template< typename MT // Type of the matrix
909  , bool SO // Storage order
910  , bool DF // Density flag
911  , bool SF // Symmetry flag
912  , size_t... CCAs > // Compile time column arguments
913 inline void clear( Column<MT,SO,DF,SF,CCAs...>&& column )
914 {
915  column.reset();
916 }
918 //*************************************************************************************************
919 
920 
921 //*************************************************************************************************
947 template< bool RF // Relaxation flag
948  , typename MT // Type of the dense matrix
949  , bool SO // Storage order
950  , bool SF // Symmetry flag
951  , size_t... CCAs > // Compile time column arguments
952 inline bool isDefault( const Column<MT,SO,true,SF,CCAs...>& column )
953 {
954  using blaze::isDefault;
955 
956  for( size_t i=0UL; i<column.size(); ++i )
957  if( !isDefault<RF>( column[i] ) ) return false;
958  return true;
959 }
961 //*************************************************************************************************
962 
963 
964 //*************************************************************************************************
990 template< bool RF // Relaxation flag
991  , typename MT // Type of the sparse matrix
992  , bool SO // Storage order
993  , bool SF // Symmetry flag
994  , size_t... CCAs > // Compile time column arguments
995 inline bool isDefault( const Column<MT,SO,false,SF,CCAs...>& column )
996 {
997  using blaze::isDefault;
998 
999  for( const auto& element : column )
1000  if( !isDefault<RF>( element.value() ) ) return false;
1001  return true;
1002 }
1004 //*************************************************************************************************
1005 
1006 
1007 //*************************************************************************************************
1025 template< typename MT // Type of the matrix
1026  , bool SO // Storage order
1027  , bool DF // Density flag
1028  , bool SF // Symmetry flag
1029  , size_t... CCAs > // Compile time column arguments
1030 inline bool isIntact( const Column<MT,SO,DF,SF,CCAs...>& column ) noexcept
1031 {
1032  return ( column.column() < column.operand().columns() &&
1033  isIntact( column.operand() ) );
1034 }
1036 //*************************************************************************************************
1037 
1038 
1039 //*************************************************************************************************
1052 template< typename MT1 // Type of the matrix of the left-hand side column
1053  , bool SO // Storage order
1054  , bool DF // Density flag
1055  , bool SF1 // Symmetry flag of the left-hand side column
1056  , size_t... CCAs1 // Compile time column arguments of the left-hand side column
1057  , typename MT2 // Type of the matrix of the right-hand side column
1058  , bool SF2 // Symmetry flag of the right-hand side column
1059  , size_t... CCAs2 > // Compile time column arguments of the right-hand side column
1060 inline bool isSame( const Column<MT1,SO,DF,SF1,CCAs1...>& a,
1061  const Column<MT2,SO,DF,SF2,CCAs2...>& b ) noexcept
1062 {
1063  return ( isSame( a.operand(), b.operand() ) && ( a.column() == b.column() ) );
1064 }
1066 //*************************************************************************************************
1067 
1068 
1069 //*************************************************************************************************
1084 template< typename MT // Type of the matrix
1085  , bool SO // Storage order
1086  , bool DF // Density flag
1087  , bool SF // Symmetry flag
1088  , size_t... CCAs // Compile time column arguments
1089  , typename ET > // Type of the element
1090 inline bool trySet( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1091 {
1092  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1093 
1094  return trySet( column.operand(), index, column.column(), value );
1095 }
1097 //*************************************************************************************************
1098 
1099 
1100 //*************************************************************************************************
1116 template< typename MT // Type of the matrix
1117  , bool SO // Storage order
1118  , bool DF // Density flag
1119  , bool SF // Symmetry flag
1120  , size_t... CCAs // Compile time column arguments
1121  , typename ET > // Type of the element
1123  trySet( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1124 {
1125  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1126  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1127 
1128  return trySet( column.operand(), index, column.column(), size, 1UL, value );
1129 }
1131 //*************************************************************************************************
1132 
1133 
1134 //*************************************************************************************************
1149 template< typename MT // Type of the matrix
1150  , bool SO // Storage order
1151  , bool DF // Density flag
1152  , bool SF // Symmetry flag
1153  , size_t... CCAs // Compile time column arguments
1154  , typename ET > // Type of the element
1155 inline bool tryAdd( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1156 {
1157  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1158 
1159  return tryAdd( column.operand(), index, column.column(), value );
1160 }
1162 //*************************************************************************************************
1163 
1164 
1165 //*************************************************************************************************
1181 template< typename MT // Type of the matrix
1182  , bool SO // Storage order
1183  , bool DF // Density flag
1184  , bool SF // Symmetry flag
1185  , size_t... CCAs // Compile time column arguments
1186  , typename ET > // Type of the element
1188  tryAdd( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1189 {
1190  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1191  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1192 
1193  return tryAdd( column.operand(), index, column.column(), size, 1UL, value );
1194 }
1196 //*************************************************************************************************
1197 
1198 
1199 //*************************************************************************************************
1214 template< typename MT // Type of the matrix
1215  , bool SO // Storage order
1216  , bool DF // Density flag
1217  , bool SF // Symmetry flag
1218  , size_t... CCAs // Compile time column arguments
1219  , typename ET > // Type of the element
1220 inline bool trySub( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1221 {
1222  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1223 
1224  return trySub( column.operand(), index, column.column(), value );
1225 }
1227 //*************************************************************************************************
1228 
1229 
1230 //*************************************************************************************************
1246 template< typename MT // Type of the matrix
1247  , bool SO // Storage order
1248  , bool DF // Density flag
1249  , bool SF // Symmetry flag
1250  , size_t... CCAs // Compile time column arguments
1251  , typename ET > // Type of the element
1253  trySub( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1254 {
1255  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1256  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1257 
1258  return trySub( column.operand(), index, column.column(), size, 1UL, value );
1259 }
1261 //*************************************************************************************************
1262 
1263 
1264 //*************************************************************************************************
1279 template< typename MT // Type of the matrix
1280  , bool SO // Storage order
1281  , bool DF // Density flag
1282  , bool SF // Symmetry flag
1283  , size_t... CCAs // Compile time column arguments
1284  , typename ET > // Type of the element
1285 inline bool tryMult( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1286 {
1287  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1288 
1289  return tryMult( column.operand(), index, column.column(), value );
1290 }
1292 //*************************************************************************************************
1293 
1294 
1295 //*************************************************************************************************
1311 template< typename MT // Type of the matrix
1312  , bool SO // Storage order
1313  , bool DF // Density flag
1314  , bool SF // Symmetry flag
1315  , size_t... CCAs // Compile time column arguments
1316  , typename ET > // Type of the element
1318  tryMult( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1319 {
1320  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1321  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1322 
1323  return tryMult( column.operand(), index, column.column(), size, 1UL, value );
1324 }
1326 //*************************************************************************************************
1327 
1328 
1329 //*************************************************************************************************
1344 template< typename MT // Type of the matrix
1345  , bool SO // Storage order
1346  , bool DF // Density flag
1347  , bool SF // Symmetry flag
1348  , size_t... CCAs // Compile time column arguments
1349  , typename ET > // Type of the element
1350 inline bool tryDiv( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1351 {
1352  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1353 
1354  return tryDiv( column.operand(), index, column.column(), value );
1355 }
1357 //*************************************************************************************************
1358 
1359 
1360 //*************************************************************************************************
1376 template< typename MT // Type of the matrix
1377  , bool SO // Storage order
1378  , bool DF // Density flag
1379  , bool SF // Symmetry flag
1380  , size_t... CCAs // Compile time column arguments
1381  , typename ET > // Type of the element
1383  tryDiv( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1384 {
1385  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1386  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1387 
1388  return tryDiv( column.operand(), index, column.column(), size, 1UL, value );
1389 }
1391 //*************************************************************************************************
1392 
1393 
1394 //*************************************************************************************************
1409 template< typename MT // Type of the matrix
1410  , bool SO // Storage order
1411  , bool DF // Density flag
1412  , bool SF // Symmetry flag
1413  , size_t... CCAs > // Compile time column arguments
1414 inline bool tryShift( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, int count )
1415 {
1416  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1417 
1418  return tryShift( column.operand(), index, column.column(), count );
1419 }
1421 //*************************************************************************************************
1422 
1423 
1424 //*************************************************************************************************
1440 template< typename MT // Type of the matrix
1441  , bool SO // Storage order
1442  , bool DF // Density flag
1443  , bool SF // Symmetry flag
1444  , size_t... CCAs > // Compile time column arguments
1446  tryShift( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, int count )
1447 {
1448  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1449  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1450 
1451  return tryShift( column.operand(), index, column.column(), size, 1UL, count );
1452 }
1454 //*************************************************************************************************
1455 
1456 
1457 //*************************************************************************************************
1472 template< typename MT // Type of the matrix
1473  , bool SO // Storage order
1474  , bool DF // Density flag
1475  , bool SF // Symmetry flag
1476  , size_t... CCAs // Compile time column arguments
1477  , typename ET > // Type of the element
1478 inline bool tryBitand( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1479 {
1480  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1481 
1482  return tryBitand( column.operand(), index, column.column(), value );
1483 }
1485 //*************************************************************************************************
1486 
1487 
1488 //*************************************************************************************************
1504 template< typename MT // Type of the matrix
1505  , bool SO // Storage order
1506  , bool DF // Density flag
1507  , bool SF // Symmetry flag
1508  , size_t... CCAs // Compile time column arguments
1509  , typename ET > // Type of the element
1511  tryBitand( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1512 {
1513  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1514  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1515 
1516  return tryBitand( column.operand(), index, column.column(), size, 1UL, value );
1517 }
1519 //*************************************************************************************************
1520 
1521 
1522 //*************************************************************************************************
1537 template< typename MT // Type of the matrix
1538  , bool SO // Storage order
1539  , bool DF // Density flag
1540  , bool SF // Symmetry flag
1541  , size_t... CCAs // Compile time column arguments
1542  , typename ET > // Type of the element
1543 inline bool tryBitor( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1544 {
1545  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1546 
1547  return tryBitor( column.operand(), index, column.column(), value );
1548 }
1550 //*************************************************************************************************
1551 
1552 
1553 //*************************************************************************************************
1569 template< typename MT // Type of the matrix
1570  , bool SO // Storage order
1571  , bool DF // Density flag
1572  , bool SF // Symmetry flag
1573  , size_t... CCAs // Compile time column arguments
1574  , typename ET > // Type of the element
1576  tryBitor( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1577 {
1578  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1579  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1580 
1581  return tryBitor( column.operand(), index, column.column(), size, 1UL, value );
1582 }
1584 //*************************************************************************************************
1585 
1586 
1587 //*************************************************************************************************
1602 template< typename MT // Type of the matrix
1603  , bool SO // Storage order
1604  , bool DF // Density flag
1605  , bool SF // Symmetry flag
1606  , size_t... CCAs // Compile time column arguments
1607  , typename ET > // Type of the element
1608 inline bool tryBitxor( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, const ET& value )
1609 {
1610  BLAZE_INTERNAL_ASSERT( index < column.size(), "Invalid vector access index" );
1611 
1612  return tryBitxor( column.operand(), index, column.column(), value );
1613 }
1615 //*************************************************************************************************
1616 
1617 
1618 //*************************************************************************************************
1634 template< typename MT // Type of the matrix
1635  , bool SO // Storage order
1636  , bool DF // Density flag
1637  , bool SF // Symmetry flag
1638  , size_t... CCAs // Compile time column arguments
1639  , typename ET > // Type of the element
1641  tryBitxor( const Column<MT,SO,DF,SF,CCAs...>& column, size_t index, size_t size, const ET& value )
1642 {
1643  BLAZE_INTERNAL_ASSERT( index <= (~column).size(), "Invalid vector access index" );
1644  BLAZE_INTERNAL_ASSERT( index + size <= (~column).size(), "Invalid range size" );
1645 
1646  return tryBitxor( column.operand(), index, column.column(), size, 1UL, value );
1647 }
1649 //*************************************************************************************************
1650 
1651 
1652 //*************************************************************************************************
1667 template< typename MT // Type of the matrix
1668  , bool SO // Storage order
1669  , bool DF // Density flag
1670  , bool SF // Symmetry flag
1671  , size_t... CCAs // Compile time column arguments
1672  , typename VT > // Type of the right-hand side vector
1673 inline bool tryAssign( const Column<MT,SO,DF,SF,CCAs...>& lhs,
1674  const Vector<VT,false>& rhs, size_t index )
1675 {
1676  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1677  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1678 
1679  return tryAssign( lhs.operand(), ~rhs, index, lhs.column() );
1680 }
1682 //*************************************************************************************************
1683 
1684 
1685 //*************************************************************************************************
1700 template< typename MT // Type of the matrix
1701  , bool SO // Storage order
1702  , bool DF // Density flag
1703  , bool SF // Symmetry flag
1704  , size_t... CCAs // Compile time column arguments
1705  , typename VT > // Type of the right-hand side vector
1706 inline bool tryAddAssign( const Column<MT,SO,SF,SF,CCAs...>& lhs,
1707  const Vector<VT,false>& rhs, size_t index )
1708 {
1709  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1710  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1711 
1712  return tryAddAssign( lhs.operand(), ~rhs, index, lhs.column() );
1713 }
1715 //*************************************************************************************************
1716 
1717 
1718 //*************************************************************************************************
1733 template< typename MT // Type of the matrix
1734  , bool SO // Storage order
1735  , bool DF // Density flag
1736  , bool SF // Symmetry flag
1737  , size_t... CCAs // Compile time column arguments
1738  , typename VT > // Type of the right-hand side vector
1739 inline bool trySubAssign( const Column<MT,SO,DF,SF,CCAs...>& lhs,
1740  const Vector<VT,false>& rhs, size_t index )
1741 {
1742  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1743  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1744 
1745  return trySubAssign( lhs.operand(), ~rhs, index, lhs.column() );
1746 }
1748 //*************************************************************************************************
1749 
1750 
1751 //*************************************************************************************************
1766 template< typename MT // Type of the matrix
1767  , bool SO // Storage order
1768  , bool DF // Density flag
1769  , bool SF // Symmetry flag
1770  , size_t... CCAs // Compile time column arguments
1771  , typename VT > // Type of the right-hand side vector
1772 inline bool tryMultAssign( const Column<MT,SO,DF,SF,CCAs...>& lhs,
1773  const Vector<VT,false>& rhs, size_t index )
1774 {
1775  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1776  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1777 
1778  return tryMultAssign( lhs.operand(), ~rhs, index, lhs.column() );
1779 }
1781 //*************************************************************************************************
1782 
1783 
1784 //*************************************************************************************************
1799 template< typename MT // Type of the matrix
1800  , bool SO // Storage order
1801  , bool DF // Density flag
1802  , bool SF // Symmetry flag
1803  , size_t... CCAs // Compile time column arguments
1804  , typename VT > // Type of the right-hand side vector
1805 inline bool tryDivAssign( const Column<MT,SO,DF,SF,CCAs...>& lhs,
1806  const Vector<VT,false>& rhs, size_t index )
1807 {
1808  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1809  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1810 
1811  return tryDivAssign( lhs.operand(), ~rhs, index, lhs.column() );
1812 }
1814 //*************************************************************************************************
1815 
1816 
1817 //*************************************************************************************************
1832 template< typename MT // Type of the matrix
1833  , bool SO // Storage order
1834  , bool DF // Density flag
1835  , bool SF // Symmetry flag
1836  , size_t... CCAs // Compile time column arguments
1837  , typename VT > // Type of the right-hand side vector
1838 inline bool tryShiftAssign( const Column<MT,SO,SF,SF,CCAs...>& lhs,
1839  const Vector<VT,false>& rhs, size_t index )
1840 {
1841  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1842  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1843 
1844  return tryShiftAssign( lhs.operand(), ~rhs, index, lhs.column() );
1845 }
1847 //*************************************************************************************************
1848 
1849 
1850 //*************************************************************************************************
1865 template< typename MT // Type of the matrix
1866  , bool SO // Storage order
1867  , bool DF // Density flag
1868  , bool SF // Symmetry flag
1869  , size_t... CCAs // Compile time column arguments
1870  , typename VT > // Type of the right-hand side vector
1871 inline bool tryBitandAssign( const Column<MT,SO,SF,SF,CCAs...>& lhs,
1872  const Vector<VT,false>& rhs, size_t index )
1873 {
1874  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1875  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1876 
1877  return tryBitandAssign( lhs.operand(), ~rhs, index, lhs.column() );
1878 }
1880 //*************************************************************************************************
1881 
1882 
1883 //*************************************************************************************************
1898 template< typename MT // Type of the matrix
1899  , bool SO // Storage order
1900  , bool DF // Density flag
1901  , bool SF // Symmetry flag
1902  , size_t... CCAs // Compile time column arguments
1903  , typename VT > // Type of the right-hand side vector
1904 inline bool tryBitorAssign( const Column<MT,SO,SF,SF,CCAs...>& lhs,
1905  const Vector<VT,false>& rhs, size_t index )
1906 {
1907  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1908  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1909 
1910  return tryBitorAssign( lhs.operand(), ~rhs, index, lhs.column() );
1911 }
1913 //*************************************************************************************************
1914 
1915 
1916 //*************************************************************************************************
1931 template< typename MT // Type of the matrix
1932  , bool SO // Storage order
1933  , bool DF // Density flag
1934  , bool SF // Symmetry flag
1935  , size_t... CCAs // Compile time column arguments
1936  , typename VT > // Type of the right-hand side vector
1937 inline bool tryBitxorAssign( const Column<MT,SO,SF,SF,CCAs...>& lhs,
1938  const Vector<VT,false>& rhs, size_t index )
1939 {
1940  BLAZE_INTERNAL_ASSERT( index <= lhs.size(), "Invalid vector access index" );
1941  BLAZE_INTERNAL_ASSERT( index + (~rhs).size() <= lhs.size(), "Invalid vector size" );
1942 
1943  return tryBitxorAssign( lhs.operand(), ~rhs, index, lhs.column() );
1944 }
1946 //*************************************************************************************************
1947 
1948 
1949 //*************************************************************************************************
1964 template< typename MT // Type of the matrix
1965  , bool SO // Storage order
1966  , bool DF // Density flag
1967  , bool SF // Symmetry flag
1968  , size_t I > // Compile time column arguments
1969 inline decltype(auto) derestrict( Column<MT,SO,DF,SF,I>& c )
1970 {
1971  return column<I>( derestrict( c.operand() ), unchecked );
1972 }
1974 //*************************************************************************************************
1975 
1976 
1977 //*************************************************************************************************
1992 template< typename MT // Type of the matrix
1993  , bool SO // Storage order
1994  , bool DF // Density flag
1995  , bool SF // Symmetry flag
1996  , size_t I > // Compile time column arguments
1997 inline decltype(auto) derestrict( Column<MT,SO,DF,SF,I>&& c )
1998 {
1999  return column<I>( derestrict( c.operand() ), unchecked );
2000 }
2002 //*************************************************************************************************
2003 
2004 
2005 //*************************************************************************************************
2020 template< typename MT // Type of the matrix
2021  , bool SO // Storage order
2022  , bool DF // Density flag
2023  , bool SF > // Symmetry flag
2024 inline decltype(auto) derestrict( Column<MT,SO,DF,SF>& c )
2025 {
2026  return column( derestrict( c.operand() ), c.column(), unchecked );
2027 }
2029 //*************************************************************************************************
2030 
2031 
2032 //*************************************************************************************************
2047 template< typename MT // Type of the matrix
2048  , bool SO // Storage order
2049  , bool DF // Density flag
2050  , bool SF > // Symmetry flag
2051 inline decltype(auto) derestrict( Column<MT,SO,DF,SF>&& c )
2052 {
2053  return column( derestrict( c.operand() ), c.column(), unchecked );
2054 }
2056 //*************************************************************************************************
2057 
2058 
2059 
2060 
2061 //=================================================================================================
2062 //
2063 // SIZE SPECIALIZATIONS
2064 //
2065 //=================================================================================================
2066 
2067 //*************************************************************************************************
2069 template< typename MT, bool SO, bool DF, bool SF, size_t... CRAs >
2070 struct Size< Column<MT,SO,DF,SF,CRAs...>, 0UL >
2071  : public Size<MT,0UL>
2072 {};
2074 //*************************************************************************************************
2075 
2076 
2077 
2078 
2079 //=================================================================================================
2080 //
2081 // MAXSIZE SPECIALIZATIONS
2082 //
2083 //=================================================================================================
2084 
2085 //*************************************************************************************************
2087 template< typename MT, bool SO, bool DF, bool SF, size_t... CRAs >
2088 struct MaxSize< Column<MT,SO,DF,SF,CRAs...>, 0UL >
2089  : public MaxSize<MT,0UL>
2090 {};
2092 //*************************************************************************************************
2093 
2094 
2095 
2096 
2097 //=================================================================================================
2098 //
2099 // ISRESTRICTED SPECIALIZATIONS
2100 //
2101 //=================================================================================================
2102 
2103 //*************************************************************************************************
2105 template< typename MT, bool SO, bool DF, bool SF, size_t... CCAs >
2106 struct IsRestricted< Column<MT,SO,DF,SF,CCAs...> >
2107  : public IsRestricted<MT>
2108 {};
2110 //*************************************************************************************************
2111 
2112 
2113 
2114 
2115 //=================================================================================================
2116 //
2117 // HASCONSTDATAACCESS SPECIALIZATIONS
2118 //
2119 //=================================================================================================
2120 
2121 //*************************************************************************************************
2123 template< typename MT, bool SO, bool SF, size_t... CCAs >
2124 struct HasConstDataAccess< Column<MT,SO,true,SF,CCAs...> >
2125  : public HasConstDataAccess<MT>
2126 {};
2128 //*************************************************************************************************
2129 
2130 
2131 
2132 
2133 //=================================================================================================
2134 //
2135 // HASMUTABLEDATAACCESS SPECIALIZATIONS
2136 //
2137 //=================================================================================================
2138 
2139 //*************************************************************************************************
2141 template< typename MT, bool SO, bool SF, size_t... CCAs >
2142 struct HasMutableDataAccess< Column<MT,SO,true,SF,CCAs...> >
2143  : public HasMutableDataAccess<MT>
2144 {};
2146 //*************************************************************************************************
2147 
2148 
2149 
2150 
2151 //=================================================================================================
2152 //
2153 // ISALIGNED SPECIALIZATIONS
2154 //
2155 //=================================================================================================
2156 
2157 //*************************************************************************************************
2159 template< typename MT, bool SO, bool SF, size_t... CCAs >
2160 struct IsAligned< Column<MT,SO,true,SF,CCAs...> >
2161  : public BoolConstant< IsAligned_v<MT> && ( IsColumnMajorMatrix_v<MT> || IsSymmetric_v<MT> ) >
2162 {};
2164 //*************************************************************************************************
2165 
2166 
2167 
2168 
2169 //=================================================================================================
2170 //
2171 // ISCONTIGOUS SPECIALIZATIONS
2172 //
2173 //=================================================================================================
2174 
2175 //*************************************************************************************************
2177 template< typename MT, bool SF, size_t... CCAs >
2178 struct IsContiguous< Column<MT,true,true,SF,CCAs...> >
2179  : public IsContiguous<MT>
2180 {};
2182 //*************************************************************************************************
2183 
2184 
2185 
2186 
2187 //=================================================================================================
2188 //
2189 // ISPADDED SPECIALIZATIONS
2190 //
2191 //=================================================================================================
2192 
2193 //*************************************************************************************************
2195 template< typename MT, bool SO, bool SF, size_t... CCAs >
2196 struct IsPadded< Column<MT,SO,true,SF,CCAs...> >
2197  : BoolConstant< IsPadded_v<MT> && ( IsColumnMajorMatrix_v<MT> || IsSymmetric_v<MT> ) >
2198 {};
2200 //*************************************************************************************************
2201 
2202 
2203 
2204 
2205 //=================================================================================================
2206 //
2207 // ISOPPOSEDVIEW SPECIALIZATIONS
2208 //
2209 //=================================================================================================
2210 
2211 //*************************************************************************************************
2213 template< typename MT, bool DF, size_t... CCAs >
2214 struct IsOpposedView< Column<MT,false,DF,false,CCAs...> >
2215  : public TrueType
2216 {};
2218 //*************************************************************************************************
2219 
2220 } // namespace blaze
2221 
2222 #endif
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:133
Header file for the blaze::checked and blaze::unchecked instances.
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:992
Header file for basic type definitions.
Header file for the implementation of a uniform vector.
Header file for the MatTransExpr base class.
Header file for the IsColumnMajorMatrix type trait.
Header file for the implementation of the Column base template.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
constexpr Unchecked unchecked
Global Unchecked instance.The blaze::unchecked instance is an optional token for the creation of view...
Definition: Check.h:138
Header file for the MatEvalExpr base class.
decltype(auto) subvector(Vector< VT, TF > &, RSAs...)
Creating a view on a specific subvector of the given vector.
Definition: Subvector.h:154
Header file for the MAYBE_UNUSED function template.
Header file for the MatMatMultExpr base class.
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 the MaxSize type trait.
decltype(auto) kron(const DenseMatrix< MT1, SO1 > &lhs, const DenseMatrix< MT2, SO2 > &rhs)
Computes the Kronecker product of two dense matrices ( ).
Definition: DMatDMatKronExpr.h:954
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
Header file for the MatMatKronExpr base class.
Column specialization for dense matrices.
Header file for the MatMapExpr base class.
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 MatMatSubExpr base class.
constexpr bool Contains_v
Auxiliary variable template for the Contains type trait.The Contains_v variable template provides a c...
Definition: Contains.h:138
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 IsOpposedView type trait.
decltype(auto) eval(const DenseMatrix< MT, SO > &dm)
Forces the evaluation of the given dense matrix expression dm.
Definition: DMatEvalExpr.h:786
Header file for the exception macros of the math module.
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:615
Header file for the IsPadded type trait.
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 MatScalarMultExpr base class.
Header file for run time assertion macros.
Header file for the Unique class template.
Header file for the IsContiguous type trait.
Check< false > Unchecked
Type of the blaze::unchecked instance.blaze::Unchecked is the type of the blaze::unchecked instance,...
Definition: Check.h:96
Header file for the SchurExpr base class.
#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
Header file for the isDefault shim.
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:114
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
Header file for the HasMutableDataAccess type trait.
Header file for the MatMatAddExpr base class.
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant alias template represents ...
Definition: IntegralConstant.h:110
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition: DMatTransExpr.h:765
Header file for the VecExpandExpr base class.
Header file for the MatMatMapExpr base class.
Header file for the IntegralConstant class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
Column specialization for sparse matrices.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
Header file for the implementation of the ColumnData class template.
Header file for the MatScalarDivExpr base class.
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 function trace functionality.
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:1121