35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
92 template<
typename MT,
bool SO,
bool DF >
93 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m );
95 template<
typename MT,
bool SO,
bool DF >
96 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m,
size_t i );
98 template<
typename MT,
bool SO,
bool DF >
99 inline void clear( StrictlyUpperMatrix<MT,SO,DF>& m );
101 template<
typename MT,
bool SO,
bool DF >
102 inline bool isDefault(
const StrictlyUpperMatrix<MT,SO,DF>& m );
104 template<
typename MT,
bool SO,
bool DF >
105 inline bool isIntact(
const StrictlyUpperMatrix<MT,SO,DF>& m );
107 template<
typename MT,
bool SO,
bool DF >
108 inline void swap( StrictlyUpperMatrix<MT,SO,DF>& a, StrictlyUpperMatrix<MT,SO,DF>& b ) noexcept;
120 template<
typename MT
143 template<
typename MT
160 template<
typename MT
181 template<
typename MT
184 inline bool isDefault_backend(
const StrictlyUpperMatrix<MT,SO,DF>& m,
TrueType )
186 return ( m.rows() == 0UL );
203 template<
typename MT
206 inline bool isDefault_backend(
const StrictlyUpperMatrix<MT,SO,DF>& m,
FalseType )
234 template<
typename MT
265 template<
typename MT
283 template<
typename MT
310 template<
typename MT
314 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
315 const DenseVector<VT,false>& rhs,
size_t row,
size_t column )
325 const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
327 for(
size_t i=ibegin; i<(~rhs).
size(); ++i ) {
355 template<
typename MT
359 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
360 const DenseVector<VT,true>& rhs,
size_t row,
size_t column )
373 const size_t iend(
min( row - column + 1UL, (~rhs).
size() ) );
375 for(
size_t i=0UL; i<iend; ++i ) {
403 template<
typename MT
407 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
408 const SparseVector<VT,false>& rhs,
size_t row,
size_t column )
420 const RhsIterator last( (~rhs).
end() );
421 RhsIterator element( (~rhs).lowerBound( ( column <= row )?( 0UL ):( column - row ) ) );
423 for( ; element!=last; ++element ) {
451 template<
typename MT
455 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
456 const SparseVector<VT,true>& rhs,
size_t row,
size_t column )
471 const RhsIterator last( (~rhs).lowerBound( row - column + 1UL ) );
473 for( RhsIterator element=(~rhs).
begin(); element!=last; ++element ) {
501 template<
typename MT1
505 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
506 const DenseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
517 const size_t M( (~rhs).
rows() );
518 const size_t N( (~rhs).
columns() );
520 if( column + 1UL >= row + M )
523 const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
525 for(
size_t i=ibegin; i<M; ++i )
527 const size_t jend(
min( row + i - column + 1UL, N ) );
529 for(
size_t j=0UL; j<jend; ++j ) {
558 template<
typename MT1
562 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
563 const DenseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
574 const size_t M( (~rhs).
rows() );
575 const size_t N( (~rhs).
columns() );
577 if( column + 1UL >= row + M )
580 const size_t jend(
min( row + M - column, N ) );
582 for(
size_t j=0UL; j<jend; ++j )
584 const bool containsDiagonal( column + j >= row );
585 const size_t ibegin( ( containsDiagonal )?( column + j - row ):( 0UL ) );
587 for(
size_t i=ibegin; i<M; ++i ) {
616 template<
typename MT1
620 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
621 const SparseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
634 const size_t M( (~rhs).
rows() );
635 const size_t N( (~rhs).
columns() );
637 if( column + 1UL >= row + M )
640 const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
642 for(
size_t i=ibegin; i<M; ++i )
644 const size_t index( row + i - column + 1UL );
645 const RhsIterator last( (~rhs).lowerBound( i,
min( index, N ) ) );
647 for( RhsIterator element=(~rhs).
begin(i); element!=last; ++element ) {
676 template<
typename MT1
680 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
681 const SparseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
694 const size_t M( (~rhs).
rows() );
695 const size_t N( (~rhs).
columns() );
697 if( column + 1UL >= row + M )
700 const size_t jend(
min( row + M - column, N ) );
702 for(
size_t j=0UL; j<jend; ++j )
704 const bool containsDiagonal( column + j >= row );
705 const size_t index( ( containsDiagonal )?( column + j - row ):( 0UL ) );
707 const RhsIterator last( (~rhs).
end(j) );
708 RhsIterator element( (~rhs).lowerBound( index, j ) );
710 for( ; element!=last; ++element ) {
739 template<
typename MT
744 inline bool tryAddAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
745 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
747 return tryAssign( lhs, ~rhs, row, column );
770 template<
typename MT1
775 inline bool tryAddAssign(
const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
776 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
778 return tryAssign( lhs, ~rhs, row, column );
801 template<
typename MT
806 inline bool trySubAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
807 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
809 return tryAssign( lhs, ~rhs, row, column );
832 template<
typename MT1
837 inline bool trySubAssign(
const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
838 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
840 return tryAssign( lhs, ~rhs, row, column );
860 template<
typename MT
863 inline MT& derestrict( StrictlyUpperMatrix<MT,SO,DF>& m )
881 template<
typename MT,
bool SO,
bool DF >
882 struct Rows< StrictlyUpperMatrix<MT,SO,DF> > :
public Rows<MT>
898 template<
typename MT,
bool SO,
bool DF >
899 struct Columns< StrictlyUpperMatrix<MT,SO,DF> > :
public Columns<MT>
915 template<
typename MT,
bool SO,
bool DF >
916 struct IsSquare< StrictlyUpperMatrix<MT,SO,DF> > :
public TrueType
932 template<
typename MT,
bool SO,
bool DF >
933 struct IsStrictlyUpper< StrictlyUpperMatrix<MT,SO,DF> > :
public TrueType
949 template<
typename MT,
bool SO,
bool DF >
950 struct IsAdaptor< StrictlyUpperMatrix<MT,SO,DF> > :
public TrueType
966 template<
typename MT,
bool SO,
bool DF >
967 struct IsRestricted< StrictlyUpperMatrix<MT,SO,DF> > :
public TrueType
983 template<
typename MT,
bool SO >
984 struct HasConstDataAccess< StrictlyUpperMatrix<MT,SO,true> > :
public TrueType
1000 template<
typename MT,
bool SO,
bool DF >
1001 struct IsAligned< StrictlyUpperMatrix<MT,SO,DF> > :
public BoolConstant< IsAligned<MT>::value >
1017 template<
typename MT,
bool SO,
bool DF >
1018 struct IsPadded< StrictlyUpperMatrix<MT,SO,DF> > :
public BoolConstant< IsPadded<MT>::value >
1034 template<
typename MT,
bool SO,
bool DF >
1035 struct IsResizable< StrictlyUpperMatrix<MT,SO,DF> > :
public BoolConstant< IsResizable<MT>::value >
1051 template<
typename MT,
bool SO,
bool DF >
1052 struct RemoveAdaptor< StrictlyUpperMatrix<MT,SO,DF> >
1070 template<
typename MT,
bool SO,
bool DF >
1071 struct DerestrictTrait< StrictlyUpperMatrix<MT,SO,DF> >
1089 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1090 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1092 using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1095 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1096 struct AddTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1098 using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1101 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1102 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1104 using Type = AddTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1107 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1108 struct AddTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1110 using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1113 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1114 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1116 using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1119 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1120 struct AddTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1122 using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1125 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1126 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1128 using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1131 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1132 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1134 using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1137 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1138 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1140 using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
1143 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1144 struct AddTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1146 using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1149 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1150 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1152 using Type = AddTrait_<MT1,MT2>;
1155 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1156 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1158 using Type = AddTrait_<MT1,MT2>;
1161 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1162 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1164 using Type = AddTrait_<MT1,MT2>;
1167 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1168 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1170 using Type = AddTrait_<MT1,MT2>;
1173 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1174 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1176 using Type = AddTrait_<MT1,MT2>;
1179 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1180 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1182 using Type = AddTrait_<MT1,MT2>;
1185 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1186 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1188 using Type = AddTrait_<MT1,MT2>;
1191 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1192 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1194 using Type = AddTrait_<MT1,MT2>;
1197 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1198 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1200 using Type = AddTrait_<MT1,MT2>;
1203 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1204 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1206 using Type = AddTrait_<MT1,MT2>;
1209 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1210 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1212 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1215 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1216 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1218 using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1221 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1222 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1224 using Type = UniUpperMatrix< AddTrait_<MT1,MT2> >;
1227 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1228 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1230 using Type = UniUpperMatrix< AddTrait_<MT1,MT2> >;
1233 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1234 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1236 using Type = StrictlyUpperMatrix< AddTrait_<MT1,MT2> >;
1252 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1253 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1255 using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1258 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1259 struct SubTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1261 using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1264 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1265 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1267 using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1270 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1271 struct SubTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1273 using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1276 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1277 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1279 using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1282 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1283 struct SubTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1285 using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1288 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1289 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1291 using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1294 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1295 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1297 using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1300 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1301 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1303 using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
1306 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1307 struct SubTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1309 using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1312 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1313 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1315 using Type = SubTrait_<MT1,MT2>;
1318 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1319 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1321 using Type = SubTrait_<MT1,MT2>;
1324 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1325 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1327 using Type = SubTrait_<MT1,MT2>;
1330 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1331 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1333 using Type = SubTrait_<MT1,MT2>;
1336 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1337 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1339 using Type = SubTrait_<MT1,MT2>;
1342 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1343 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1345 using Type = SubTrait_<MT1,MT2>;
1348 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1349 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1351 using Type = SubTrait_<MT1,MT2>;
1354 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1355 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1357 using Type = SubTrait_<MT1,MT2>;
1360 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1361 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1363 using Type = SubTrait_<MT1,MT2>;
1366 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1367 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1369 using Type = SubTrait_<MT1,MT2>;
1372 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1373 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1375 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1378 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1379 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1381 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1384 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1385 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1387 using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1390 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1391 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1393 using Type = UniUpperMatrix< SubTrait_<MT1,MT2> >;
1396 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1397 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1399 using Type = StrictlyUpperMatrix< SubTrait_<MT1,MT2> >;
1415 template<
typename MT,
bool SO,
bool DF,
typename T >
1416 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1418 using Type = StrictlyUpperMatrix< MultTrait_<MT,T> >;
1421 template<
typename T,
typename MT,
bool SO,
bool DF >
1422 struct MultTrait< T, StrictlyUpperMatrix<MT,SO,DF>,
EnableIf_< IsNumeric<T> > >
1424 using Type = StrictlyUpperMatrix< MultTrait_<T,MT> >;
1427 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1428 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1430 using Type = MultTrait_< MT, StaticVector<T,N,false> >;
1433 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1434 struct MultTrait< StaticVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1436 using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1439 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1440 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1442 using Type = MultTrait_< MT, HybridVector<T,N,false> >;
1445 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1446 struct MultTrait< HybridVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1448 using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1451 template<
typename MT,
bool SO,
bool DF,
typename T >
1452 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
1454 using Type = MultTrait_< MT, DynamicVector<T,false> >;
1457 template<
typename T,
typename MT,
bool SO,
bool DF >
1458 struct MultTrait< DynamicVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1460 using Type = MultTrait_< DynamicVector<T,true>, MT >;
1463 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1464 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1466 using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
1469 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1470 struct MultTrait< CustomVector<T,AF,PF,true>, StrictlyUpperMatrix<MT,SO,DF> >
1472 using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1475 template<
typename MT,
bool SO,
bool DF,
typename T >
1476 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
1478 using Type = MultTrait_< MT, CompressedVector<T,false> >;
1481 template<
typename T,
typename MT,
bool SO,
bool DF >
1482 struct MultTrait< CompressedVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1484 using Type = MultTrait_< CompressedVector<T,true>, MT >;
1487 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1488 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1490 using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1493 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1494 struct MultTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1496 using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1499 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1500 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1502 using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1505 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1506 struct MultTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1508 using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1511 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1512 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1514 using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1517 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1518 struct MultTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1520 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1523 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1524 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1526 using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1529 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1530 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1532 using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1535 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1536 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1538 using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
1541 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1542 struct MultTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1544 using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1547 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1548 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1550 using Type = MultTrait_<MT1,MT2>;
1553 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1554 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1556 using Type = MultTrait_<MT1,MT2>;
1559 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1560 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1562 using Type = MultTrait_<MT1,MT2>;
1565 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1566 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1568 using Type = MultTrait_<MT1,MT2>;
1571 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1572 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1574 using Type = MultTrait_<MT1,MT2>;
1577 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1578 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1580 using Type = MultTrait_<MT1,MT2>;
1583 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1584 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1586 using Type = MultTrait_<MT1,MT2>;
1589 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1590 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1592 using Type = MultTrait_<MT1,MT2>;
1595 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1596 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1598 using Type = MultTrait_<MT1,MT2>;
1601 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1602 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1604 using Type = MultTrait_<MT1,MT2>;
1607 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1608 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1610 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1613 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1614 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1616 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1619 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1620 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1622 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1625 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1626 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1628 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1631 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1632 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1634 using Type = StrictlyUpperMatrix< MultTrait_<MT1,MT2> >;
1650 template<
typename MT,
bool SO,
bool DF,
typename T >
1651 struct DivTrait< StrictlyUpperMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1653 using Type = StrictlyUpperMatrix< DivTrait_<MT,T> >;
1669 template<
typename MT,
bool SO,
bool DF >
1670 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Abs >
1672 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Abs> >;
1675 template<
typename MT,
bool SO,
bool DF >
1676 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Floor >
1678 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Floor> >;
1681 template<
typename MT,
bool SO,
bool DF >
1682 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Ceil >
1684 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Ceil> >;
1687 template<
typename MT,
bool SO,
bool DF >
1688 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Conj >
1690 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Conj> >;
1693 template<
typename MT,
bool SO,
bool DF >
1694 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Real >
1696 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Real> >;
1699 template<
typename MT,
bool SO,
bool DF >
1700 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Imag >
1702 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Imag> >;
1705 template<
typename MT,
bool SO,
bool DF >
1706 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Sin >
1708 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Sin> >;
1711 template<
typename MT,
bool SO,
bool DF >
1712 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Asin >
1714 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Asin> >;
1717 template<
typename MT,
bool SO,
bool DF >
1718 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Sinh >
1720 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Sinh> >;
1723 template<
typename MT,
bool SO,
bool DF >
1724 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Asinh >
1726 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Asinh> >;
1729 template<
typename MT,
bool SO,
bool DF >
1730 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Tan >
1732 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Tan> >;
1735 template<
typename MT,
bool SO,
bool DF >
1736 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Atan >
1738 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Atan> >;
1741 template<
typename MT,
bool SO,
bool DF >
1742 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Tanh >
1744 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Tanh> >;
1747 template<
typename MT,
bool SO,
bool DF >
1748 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Atanh >
1750 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Atanh> >;
1753 template<
typename MT,
bool SO,
bool DF >
1754 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Erf >
1756 using Type = StrictlyUpperMatrix< ForEachTrait_<MT,Erf> >;
1772 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1773 struct MathTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1775 using HighType = StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::HighType >;
1776 using LowType = StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::LowType >;
1792 template<
typename MT,
bool SO,
bool DF >
1793 struct SubmatrixTrait< StrictlyUpperMatrix<MT,SO,DF> >
1795 using Type = SubmatrixTrait_<MT>;
1811 template<
typename MT,
bool SO,
bool DF >
1812 struct RowTrait< StrictlyUpperMatrix<MT,SO,DF> >
1814 using Type = RowTrait_<MT>;
1830 template<
typename MT,
bool SO,
bool DF >
1831 struct ColumnTrait< StrictlyUpperMatrix<MT,SO,DF> >
1833 using Type = ColumnTrait_<MT>;
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
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
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
StrictlyUpperMatrix specialization for dense matrices.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1669
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
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
Header file for the IsSquare type trait.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Matrix adapter for strictly upper triangular matrices.
Definition: Forward.h:51
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
Header file for the Columns 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
StrictlyUpperMatrix specialization for sparse matrices.
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.
Header file for the DerestrictTrait class template.
Header file for the IsNumeric type trait.
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
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
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.
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_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 for-each trait.
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
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.
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
Header file for the implementation of the base template of the UniUpperMatrix.
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