35 #ifndef _BLAZE_MATH_ADAPTORS_LOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_LOWERMATRIX_H_
101 template<
typename MT,
bool SO,
bool DF >
102 inline void reset( LowerMatrix<MT,SO,DF>& m );
104 template<
typename MT,
bool SO,
bool DF >
105 inline void reset( LowerMatrix<MT,SO,DF>& m,
size_t i );
107 template<
typename MT,
bool SO,
bool DF >
108 inline void clear( LowerMatrix<MT,SO,DF>& m );
110 template<
typename MT,
bool SO,
bool DF >
111 inline bool isDefault(
const LowerMatrix<MT,SO,DF>& m );
113 template<
typename MT,
bool SO,
bool DF >
114 inline bool isIntact(
const LowerMatrix<MT,SO,DF>& m );
116 template<
typename MT,
bool SO,
bool DF >
117 inline void swap( LowerMatrix<MT,SO,DF>& a, LowerMatrix<MT,SO,DF>& b ) noexcept;
129 template<
typename MT
152 template<
typename MT
169 template<
typename MT
200 template<
typename MT
231 template<
typename MT
249 template<
typename MT
285 inline void invert( LowerMatrix<MT,SO,true>& m )
300 invert<flag>( derestrict( m ) );
327 template<
typename MT1,
bool SO1,
typename MT2,
typename MT3,
typename MT4,
bool SO2 >
328 inline void lu(
const LowerMatrix<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 LowerMatrix<MT,SO,DF>& lhs,
388 const DenseVector<VT,false>& rhs,
size_t row,
size_t column )
401 const size_t iend(
min( column - row, (~rhs).
size() ) );
403 for(
size_t i=0UL; i<iend; ++i ) {
430 template<
typename MT
434 inline bool tryAssign(
const LowerMatrix<MT,SO,DF>& lhs,
435 const DenseVector<VT,true>& rhs,
size_t row,
size_t column )
445 const size_t ibegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
447 for(
size_t i=ibegin; i<(~rhs).
size(); ++i ) {
474 template<
typename MT
478 inline bool tryAssign(
const LowerMatrix<MT,SO,DF>& lhs,
479 const SparseVector<VT,false>& rhs,
size_t row,
size_t column )
494 const RhsIterator last( (~rhs).lowerBound( column - row ) );
496 for( RhsIterator element=(~rhs).
begin(); element!=last; ++element ) {
523 template<
typename MT
527 inline bool tryAssign(
const LowerMatrix<MT,SO,DF>& lhs,
528 const SparseVector<VT,true>& rhs,
size_t row,
size_t column )
540 const RhsIterator last( (~rhs).
end() );
541 RhsIterator element( (~rhs).lowerBound( ( row < column )?( 0UL ):( row - column + 1UL ) ) );
543 for( ; element!=last; ++element ) {
570 template<
typename MT1
574 inline bool tryAssign(
const LowerMatrix<MT1,SO,DF>& lhs,
575 const DenseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
586 const size_t M( (~rhs).
rows() );
587 const size_t N( (~rhs).
columns() );
589 if( row + 1UL >= column + N )
592 const size_t iend(
min( column + N - row - 1UL, M ) );
594 for(
size_t i=0UL; i<iend; ++i )
596 const bool containsDiagonal( row + i >= column );
597 const size_t jbegin( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
599 for(
size_t j=jbegin; j<N; ++j ) {
627 template<
typename MT1
631 inline bool tryAssign(
const LowerMatrix<MT1,SO,DF>& lhs,
632 const DenseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
643 const size_t M( (~rhs).
rows() );
644 const size_t N( (~rhs).
columns() );
646 if( row + 1UL >= column + N )
649 const size_t jbegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
651 for(
size_t j=jbegin; j<N; ++j )
653 const size_t iend(
min( column + j - row, M ) );
655 for(
size_t i=0UL; i<iend; ++i ) {
683 template<
typename MT1
687 inline bool tryAssign(
const LowerMatrix<MT1,SO,DF>& lhs,
688 const SparseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
701 const size_t M( (~rhs).
rows() );
702 const size_t N( (~rhs).
columns() );
704 if( row + 1UL >= column + N )
707 const size_t iend(
min( column + N - row - 1UL, M ) );
709 for(
size_t i=0UL; i<iend; ++i )
711 const bool containsDiagonal( row + i >= column );
712 const size_t index( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
714 const RhsIterator last( (~rhs).
end(i) );
715 RhsIterator element( (~rhs).lowerBound( i, index ) );
717 for( ; element!=last; ++element ) {
745 template<
typename MT1
749 inline bool tryAssign(
const LowerMatrix<MT1,SO,DF>& lhs,
750 const SparseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
763 const size_t M( (~rhs).
rows() );
764 const size_t N( (~rhs).
columns() );
766 if( row + 1UL >= column + N )
769 const size_t jbegin( ( row < column )?( 0UL ):( row - column + 1UL ) );
771 for(
size_t j=jbegin; j<N; ++j )
773 const size_t index( column + j - row );
774 const RhsIterator last( (~rhs).lowerBound(
min( index, M ), j ) );
776 for( RhsIterator element=(~rhs).
begin(j); element!=last; ++element ) {
804 template<
typename MT
809 inline bool tryAddAssign(
const LowerMatrix<MT,SO,DF>& lhs,
810 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
812 return tryAssign( lhs, ~rhs, row, column );
834 template<
typename MT1
839 inline bool tryAddAssign(
const LowerMatrix<MT1,SO1,DF>& lhs,
840 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
842 return tryAssign( lhs, ~rhs, row, column );
864 template<
typename MT
869 inline bool trySubAssign(
const LowerMatrix<MT,SO,DF>& lhs,
870 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
872 return tryAssign( lhs, ~rhs, row, column );
894 template<
typename MT1
899 inline bool trySubAssign(
const LowerMatrix<MT1,SO1,DF>& lhs,
900 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
902 return tryAssign( lhs, ~rhs, row, column );
922 template<
typename MT
925 inline MT& derestrict( LowerMatrix<MT,SO,DF>& m )
943 template<
typename MT,
bool SO,
bool DF >
944 struct Rows< LowerMatrix<MT,SO,DF> > :
public Rows<MT>
960 template<
typename MT,
bool SO,
bool DF >
961 struct Columns< LowerMatrix<MT,SO,DF> > :
public Columns<MT>
977 template<
typename MT,
bool SO,
bool DF >
978 struct IsSquare< LowerMatrix<MT,SO,DF> > :
public TrueType
994 template<
typename MT,
bool SO,
bool DF >
995 struct IsLower< LowerMatrix<MT,SO,DF> > :
public TrueType
1011 template<
typename MT,
bool SO,
bool DF >
1012 struct IsAdaptor< LowerMatrix<MT,SO,DF> > :
public TrueType
1028 template<
typename MT,
bool SO,
bool DF >
1029 struct IsRestricted< LowerMatrix<MT,SO,DF> > :
public TrueType
1045 template<
typename MT,
bool SO >
1046 struct HasConstDataAccess< LowerMatrix<MT,SO,true> > :
public TrueType
1062 template<
typename MT,
bool SO,
bool DF >
1063 struct IsAligned< LowerMatrix<MT,SO,DF> > :
public BoolConstant< IsAligned<MT>::value >
1079 template<
typename MT,
bool SO,
bool DF >
1080 struct IsPadded< LowerMatrix<MT,SO,DF> > :
public BoolConstant< IsPadded<MT>::value >
1096 template<
typename MT,
bool SO,
bool DF >
1097 struct IsResizable< LowerMatrix<MT,SO,DF> > :
public BoolConstant< IsResizable<MT>::value >
1113 template<
typename MT,
bool SO,
bool DF >
1114 struct RemoveAdaptor< LowerMatrix<MT,SO,DF> >
1132 template<
typename MT,
bool SO,
bool DF >
1133 struct DerestrictTrait< LowerMatrix<MT,SO,DF> >
1151 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1152 struct AddTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1154 using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1157 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1158 struct AddTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1160 using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1163 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1164 struct AddTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1166 using Type = AddTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1169 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1170 struct AddTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1172 using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1175 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1176 struct AddTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1178 using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1181 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1182 struct AddTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1184 using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1187 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1188 struct AddTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1190 using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1193 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1194 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1196 using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1199 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1200 struct AddTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1202 using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
1205 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1206 struct AddTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1208 using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1211 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1212 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1214 using Type = AddTrait_<MT1,MT2>;
1217 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1218 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1220 using Type = AddTrait_<MT1,MT2>;
1223 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1224 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1226 using Type = AddTrait_<MT1,MT2>;
1229 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1230 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1232 using Type = AddTrait_<MT1,MT2>;
1235 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1236 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1238 using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1254 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1255 struct SubTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1257 using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1260 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1261 struct SubTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1263 using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1266 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1267 struct SubTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1269 using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1272 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1273 struct SubTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1275 using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1278 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1279 struct SubTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1281 using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1284 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1285 struct SubTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1287 using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1290 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1291 struct SubTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1293 using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1296 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1297 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1299 using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1302 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1303 struct SubTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1305 using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
1308 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1309 struct SubTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1311 using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1314 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1315 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1317 using Type = SubTrait_<MT1,MT2>;
1320 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1321 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1323 using Type = SubTrait_<MT1,MT2>;
1326 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1327 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1329 using Type = SubTrait_<MT1,MT2>;
1332 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1333 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1335 using Type = SubTrait_<MT1,MT2>;
1338 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1339 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1341 using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1357 template<
typename MT,
bool SO,
bool DF,
typename T >
1358 struct MultTrait< LowerMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1360 using Type = LowerMatrix< MultTrait_<MT,T> >;
1363 template<
typename T,
typename MT,
bool SO,
bool DF >
1364 struct MultTrait< T, LowerMatrix<MT,SO,DF>,
EnableIf_< IsNumeric<T> > >
1366 using Type = LowerMatrix< MultTrait_<T,MT> >;
1369 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1370 struct MultTrait< LowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1372 using Type = MultTrait_< MT, StaticVector<T,N,false> >;
1375 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1376 struct MultTrait< StaticVector<T,N,true>, LowerMatrix<MT,SO,DF> >
1378 using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1381 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1382 struct MultTrait< LowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1384 using Type = MultTrait_< MT, HybridVector<T,N,false> >;
1387 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1388 struct MultTrait< HybridVector<T,N,true>, LowerMatrix<MT,SO,DF> >
1390 using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1393 template<
typename MT,
bool SO,
bool DF,
typename T >
1394 struct MultTrait< LowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
1396 using Type = MultTrait_< MT, DynamicVector<T,false> >;
1399 template<
typename T,
typename MT,
bool SO,
bool DF >
1400 struct MultTrait< DynamicVector<T,true>, LowerMatrix<MT,SO,DF> >
1402 using Type = MultTrait_< DynamicVector<T,true>, MT >;
1405 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1406 struct MultTrait< LowerMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1408 using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
1411 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1412 struct MultTrait< CustomVector<T,AF,PF,true>, LowerMatrix<MT,SO,DF> >
1414 using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1417 template<
typename MT,
bool SO,
bool DF,
typename T >
1418 struct MultTrait< LowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
1420 using Type = MultTrait_< MT, CompressedVector<T,false> >;
1423 template<
typename T,
typename MT,
bool SO,
bool DF >
1424 struct MultTrait< CompressedVector<T,true>, LowerMatrix<MT,SO,DF> >
1426 using Type = MultTrait_< CompressedVector<T,true>, MT >;
1429 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1430 struct MultTrait< LowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1432 using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1435 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1436 struct MultTrait< StaticMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1438 using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1441 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1442 struct MultTrait< LowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1444 using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1447 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1448 struct MultTrait< HybridMatrix<T,M,N,SO1>, LowerMatrix<MT,SO2,DF> >
1450 using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1453 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1454 struct MultTrait< LowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1456 using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1459 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1460 struct MultTrait< DynamicMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1462 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1465 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1466 struct MultTrait< LowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1468 using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1471 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1472 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, LowerMatrix<MT,SO2,DF> >
1474 using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1477 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1478 struct MultTrait< LowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1480 using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
1483 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1484 struct MultTrait< CompressedMatrix<T,SO1>, LowerMatrix<MT,SO2,DF> >
1486 using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1489 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1490 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1492 using Type = MultTrait_<MT1,MT2>;
1495 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1496 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, LowerMatrix<MT2,SO2,DF2> >
1498 using Type = MultTrait_<MT1,MT2>;
1501 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1502 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1504 using Type = MultTrait_<MT1,MT2>;
1507 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1508 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1510 using Type = MultTrait_<MT1,MT2>;
1513 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1514 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1516 using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
1532 template<
typename MT,
bool SO,
bool DF,
typename T >
1533 struct DivTrait< LowerMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1535 using Type = LowerMatrix< DivTrait_<MT,T> >;
1551 template<
typename MT,
bool SO,
bool DF >
1552 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Abs >
1554 using Type = LowerMatrix< ForEachTrait_<MT,Abs> >;
1557 template<
typename MT,
bool SO,
bool DF >
1558 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Floor >
1560 using Type = LowerMatrix< ForEachTrait_<MT,Floor> >;
1563 template<
typename MT,
bool SO,
bool DF >
1564 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Ceil >
1566 using Type = LowerMatrix< ForEachTrait_<MT,Ceil> >;
1569 template<
typename MT,
bool SO,
bool DF >
1570 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Conj >
1572 using Type = LowerMatrix< ForEachTrait_<MT,Conj> >;
1575 template<
typename MT,
bool SO,
bool DF >
1576 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Real >
1578 using Type = LowerMatrix< ForEachTrait_<MT,Real> >;
1581 template<
typename MT,
bool SO,
bool DF >
1582 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Imag >
1584 using Type = LowerMatrix< ForEachTrait_<MT,Imag> >;
1587 template<
typename MT,
bool SO,
bool DF >
1588 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Sin >
1590 using Type = LowerMatrix< ForEachTrait_<MT,Sin> >;
1593 template<
typename MT,
bool SO,
bool DF >
1594 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Asin >
1596 using Type = LowerMatrix< ForEachTrait_<MT,Asin> >;
1599 template<
typename MT,
bool SO,
bool DF >
1600 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Sinh >
1602 using Type = LowerMatrix< ForEachTrait_<MT,Sinh> >;
1605 template<
typename MT,
bool SO,
bool DF >
1606 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Asinh >
1608 using Type = LowerMatrix< ForEachTrait_<MT,Asinh> >;
1611 template<
typename MT,
bool SO,
bool DF >
1612 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Tan >
1614 using Type = LowerMatrix< ForEachTrait_<MT,Tan> >;
1617 template<
typename MT,
bool SO,
bool DF >
1618 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Atan >
1620 using Type = LowerMatrix< ForEachTrait_<MT,Atan> >;
1623 template<
typename MT,
bool SO,
bool DF >
1624 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Tanh >
1626 using Type = LowerMatrix< ForEachTrait_<MT,Tanh> >;
1629 template<
typename MT,
bool SO,
bool DF >
1630 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Atanh >
1632 using Type = LowerMatrix< ForEachTrait_<MT,Atanh> >;
1635 template<
typename MT,
bool SO,
bool DF >
1636 struct ForEachTrait< LowerMatrix<MT,SO,DF>, Erf >
1638 using Type = LowerMatrix< ForEachTrait_<MT,Erf> >;
1654 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1655 struct MathTrait< LowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1657 using HighType = LowerMatrix< typename MathTrait<MT1,MT2>::HighType >;
1658 using LowType = LowerMatrix< typename MathTrait<MT1,MT2>::LowType >;
1674 template<
typename MT,
bool SO,
bool DF >
1675 struct SubmatrixTrait< LowerMatrix<MT,SO,DF> >
1677 using Type = SubmatrixTrait_<MT>;
1693 template<
typename MT,
bool SO,
bool DF >
1694 struct RowTrait< LowerMatrix<MT,SO,DF> >
1696 using Type = RowTrait_<MT>;
1712 template<
typename MT,
bool SO,
bool DF >
1713 struct ColumnTrait< LowerMatrix<MT,SO,DF> >
1715 using Type = ColumnTrait_<MT>;
Header file for auxiliary alias declarations.
Header file for mathematical functions.
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 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
Matrix adapter for lower triangular matrices.
Definition: Forward.h:48
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
Flag for the inversion of a diagonal matrix.
Definition: InversionFlag.h:115
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 general matrix (same as byLU).
Definition: InversionFlag.h:108
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
#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.
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Header file for the multiplication 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.
Header file for the implementation of a fixed-size matrix.
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.
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.
Flag for the inversion of a lower triangular matrix.
Definition: InversionFlag.h:111
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 LowerMatrix.
Header file for the for-each trait.
LowerMatrix specialization for sparse matrices.
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
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
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
LowerMatrix specialization for dense 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