35 #ifndef _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
104 template<
typename MT,
bool SO,
bool DF >
105 inline void reset( DiagonalMatrix<MT,SO,DF>& m );
107 template<
typename MT,
bool SO,
bool DF >
108 inline void reset( DiagonalMatrix<MT,SO,DF>& m,
size_t i );
110 template<
typename MT,
bool SO,
bool DF >
111 inline void clear( DiagonalMatrix<MT,SO,DF>& m );
113 template<
typename MT,
bool SO,
bool DF >
114 inline bool isDefault(
const DiagonalMatrix<MT,SO,DF>& m );
116 template<
typename MT,
bool SO,
bool DF >
117 inline bool isIntact(
const DiagonalMatrix<MT,SO,DF>& m );
119 template<
typename MT,
bool SO,
bool DF >
120 inline void swap( DiagonalMatrix<MT,SO,DF>& a, DiagonalMatrix<MT,SO,DF>& b ) ;
132 template<
typename MT
155 template<
typename MT
172 template<
typename MT
203 template<
typename MT
234 template<
typename MT
253 template<
typename MT
279 template<
typename MT
281 inline void invert2x2( DiagonalMatrix<MT,SO,true>& m )
290 typename DerestrictTrait<MT>::Type A( derestrict( m ) );
292 const ET
det( A(0,0) * A(1,1) );
298 const ET idet( ET(1) /
det );
299 const ET a11( A(0,0) * idet );
301 A(0,0) = A(1,1) * idet;
326 template<
typename MT
328 inline void invert3x3( DiagonalMatrix<MT,SO,true>& m )
337 typename DerestrictTrait<MT>::Type A( derestrict( m ) );
339 const ET tmp1( A(0,0)*A(1,1) );
340 const ET tmp2( A(0,0)*A(2,2) );
342 const ET
det( tmp1*A(2,2) );
348 const ET idet( ET(1) /
det );
350 A(0,0) = A(1,1)*A(2,2)*idet;
376 template<
typename MT
378 inline void invert4x4( DiagonalMatrix<MT,SO,true>& m )
387 typename DerestrictTrait<MT>::Type A( derestrict( m ) );
389 const ET tmp1( A(2,2)*A(3,3) );
390 const ET tmp2( A(0,0)*A(1,1) );
391 const ET tmp3( A(0,0)*tmp1 );
392 const ET tmp4( A(2,2)*tmp2 );
394 const ET
det( tmp1 * tmp2 );
400 const ET idet( ET(1) /
det );
402 A(0,0) = A(1,1)*tmp1*idet;
404 A(2,2) = A(3,3)*tmp2*idet;
429 template<
typename MT
431 inline void invert5x5( DiagonalMatrix<MT,SO,true>& m )
440 typename DerestrictTrait<MT>::Type A( derestrict( m ) );
442 const ET tmp1( A(0,0)*A(1,1) );
443 const ET tmp2( A(3,3)*A(4,4) );
444 const ET tmp3( A(0,0)*tmp2 );
445 const ET tmp4( tmp1*A(2,2) );
446 const ET tmp5( tmp4*A(3,3) );
448 const ET
det( tmp2*tmp4 );
454 const ET idet( ET(1) /
det );
456 A(0,0) = A(1,1)*A(2,2)*tmp2*idet;
457 A(1,1) = A(2,2)*tmp3*idet;
458 A(2,2) = tmp1*tmp2*idet;
459 A(3,3) = tmp4*A(4,4)*idet;
484 template<
typename MT
486 inline void invert6x6( DiagonalMatrix<MT,SO,true>& m )
495 typename DerestrictTrait<MT>::Type A( derestrict( m ) );
497 const ET tmp1( A(0,0)*A(1,1) );
498 const ET tmp2( A(3,3)*A(4,4) );
499 const ET tmp3( tmp1*A(2,2) );
500 const ET tmp4( tmp2*A(5,5) );
501 const ET tmp5( A(0,0)*tmp4 );
502 const ET tmp6( tmp3*A(3,3) );
504 const ET
det( tmp3*tmp4 );
510 const ET idet( ET(1) /
det );
512 A(0,0) = A(1,1)*A(2,2)*tmp4*idet;
513 A(1,1) = tmp5*A(2,2)*idet;
514 A(2,2) = tmp1*tmp4*idet;
515 A(3,3) = tmp3*A(4,4)*A(5,5)*idet;
516 A(4,4) = tmp6*A(5,5)*idet;
517 A(5,5) = tmp2*tmp3*idet;
548 inline void invertNxN( DiagonalMatrix<MT,SO,true>& m )
552 MT& A( derestrict( m ) );
554 for(
size_t i=0UL; i<A.rows(); ++i )
588 template<
typename MT1,
bool SO1,
typename MT2,
typename MT3,
typename MT4,
bool SO2 >
589 inline void lu(
const DiagonalMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
590 DenseMatrix<MT3,SO1>& U, Matrix<MT4,SO2>& P )
607 const size_t n( (~A).
rows() );
609 typename DerestrictTrait<MT3>::Type U2( derestrict( ~U ) );
619 for(
size_t i=0UL; i<n; ++i ) {
644 template<
typename MT
648 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
649 const DenseVector<VT,false>& rhs,
size_t row,
size_t column )
659 const size_t index( ( column <= row )?( 0UL ):( column - row ) );
661 for(
size_t i=0UL; i<index; ++i ) {
666 for(
size_t i=index+1UL; i<(~rhs).
size(); ++i ) {
693 template<
typename MT
697 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
698 const DenseVector<VT,true>& rhs,
size_t row,
size_t column )
708 const size_t index( ( row <= column )?( 0UL ):( row - column ) );
710 for(
size_t i=0UL; i<index; ++i ) {
715 for(
size_t i=index+1UL; i<(~rhs).
size(); ++i ) {
742 template<
typename MT
746 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
747 const SparseVector<VT,false>& rhs,
size_t row,
size_t column )
759 const size_t index( column - row );
761 for( RhsIterator element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
762 if( element->index() != index && !
isDefault( element->value() ) )
788 template<
typename MT
792 inline bool tryAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
793 const SparseVector<VT,true>& rhs,
size_t row,
size_t column )
805 const size_t index( row - column );
807 for( RhsIterator element=(~rhs).
begin(); element!=(~rhs).
end(); ++element ) {
808 if( element->index() != index && !
isDefault( element->value() ) )
834 template<
typename MT1
838 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
839 const DenseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
850 const size_t M( (~rhs).
rows() );
851 const size_t N( (~rhs).
columns() );
853 for(
size_t i=0UL; i<M; ++i ) {
854 for(
size_t j=0UL; j<N; ++j ) {
855 if( ( row + i != column + j ) && !
isDefault( (~rhs)(i,j) ) )
882 template<
typename MT1
886 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
887 const DenseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
898 const size_t M( (~rhs).
rows() );
899 const size_t N( (~rhs).
columns() );
901 for(
size_t j=0UL; j<N; ++j ) {
902 for(
size_t i=0UL; i<M; ++i ) {
903 if( ( column + j != row + i ) && !
isDefault( (~rhs)(i,j) ) )
930 template<
typename MT1
934 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
935 const SparseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
948 const size_t M( (~rhs).
rows() );
950 for(
size_t i=0UL; i<M; ++i ) {
951 for( RhsIterator element=(~rhs).
begin(i); element!=(~rhs).
end(i); ++element ) {
952 if( ( row + i != column + element->index() ) && !
isDefault( element->value() ) )
979 template<
typename MT1
983 inline bool tryAssign(
const DiagonalMatrix<MT1,SO,DF>& lhs,
984 const SparseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
997 const size_t N( (~rhs).
columns() );
999 for(
size_t j=0UL; j<N; ++j ) {
1000 for( RhsIterator element=(~rhs).
begin(j); element!=(~rhs).
end(j); ++element ) {
1001 if( ( column + j != row + element->index() ) && !
isDefault( element->value() ) )
1028 template<
typename MT
1033 inline bool tryAddAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
1034 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
1036 return tryAssign( lhs, ~rhs, row, column );
1058 template<
typename MT1
1063 inline bool tryAddAssign(
const DiagonalMatrix<MT1,SO1,DF>& lhs,
1064 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
1066 return tryAssign( lhs, ~rhs, row, column );
1089 template<
typename MT
1094 inline bool trySubAssign(
const DiagonalMatrix<MT,SO,DF>& lhs,
1095 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
1097 return tryAssign( lhs, ~rhs, row, column );
1120 template<
typename MT1
1125 inline bool trySubAssign(
const DiagonalMatrix<MT1,SO1,DF>& lhs,
1126 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
1128 return tryAssign( lhs, ~rhs, row, column );
1149 template<
typename MT
1152 inline MT& derestrict( DiagonalMatrix<MT,SO,DF>& m )
1170 template<
typename MT,
bool SO,
bool DF >
1171 struct Rows< DiagonalMatrix<MT,SO,DF> > :
public Rows<MT>
1187 template<
typename MT,
bool SO,
bool DF >
1188 struct Columns< DiagonalMatrix<MT,SO,DF> > :
public Columns<MT>
1204 template<
typename MT,
bool SO,
bool DF >
1205 struct IsSquare< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1221 template<
typename MT,
bool SO,
bool DF >
1222 struct IsSymmetric< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1238 template<
typename MT,
bool SO,
bool DF >
1239 struct IsHermitian< DiagonalMatrix<MT,SO,DF> >
1240 :
public IsTrue< IsBuiltin<typename MT::ElementType>::value >
1256 template<
typename MT,
bool SO,
bool DF >
1257 struct IsLower< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1273 template<
typename MT,
bool SO,
bool DF >
1274 struct IsUpper< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1290 template<
typename MT,
bool SO,
bool DF >
1291 struct IsAdaptor< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1307 template<
typename MT,
bool SO,
bool DF >
1308 struct IsRestricted< DiagonalMatrix<MT,SO,DF> > :
public IsTrue<true>
1324 template<
typename MT,
bool SO >
1325 struct HasConstDataAccess< DiagonalMatrix<MT,SO,true> > :
public IsTrue<true>
1341 template<
typename MT,
bool SO,
bool DF >
1342 struct IsAligned< DiagonalMatrix<MT,SO,DF> > :
public IsTrue< IsAligned<MT>::value >
1358 template<
typename MT,
bool SO,
bool DF >
1359 struct IsPadded< DiagonalMatrix<MT,SO,DF> > :
public IsTrue< IsPadded<MT>::value >
1375 template<
typename MT,
bool SO,
bool DF >
1376 struct IsResizable< DiagonalMatrix<MT,SO,DF> > :
public IsTrue< IsResizable<MT>::value >
1392 template<
typename MT,
bool SO,
bool DF >
1393 struct RemoveAdaptor< DiagonalMatrix<MT,SO,DF> >
1411 template<
typename MT,
bool SO,
bool DF >
1412 struct DerestrictTrait< DiagonalMatrix<MT,SO,DF> >
1430 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1431 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1433 typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1436 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1437 struct AddTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1439 typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1442 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1443 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1445 typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1448 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1449 struct AddTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1451 typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1454 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1455 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1457 typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1460 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1461 struct AddTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1463 typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1466 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1467 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1469 typedef typename AddTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1472 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1473 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1475 typedef typename AddTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1478 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1479 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1481 typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1484 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1485 struct AddTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1487 typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1490 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1491 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1493 typedef typename AddTrait<MT1,MT2>::Type Type;
1496 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1497 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1499 typedef typename AddTrait<MT1,MT2>::Type Type;
1502 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1503 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1505 typedef typename AddTrait<MT1,MT2>::Type Type;
1508 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1509 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1511 typedef typename AddTrait<MT1,MT2>::Type Type;
1514 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1515 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1517 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1520 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1521 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1523 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1526 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1527 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1529 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1532 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1533 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1535 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1538 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1539 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1541 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1544 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1545 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1547 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1550 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1551 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1553 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1556 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1557 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1559 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1562 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1563 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1565 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1568 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1569 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1571 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1574 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1575 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1577 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1580 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1581 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1583 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1586 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1587 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1589 typedef DiagonalMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1605 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1606 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1608 typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1611 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1612 struct SubTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1614 typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1617 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1618 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1620 typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1623 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1624 struct SubTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1626 typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1629 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1630 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1632 typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1635 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1636 struct SubTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1638 typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1641 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1642 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1644 typedef typename SubTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1647 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1648 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1650 typedef typename SubTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1653 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1654 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1656 typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1659 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1660 struct SubTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1662 typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1665 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1666 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1668 typedef typename SubTrait<MT1,MT2>::Type Type;
1671 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1672 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1674 typedef typename SubTrait<MT1,MT2>::Type Type;
1677 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1678 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1680 typedef typename SubTrait<MT1,MT2>::Type Type;
1683 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1684 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1686 typedef typename SubTrait<MT1,MT2>::Type Type;
1689 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1690 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1692 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1695 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1696 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1698 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1701 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1702 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1704 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1707 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1708 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1710 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1713 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1714 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1716 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1719 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1720 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1722 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1725 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1726 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1728 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1731 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1732 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1734 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1737 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1738 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1740 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1743 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1744 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1746 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1749 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1750 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1752 typedef DiagonalMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1768 template<
typename MT,
bool SO,
bool DF,
typename T >
1769 struct MultTrait< DiagonalMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
1771 typedef DiagonalMatrix< typename MultTrait<MT,T>::Type > Type;
1774 template<
typename T,
typename MT,
bool SO,
bool DF >
1775 struct MultTrait< T, DiagonalMatrix<MT,SO,DF>, typename EnableIf< IsNumeric<T> >::Type >
1777 typedef DiagonalMatrix< typename MultTrait<T,MT>::Type > Type;
1780 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1781 struct MultTrait< DiagonalMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1783 typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
1786 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1787 struct MultTrait< StaticVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
1789 typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
1792 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1793 struct MultTrait< DiagonalMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1795 typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
1798 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1799 struct MultTrait< HybridVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
1801 typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
1804 template<
typename MT,
bool SO,
bool DF,
typename T >
1805 struct MultTrait< DiagonalMatrix<MT,SO,DF>, DynamicVector<T,false> >
1807 typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
1810 template<
typename T,
typename MT,
bool SO,
bool DF >
1811 struct MultTrait< DynamicVector<T,true>, DiagonalMatrix<MT,SO,DF> >
1813 typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
1816 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1817 struct MultTrait< DiagonalMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1819 typedef typename MultTrait< MT, CustomVector<T,AF,PF,false> >::Type Type;
1822 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1823 struct MultTrait< CustomVector<T,AF,PF,true>, DiagonalMatrix<MT,SO,DF> >
1825 typedef typename MultTrait< CustomVector<T,AF,PF,true>, MT >::Type Type;
1828 template<
typename MT,
bool SO,
bool DF,
typename T >
1829 struct MultTrait< DiagonalMatrix<MT,SO,DF>, CompressedVector<T,false> >
1831 typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
1834 template<
typename T,
typename MT,
bool SO,
bool DF >
1835 struct MultTrait< CompressedVector<T,true>, DiagonalMatrix<MT,SO,DF> >
1837 typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
1840 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1841 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1843 typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1846 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1847 struct MultTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1849 typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1852 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1853 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1855 typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1858 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1859 struct MultTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
1861 typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1864 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1865 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1867 typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1870 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1871 struct MultTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1873 typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1876 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1877 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1879 typedef typename MultTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1882 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1883 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, DiagonalMatrix<MT,SO2,DF> >
1885 typedef typename MultTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1888 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1889 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1891 typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1894 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1895 struct MultTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
1897 typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1900 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1901 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1903 typedef typename MultTrait<MT1,MT2>::Type Type;
1906 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1907 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
1909 typedef typename MultTrait<MT1,MT2>::Type Type;
1912 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1913 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1915 typedef typename MultTrait<MT1,MT2>::Type Type;
1918 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1919 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1921 typedef typename MultTrait<MT1,MT2>::Type Type;
1924 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1925 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1927 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1930 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1931 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1933 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1936 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1937 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1939 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1942 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1943 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1945 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1948 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1949 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1951 typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1954 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1955 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1957 typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1960 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1961 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1963 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1966 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1967 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1969 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1972 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1973 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1975 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1978 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1979 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1981 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1984 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1985 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1987 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1990 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1991 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1993 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1996 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1997 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1999 typedef DiagonalMatrix< typename MultTrait<MT1,MT2>::Type > Type;
2015 template<
typename MT,
bool SO,
bool DF,
typename T >
2016 struct DivTrait< DiagonalMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
2018 typedef DiagonalMatrix< typename DivTrait<MT,T>::Type > Type;
2034 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
2035 struct MathTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
2037 typedef DiagonalMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
2038 typedef DiagonalMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
2054 template<
typename MT,
bool SO,
bool DF >
2055 struct SubmatrixTrait< DiagonalMatrix<MT,SO,DF> >
2057 typedef typename SubmatrixTrait<MT>::Type Type;
2073 template<
typename MT,
bool SO,
bool DF >
2074 struct RowTrait< DiagonalMatrix<MT,SO,DF> >
2076 typedef typename RowTrait<MT>::Type Type;
2092 template<
typename MT,
bool SO,
bool DF >
2093 struct ColumnTrait< DiagonalMatrix<MT,SO,DF> >
2095 typedef typename ColumnTrait<MT>::Type Type;
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
Header file for the row trait.
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:250
Header file for the implementation of the base template of the DiagonalMatrix.
Header file for the dense matrix inversion flags.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
MT::ElementType det(const DenseMatrix< MT, SO > &dm)
Computation of the determinant of the given dense square matrix.
Definition: DMatDetExpr.h:382
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
#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:118
Header file for the invert shim.
Constraint on the data type.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Constraint on the data type.
Header file for the implementation of the base template of the UpperMatrix.
Header file for the IsSquare type trait.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:767
Header file for the multiplication trait.
Header file for the IsSymmetric type trait.
Header file for the implementation of the base template of the LowerMatrix.
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:2592
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:217
Header file for the Columns type trait.
Header file for the IsLower type trait.
Header file for the IsAligned type trait.
#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:118
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:187
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:532
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
Constraint on the data type.
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:527
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:76
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 > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
#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:116
DiagonalMatrix specialization for sparse matrices.
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:118
Header file for the column trait.
Header file for the isDefault shim.
#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:79
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:118
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:256
Header file for the mathematical trait.
DiagonalMatrix specialization for dense matrices.
Header file for the IsBuiltin type trait.
Header file for the IsTrue value trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
#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:116
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:556
Header file for the IsUpper type trait.
Header file for exception macros.
Header file for the IsHermitian type trait.
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Header file for the implementation of the base template of the StrictlyLowerMatrix.
#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