35 #ifndef _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
107 template<
typename MT,
bool SO,
bool DF >
108 inline void reset( DiagonalMatrix<MT,SO,DF>& m );
110 template<
typename MT,
bool SO,
bool DF >
111 inline void reset( DiagonalMatrix<MT,SO,DF>& m,
size_t i );
113 template<
typename MT,
bool SO,
bool DF >
114 inline void clear( DiagonalMatrix<MT,SO,DF>& m );
116 template<
typename MT,
bool SO,
bool DF >
117 inline bool isDefault(
const DiagonalMatrix<MT,SO,DF>& m );
119 template<
typename MT,
bool SO,
bool DF >
120 inline bool isIntact(
const DiagonalMatrix<MT,SO,DF>& m );
122 template<
typename MT,
bool SO,
bool DF >
123 inline void swap( DiagonalMatrix<MT,SO,DF>& a, DiagonalMatrix<MT,SO,DF>& b ) noexcept;
135 template<
typename MT
158 template<
typename MT
175 template<
typename MT
206 template<
typename MT
237 template<
typename MT
255 template<
typename MT
291 inline void invert( DiagonalMatrix<MT,SO,true>& m )
300 invert<asDiagonal>( derestrict( m ) );
327 template<
typename MT1,
bool SO1,
typename MT2,
typename MT3,
typename MT4,
bool SO2 >
328 inline void lu(
const DiagonalMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
329 DenseMatrix<MT3,SO1>& U, Matrix<MT4,SO2>& P )
343 typedef ElementType_<MT3> ET3;
344 typedef ElementType_<MT4> ET4;
346 const size_t n( (~A).
rows() );
348 DerestrictTrait_<MT3> U2( derestrict( ~U ) );
358 for(
size_t i=0UL; i<n; ++i ) {
383 template<
typename MT
387 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
388 const DenseVector<VT,false>& rhs,
size_t row,
size_t column )
398 const size_t index( ( column <= row )?( 0UL ):( column - row ) );
400 for(
size_t i=0UL; i<index; ++i ) {
405 for(
size_t i=index+1UL; i<(~rhs).
size(); ++i ) {
432 template<
typename MT
436 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
437 const DenseVector<VT,true>& rhs,
size_t row,
size_t column )
447 const size_t index( ( row <= column )?( 0UL ):( row - column ) );
449 for(
size_t i=0UL; i<index; ++i ) {
454 for(
size_t i=index+1UL; i<(~rhs).
size(); ++i ) {
481 template<
typename MT
485 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
486 const SparseVector<VT,false>& rhs,
size_t row,
size_t column )
498 const size_t index( column - row );
500 for( RhsIterator element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
501 if( element->index() != index && !
isDefault( element->value() ) )
527 template<
typename MT
531 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
532 const SparseVector<VT,true>& rhs,
size_t row,
size_t column )
544 const size_t index( row - column );
546 for( RhsIterator element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
547 if( element->index() != index && !
isDefault( element->value() ) )
573 template<
typename MT1
577 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
578 const DenseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
589 const size_t M( (~rhs).
rows() );
590 const size_t N( (~rhs).
columns() );
592 for(
size_t i=0UL; i<M; ++i ) {
593 for(
size_t j=0UL; j<N; ++j ) {
594 if( ( row + i != column + j ) && !
isDefault( (~rhs)(i,j) ) )
621 template<
typename MT1
625 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
626 const DenseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
637 const size_t M( (~rhs).
rows() );
638 const size_t N( (~rhs).
columns() );
640 for(
size_t j=0UL; j<N; ++j ) {
641 for(
size_t i=0UL; i<M; ++i ) {
642 if( ( column + j != row + i ) && !
isDefault( (~rhs)(i,j) ) )
669 template<
typename MT1
673 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
674 const SparseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
687 const size_t M( (~rhs).
rows() );
689 for(
size_t i=0UL; i<M; ++i ) {
690 for( RhsIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element ) {
691 if( ( row + i != column + element->index() ) && !
isDefault( element->value() ) )
718 template<
typename MT1
722 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
723 const SparseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
736 const size_t N( (~rhs).
columns() );
738 for(
size_t j=0UL; j<N; ++j ) {
739 for( RhsIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element ) {
740 if( ( column + j != row + element->index() ) && !
isDefault( element->value() ) )
767 template<
typename MT
772 inline bool tryAddAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
773 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
775 return tryAssign( lhs, ~rhs, row, column );
797 template<
typename MT1
802 inline bool tryAddAssign(
const DiagonalMatrix<MT1,SO1,DF>& lhs,
803 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
805 return tryAssign( lhs, ~rhs, row, column );
828 template<
typename MT
833 inline bool trySubAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
834 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
836 return tryAssign( lhs, ~rhs, row, column );
859 template<
typename MT1
864 inline bool trySubAssign(
const DiagonalMatrix<MT1,SO1,DF>& lhs,
865 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
867 return tryAssign( lhs, ~rhs, row, column );
888 template<
typename MT
891 inline MT& derestrict( DiagonalMatrix<MT,SO,DF>& m )
909 template<
typename MT,
bool SO,
bool DF >
910 struct Rows< DiagonalMatrix<MT,SO,DF> > :
public Rows<MT>
926 template<
typename MT,
bool SO,
bool DF >
927 struct Columns< DiagonalMatrix<MT,SO,DF> > :
public Columns<MT>
943 template<
typename MT,
bool SO,
bool DF >
944 struct IsSquare< DiagonalMatrix<MT,SO,DF> > :
public TrueType
960 template<
typename MT,
bool SO,
bool DF >
961 struct IsSymmetric< DiagonalMatrix<MT,SO,DF> > :
public TrueType
977 template<
typename MT,
bool SO,
bool DF >
978 struct IsHermitian< DiagonalMatrix<MT,SO,DF> >
979 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
995 template<
typename MT,
bool SO,
bool DF >
996 struct IsLower< DiagonalMatrix<MT,SO,DF> > :
public TrueType
1012 template<
typename MT,
bool SO,
bool DF >
1013 struct IsUpper< DiagonalMatrix<MT,SO,DF> > :
public TrueType
1029 template<
typename MT,
bool SO,
bool DF >
1030 struct IsAdaptor< DiagonalMatrix<MT,SO,DF> > :
public TrueType
1046 template<
typename MT,
bool SO,
bool DF >
1047 struct IsRestricted< DiagonalMatrix<MT,SO,DF> > :
public TrueType
1063 template<
typename MT,
bool SO >
1064 struct HasConstDataAccess< DiagonalMatrix<MT,SO,true> > :
public TrueType
1080 template<
typename MT,
bool SO,
bool DF >
1081 struct IsAligned< DiagonalMatrix<MT,SO,DF> > :
public BoolConstant< IsAligned<MT>::value >
1097 template<
typename MT,
bool SO,
bool DF >
1098 struct IsPadded< DiagonalMatrix<MT,SO,DF> > :
public BoolConstant< IsPadded<MT>::value >
1114 template<
typename MT,
bool SO,
bool DF >
1115 struct IsResizable< DiagonalMatrix<MT,SO,DF> > :
public BoolConstant< IsResizable<MT>::value >
1131 template<
typename MT,
bool SO,
bool DF >
1132 struct RemoveAdaptor< DiagonalMatrix<MT,SO,DF> >
1150 template<
typename MT,
bool SO,
bool DF >
1151 struct DerestrictTrait< DiagonalMatrix<MT,SO,DF> >
1169 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1170 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1172 using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1175 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1176 struct AddTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1178 using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1181 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1182 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1184 using Type = AddTrait< MT, HybridMatrix<T,M,N,SO2> >;
1187 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1188 struct AddTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1190 using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1193 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1194 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1196 using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1199 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1200 struct AddTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1202 using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1205 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1206 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1208 using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1211 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1212 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1214 using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1217 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1218 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1220 using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
1223 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1224 struct AddTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1226 using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1229 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1230 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1232 using Type = AddTrait_<MT1,MT2>;
1235 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1236 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1238 using Type = AddTrait_<MT1,MT2>;
1241 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1242 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1244 using Type = AddTrait_<MT1,MT2>;
1247 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1248 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1250 using Type = AddTrait_<MT1,MT2>;
1253 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1254 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1256 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1259 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1260 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1262 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1265 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1266 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1268 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1271 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1272 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1274 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1277 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1278 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1280 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1283 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1284 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1286 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1289 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1290 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1292 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1295 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1296 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1298 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1301 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1302 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1304 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1307 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1308 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1310 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1313 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1314 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1316 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1319 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1320 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1322 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1325 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1326 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1328 using Type = DiagonalMatrix< AddTrait_<MT1,MT2> >;
1344 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1345 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1347 using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1350 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1351 struct SubTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1353 using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1356 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1357 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1359 using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1362 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1363 struct SubTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1365 using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1368 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1369 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1371 using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1374 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1375 struct SubTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1377 using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1380 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1381 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1383 using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1386 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1387 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1389 using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1392 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1393 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1395 using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
1398 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1399 struct SubTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1401 using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1404 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1405 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1407 using Type = SubTrait_<MT1,MT2>;
1410 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1411 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1413 using Type = SubTrait_<MT1,MT2>;
1416 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1417 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1419 using Type = SubTrait_<MT1,MT2>;
1422 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1423 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1425 using Type = SubTrait_<MT1,MT2>;
1428 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1429 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1431 using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1434 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1435 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1437 using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1440 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1441 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1443 using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1446 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1447 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1449 using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1452 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1453 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1455 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1458 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1459 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1461 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1464 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1465 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1467 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1470 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1471 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1473 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1476 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1477 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1479 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1482 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1483 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1485 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1488 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1489 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1491 using Type = DiagonalMatrix< SubTrait_<MT1,MT2> >;
1507 template<
typename MT,
bool SO,
bool DF,
typename T >
1508 struct MultTrait< DiagonalMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1510 using Type = DiagonalMatrix< MultTrait_<MT,T> >;
1513 template<
typename T,
typename MT,
bool SO,
bool DF >
1514 struct MultTrait< T, DiagonalMatrix<MT,SO,DF>,
EnableIf_< IsNumeric<T> > >
1516 using Type = DiagonalMatrix< MultTrait_<T,MT> >;
1519 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1520 struct MultTrait< DiagonalMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1522 using Type = MultTrait_< MT, StaticVector<T,N,false> >;
1525 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1526 struct MultTrait< StaticVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
1528 using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1531 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1532 struct MultTrait< DiagonalMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1534 using Type = MultTrait_< MT, HybridVector<T,N,false> >;
1537 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1538 struct MultTrait< HybridVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
1540 using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1543 template<
typename MT,
bool SO,
bool DF,
typename T >
1544 struct MultTrait< DiagonalMatrix<MT,SO,DF>, DynamicVector<T,false> >
1546 using Type = MultTrait_< MT, DynamicVector<T,false> >;
1549 template<
typename T,
typename MT,
bool SO,
bool DF >
1550 struct MultTrait< DynamicVector<T,true>, DiagonalMatrix<MT,SO,DF> >
1552 using Type = MultTrait_< DynamicVector<T,true>, MT >;
1555 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1556 struct MultTrait< DiagonalMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1558 using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
1561 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1562 struct MultTrait< CustomVector<T,AF,PF,true>, DiagonalMatrix<MT,SO,DF> >
1564 using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1567 template<
typename MT,
bool SO,
bool DF,
typename T >
1568 struct MultTrait< DiagonalMatrix<MT,SO,DF>, CompressedVector<T,false> >
1570 using Type = MultTrait_< MT, CompressedVector<T,false> >;
1573 template<
typename T,
typename MT,
bool SO,
bool DF >
1574 struct MultTrait< CompressedVector<T,true>, DiagonalMatrix<MT,SO,DF> >
1576 using Type = MultTrait_< CompressedVector<T,true>, MT >;
1579 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1580 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1582 using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1585 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1586 struct MultTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1588 using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1591 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1592 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1594 using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1597 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1598 struct MultTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1600 using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1603 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1604 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1606 using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1609 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1610 struct MultTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1612 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1615 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1616 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1618 using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1621 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1622 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1624 using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1627 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1628 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1630 using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
1633 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1634 struct MultTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1636 using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1639 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1640 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1642 using Type = MultTrait_<MT1,MT2>;
1645 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1646 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1648 using Type = MultTrait_<MT1,MT2>;
1651 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1652 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1654 using Type = MultTrait_<MT1,MT2>;
1657 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1658 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1660 using Type = MultTrait_<MT1,MT2>;
1663 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1664 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1666 using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1669 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1670 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1672 using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1675 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1676 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1678 using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1681 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1682 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1684 using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1687 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1688 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1690 using Type = StrictlyLowerMatrix< MultTrait_<MT1,MT2> >;
1693 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1694 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1696 using Type = StrictlyLowerMatrix< MultTrait_<MT1,MT2> >;
1699 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1700 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1702 using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
1705 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1706 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1708 using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
1711 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1712 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1714 using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
1717 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1718 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1720 using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
1723 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1724 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1726 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1729 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1730 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1732 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1735 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1736 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1738 using Type = DiagonalMatrix< MultTrait_<MT1,MT2> >;
1754 template<
typename MT,
bool SO,
bool DF,
typename T >
1755 struct DivTrait< DiagonalMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1757 using Type = DiagonalMatrix< DivTrait_<MT,T> >;
1773 template<
typename MT,
bool SO,
bool DF >
1774 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Abs >
1776 using Type = DiagonalMatrix< ForEachTrait_<MT,Abs> >;
1779 template<
typename MT,
bool SO,
bool DF >
1780 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Floor >
1782 using Type = DiagonalMatrix< ForEachTrait_<MT,Floor> >;
1785 template<
typename MT,
bool SO,
bool DF >
1786 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Ceil >
1788 using Type = DiagonalMatrix< ForEachTrait_<MT,Ceil> >;
1791 template<
typename MT,
bool SO,
bool DF >
1792 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Conj >
1794 using Type = DiagonalMatrix< ForEachTrait_<MT,Conj> >;
1797 template<
typename MT,
bool SO,
bool DF >
1798 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Real >
1800 using Type = DiagonalMatrix< ForEachTrait_<MT,Real> >;
1803 template<
typename MT,
bool SO,
bool DF >
1804 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Imag >
1806 using Type = DiagonalMatrix< ForEachTrait_<MT,Imag> >;
1809 template<
typename MT,
bool SO,
bool DF >
1810 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Sin >
1812 using Type = DiagonalMatrix< ForEachTrait_<MT,Sin> >;
1815 template<
typename MT,
bool SO,
bool DF >
1816 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Asin >
1818 using Type = DiagonalMatrix< ForEachTrait_<MT,Asin> >;
1821 template<
typename MT,
bool SO,
bool DF >
1822 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Sinh >
1824 using Type = DiagonalMatrix< ForEachTrait_<MT,Sinh> >;
1827 template<
typename MT,
bool SO,
bool DF >
1828 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Asinh >
1830 using Type = DiagonalMatrix< ForEachTrait_<MT,Asinh> >;
1833 template<
typename MT,
bool SO,
bool DF >
1834 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Tan >
1836 using Type = DiagonalMatrix< ForEachTrait_<MT,Tan> >;
1839 template<
typename MT,
bool SO,
bool DF >
1840 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Atan >
1842 using Type = DiagonalMatrix< ForEachTrait_<MT,Atan> >;
1845 template<
typename MT,
bool SO,
bool DF >
1846 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Tanh >
1848 using Type = DiagonalMatrix< ForEachTrait_<MT,Tanh> >;
1851 template<
typename MT,
bool SO,
bool DF >
1852 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Atanh >
1854 using Type = DiagonalMatrix< ForEachTrait_<MT,Atanh> >;
1857 template<
typename MT,
bool SO,
bool DF >
1858 struct ForEachTrait< DiagonalMatrix<MT,SO,DF>, Erf >
1860 using Type = DiagonalMatrix< ForEachTrait_<MT,Erf> >;
1876 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1877 struct MathTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1879 using HighType = DiagonalMatrix< typename MathTrait<MT1,MT2>::HighType >;
1880 using LowType = DiagonalMatrix< typename MathTrait<MT1,MT2>::LowType >;
1896 template<
typename MT,
bool SO,
bool DF >
1897 struct SubmatrixTrait< DiagonalMatrix<MT,SO,DF> >
1899 using Type = SubmatrixTrait_<MT>;
1915 template<
typename MT,
bool SO,
bool DF >
1916 struct RowTrait< DiagonalMatrix<MT,SO,DF> >
1918 using Type = RowTrait_<MT>;
1934 template<
typename MT,
bool SO,
bool DF >
1935 struct ColumnTrait< DiagonalMatrix<MT,SO,DF> >
1937 using Type = ColumnTrait_<MT>;
Header file for auxiliary alias declarations.
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
Header file for the row trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
Header file for the dense matrix inversion flags.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Constraint on the data type.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:126
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Constraint on the data type.
Header file for the IsSquare type trait.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
Constraint on the data type.
Header file for the multiplication trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
void lu(const DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO1 > &L, DenseMatrix< MT3, SO1 > &U, Matrix< MT4, SO2 > &P)
LU decomposition of the given dense matrix.
Definition: LU.h:219
Header file for the Columns type trait.
DiagonalMatrix specialization for dense matrices.
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
Header file for the exception macros of the math module.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:538
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:254
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Header file for the implementation of the base template of the StrictlyUpperMatrix.
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
Header file for the DerestrictTrait class template.
Constraint on the data type.
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:126
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for run time assertion macros.
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
Header file for the column trait.
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:258
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a BLAS compatible data type (i...
Definition: BLASCompatible.h:61
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.The BoolConstant class template represents ...
Definition: IntegralConstant.h:100
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:223
Header file for the mathematical trait.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
Header file for the implementation of the base template of the DiagonalMatrix.
Header file for the implementation of the base template of the LowerMatrix.
Header file for the IsBuiltin type trait.
Header file for the for-each trait.
Header file for the isDivisor shim.
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:240
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:556
Header file for the IsUpper type trait.
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the implementation of the base template of the UpperMatrix.
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
Header file for the IsHermitian type trait.
Header file for the IsResizable type trait.
Header file for the IsRestricted 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
DiagonalMatrix specialization for sparse matrices.
Header file for the TrueType type/value trait base class.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1593