35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
90 template<
typename MT,
bool SO,
bool DF >
91 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m );
93 template<
typename MT,
bool SO,
bool DF >
94 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m,
size_t i );
96 template<
typename MT,
bool SO,
bool DF >
97 inline void clear( StrictlyUpperMatrix<MT,SO,DF>& m );
99 template<
typename MT,
bool SO,
bool DF >
100 inline bool isDefault(
const StrictlyUpperMatrix<MT,SO,DF>& m );
102 template<
typename MT,
bool SO,
bool DF >
103 inline bool isIntact(
const StrictlyUpperMatrix<MT,SO,DF>& m );
105 template<
typename MT,
bool SO,
bool DF >
106 inline void swap( StrictlyUpperMatrix<MT,SO,DF>& a, StrictlyUpperMatrix<MT,SO,DF>& b ) ;
118 template<
typename MT
141 template<
typename MT
158 template<
typename MT
179 template<
typename MT
182 inline bool isDefault_backend(
const StrictlyUpperMatrix<MT,SO,DF>& m,
TrueType )
184 return ( m.rows() == 0UL );
201 template<
typename MT
204 inline bool isDefault_backend(
const StrictlyUpperMatrix<MT,SO,DF>& m,
FalseType )
232 template<
typename MT
263 template<
typename MT
282 template<
typename MT
309 template<
typename MT
313 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
314 const DenseVector<VT,false>& rhs,
size_t row,
size_t column )
324 const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
326 for(
size_t i=ibegin; i<(~rhs).
size(); ++i ) {
354 template<
typename MT
358 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
359 const DenseVector<VT,true>& rhs,
size_t row,
size_t column )
372 const size_t iend(
min( row - column + 1UL, (~rhs).
size() ) );
374 for(
size_t i=0UL; i<iend; ++i ) {
402 template<
typename MT
406 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
407 const SparseVector<VT,false>& rhs,
size_t row,
size_t column )
419 const RhsIterator last( (~rhs).
end() );
420 RhsIterator element( (~rhs).lowerBound( ( column <= row )?( 0UL ):( column - row ) ) );
422 for( ; element!=last; ++element ) {
450 template<
typename MT
454 inline bool tryAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
455 const SparseVector<VT,true>& rhs,
size_t row,
size_t column )
470 const RhsIterator last( (~rhs).lowerBound( row - column + 1UL ) );
472 for( RhsIterator element=(~rhs).
begin(); element!=last; ++element ) {
500 template<
typename MT1
504 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
505 const DenseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
516 const size_t M( (~rhs).
rows() );
517 const size_t N( (~rhs).
columns() );
519 if( column + 1UL >= row + M )
522 const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
524 for(
size_t i=ibegin; i<M; ++i )
526 const size_t jend(
min( row + i - column + 1UL, N ) );
528 for(
size_t j=0UL; j<jend; ++j ) {
557 template<
typename MT1
561 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
562 const DenseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
573 const size_t M( (~rhs).
rows() );
574 const size_t N( (~rhs).
columns() );
576 if( column + 1UL >= row + M )
579 const size_t jend(
min( row + M - column, N ) );
581 for(
size_t j=0UL; j<jend; ++j )
583 const bool containsDiagonal( column + j >= row );
584 const size_t ibegin( ( containsDiagonal )?( column + j - row ):( 0UL ) );
586 for(
size_t i=ibegin; i<M; ++i ) {
615 template<
typename MT1
619 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
620 const SparseMatrix<MT2,false>& rhs,
size_t row,
size_t column )
633 const size_t M( (~rhs).
rows() );
634 const size_t N( (~rhs).
columns() );
636 if( column + 1UL >= row + M )
639 const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
641 for(
size_t i=ibegin; i<M; ++i )
643 const size_t index( row + i - column + 1UL );
644 const RhsIterator last( (~rhs).lowerBound( i,
min( index, N ) ) );
646 for( RhsIterator element=(~rhs).
begin(i); element!=last; ++element ) {
675 template<
typename MT1
679 inline bool tryAssign(
const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
680 const SparseMatrix<MT2,true>& rhs,
size_t row,
size_t column )
693 const size_t M( (~rhs).
rows() );
694 const size_t N( (~rhs).
columns() );
696 if( column + 1UL >= row + M )
699 const size_t jend(
min( row + M - column, N ) );
701 for(
size_t j=0UL; j<jend; ++j )
703 const bool containsDiagonal( column + j >= row );
704 const size_t index( ( containsDiagonal )?( column + j - row ):( 0UL ) );
706 const RhsIterator last( (~rhs).
end(j) );
707 RhsIterator element( (~rhs).lowerBound( index, j ) );
709 for( ; element!=last; ++element ) {
738 template<
typename MT
743 inline bool tryAddAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
744 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
746 return tryAssign( lhs, ~rhs, row, column );
769 template<
typename MT1
774 inline bool tryAddAssign(
const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
775 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
777 return tryAssign( lhs, ~rhs, row, column );
800 template<
typename MT
805 inline bool trySubAssign(
const StrictlyUpperMatrix<MT,SO,DF>& lhs,
806 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
808 return tryAssign( lhs, ~rhs, row, column );
831 template<
typename MT1
836 inline bool trySubAssign(
const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
837 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
839 return tryAssign( lhs, ~rhs, row, column );
859 template<
typename MT
862 inline MT& derestrict( StrictlyUpperMatrix<MT,SO,DF>& m )
880 template<
typename MT,
bool SO,
bool DF >
881 struct Rows< StrictlyUpperMatrix<MT,SO,DF> > :
public Rows<MT>
897 template<
typename MT,
bool SO,
bool DF >
898 struct Columns< StrictlyUpperMatrix<MT,SO,DF> > :
public Columns<MT>
914 template<
typename MT,
bool SO,
bool DF >
915 struct IsSquare< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue<true>
931 template<
typename MT,
bool SO,
bool DF >
932 struct IsStrictlyUpper< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue<true>
948 template<
typename MT,
bool SO,
bool DF >
949 struct IsAdaptor< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue<true>
965 template<
typename MT,
bool SO,
bool DF >
966 struct IsRestricted< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue<true>
982 template<
typename MT,
bool SO >
983 struct HasConstDataAccess< StrictlyUpperMatrix<MT,SO,true> > :
public IsTrue<true>
999 template<
typename MT,
bool SO,
bool DF >
1000 struct IsAligned< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue< IsAligned<MT>::value >
1016 template<
typename MT,
bool SO,
bool DF >
1017 struct IsPadded< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue< IsPadded<MT>::value >
1033 template<
typename MT,
bool SO,
bool DF >
1034 struct IsResizable< StrictlyUpperMatrix<MT,SO,DF> > :
public IsTrue< IsResizable<MT>::value >
1050 template<
typename MT,
bool SO,
bool DF >
1051 struct RemoveAdaptor< StrictlyUpperMatrix<MT,SO,DF> >
1069 template<
typename MT,
bool SO,
bool DF >
1070 struct DerestrictTrait< StrictlyUpperMatrix<MT,SO,DF> >
1088 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1089 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1091 typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1094 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1095 struct AddTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1097 typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1100 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1101 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1103 typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1106 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1107 struct AddTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1109 typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1112 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1113 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1115 typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1118 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1119 struct AddTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1121 typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1124 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1125 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1127 typedef typename AddTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1130 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1131 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1133 typedef typename AddTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1136 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1137 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1139 typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1142 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1143 struct AddTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1145 typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1148 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1149 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1151 typedef typename AddTrait<MT1,MT2>::Type Type;
1154 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1155 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1157 typedef typename AddTrait<MT1,MT2>::Type Type;
1160 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1161 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1163 typedef typename AddTrait<MT1,MT2>::Type Type;
1166 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1167 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1169 typedef typename AddTrait<MT1,MT2>::Type Type;
1172 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1173 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1175 typedef typename AddTrait<MT1,MT2>::Type Type;
1178 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1179 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1181 typedef typename AddTrait<MT1,MT2>::Type Type;
1184 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1185 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1187 typedef typename AddTrait<MT1,MT2>::Type Type;
1190 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1191 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1193 typedef typename AddTrait<MT1,MT2>::Type Type;
1196 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1197 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1199 typedef typename AddTrait<MT1,MT2>::Type Type;
1202 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1203 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1205 typedef typename AddTrait<MT1,MT2>::Type Type;
1208 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1209 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1211 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1214 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1215 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1217 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1220 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1221 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1223 typedef UniUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1226 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1227 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1229 typedef UniUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1232 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1233 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1235 typedef StrictlyUpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1251 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1252 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1254 typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1257 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1258 struct SubTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1260 typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1263 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1264 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1266 typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1269 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1270 struct SubTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1272 typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1275 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1276 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1278 typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1281 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1282 struct SubTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1284 typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1287 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1288 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1290 typedef typename SubTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1293 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1294 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1296 typedef typename SubTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1299 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1300 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1302 typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1305 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1306 struct SubTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1308 typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1311 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1312 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1314 typedef typename SubTrait<MT1,MT2>::Type Type;
1317 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1318 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1320 typedef typename SubTrait<MT1,MT2>::Type Type;
1323 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1324 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1326 typedef typename SubTrait<MT1,MT2>::Type Type;
1329 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1330 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1332 typedef typename SubTrait<MT1,MT2>::Type Type;
1335 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1336 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1338 typedef typename SubTrait<MT1,MT2>::Type Type;
1341 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1342 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1344 typedef typename SubTrait<MT1,MT2>::Type Type;
1347 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1348 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1350 typedef typename SubTrait<MT1,MT2>::Type Type;
1353 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1354 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1356 typedef typename SubTrait<MT1,MT2>::Type Type;
1359 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1360 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1362 typedef typename SubTrait<MT1,MT2>::Type Type;
1365 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1366 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1368 typedef typename SubTrait<MT1,MT2>::Type Type;
1371 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1372 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1374 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1377 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1378 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1380 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1383 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1384 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1386 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1389 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1390 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1392 typedef UniUpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1395 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1396 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1398 typedef StrictlyUpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1414 template<
typename MT,
bool SO,
bool DF,
typename T >
1415 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
1417 typedef StrictlyUpperMatrix< typename MultTrait<MT,T>::Type > Type;
1420 template<
typename T,
typename MT,
bool SO,
bool DF >
1421 struct MultTrait< T, StrictlyUpperMatrix<MT,SO,DF>, typename EnableIf< IsNumeric<T> >::Type >
1423 typedef StrictlyUpperMatrix< typename MultTrait<T,MT>::Type > Type;
1426 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1427 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1429 typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
1432 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1433 struct MultTrait< StaticVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1435 typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
1438 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1439 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1441 typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
1444 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1445 struct MultTrait< HybridVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1447 typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
1450 template<
typename MT,
bool SO,
bool DF,
typename T >
1451 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
1453 typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
1456 template<
typename T,
typename MT,
bool SO,
bool DF >
1457 struct MultTrait< DynamicVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1459 typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
1462 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1463 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1465 typedef typename MultTrait< MT, CustomVector<T,AF,PF,false> >::Type Type;
1468 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1469 struct MultTrait< CustomVector<T,AF,PF,true>, StrictlyUpperMatrix<MT,SO,DF> >
1471 typedef typename MultTrait< CustomVector<T,AF,PF,true>, MT >::Type Type;
1474 template<
typename MT,
bool SO,
bool DF,
typename T >
1475 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
1477 typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
1480 template<
typename T,
typename MT,
bool SO,
bool DF >
1481 struct MultTrait< CompressedVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1483 typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
1486 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1487 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1489 typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1492 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1493 struct MultTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1495 typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1498 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1499 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1501 typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1504 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1505 struct MultTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1507 typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1510 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1511 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1513 typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1516 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1517 struct MultTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1519 typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1522 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1523 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1525 typedef typename MultTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1528 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1529 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1531 typedef typename MultTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1534 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1535 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1537 typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1540 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1541 struct MultTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1543 typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1546 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
1547 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1549 typedef typename MultTrait<MT1,MT2>::Type Type;
1552 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
1553 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1555 typedef typename MultTrait<MT1,MT2>::Type Type;
1558 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1559 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1561 typedef typename MultTrait<MT1,MT2>::Type Type;
1564 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1565 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1567 typedef typename MultTrait<MT1,MT2>::Type Type;
1570 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1571 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1573 typedef typename MultTrait<MT1,MT2>::Type Type;
1576 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1577 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1579 typedef typename MultTrait<MT1,MT2>::Type Type;
1582 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1583 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1585 typedef typename MultTrait<MT1,MT2>::Type Type;
1588 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1589 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1591 typedef typename MultTrait<MT1,MT2>::Type Type;
1594 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1595 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1597 typedef typename MultTrait<MT1,MT2>::Type Type;
1600 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1601 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1603 typedef typename MultTrait<MT1,MT2>::Type Type;
1606 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1607 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1609 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1612 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1613 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1615 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1618 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1619 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1621 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1624 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1625 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1627 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1630 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1631 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1633 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1649 template<
typename MT,
bool SO,
bool DF,
typename T >
1650 struct DivTrait< StrictlyUpperMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
1652 typedef StrictlyUpperMatrix< typename DivTrait<MT,T>::Type > Type;
1668 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1669 struct MathTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1671 typedef StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
1672 typedef StrictlyUpperMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
1688 template<
typename MT,
bool SO,
bool DF >
1689 struct SubmatrixTrait< StrictlyUpperMatrix<MT,SO,DF> >
1691 typedef typename SubmatrixTrait<MT>::Type Type;
1707 template<
typename MT,
bool SO,
bool DF >
1708 struct RowTrait< StrictlyUpperMatrix<MT,SO,DF> >
1710 typedef typename RowTrait<MT>::Type Type;
1726 template<
typename MT,
bool SO,
bool DF >
1727 struct ColumnTrait< StrictlyUpperMatrix<MT,SO,DF> >
1729 typedef typename ColumnTrait<MT>::Type Type;
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.
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
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
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
StrictlyUpperMatrix specialization for sparse matrices.
Header file for the implementation of the base template of the UniUpperMatrix.
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Header file for the implementation of the base template of the UpperMatrix.
StrictlyUpperMatrix specialization for dense matrices.
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:2592
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
Header file for the Columns type trait.
Header file for the IsAligned type trait.
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
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.
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 > >, 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
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.
#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.
boost::false_type 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 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
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
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
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1605