35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_H_
101 template<
typename MT,
bool SO,
bool DF >
102 inline void reset( HermitianMatrix<MT,SO,DF>& m );
104 template<
typename MT,
bool SO,
bool DF >
105 inline void reset( HermitianMatrix<MT,SO,DF>& m,
size_t i );
107 template<
typename MT,
bool SO,
bool DF >
108 inline void clear( HermitianMatrix<MT,SO,DF>& m );
110 template<
typename MT,
bool SO,
bool DF >
111 inline bool isDefault(
const HermitianMatrix<MT,SO,DF>& m );
113 template<
typename MT,
bool SO,
bool DF >
114 inline bool isIntact(
const HermitianMatrix<MT,SO,DF>& m );
116 template<
typename MT,
bool SO,
bool DF >
117 inline void swap( HermitianMatrix<MT,SO,DF>& a, HermitianMatrix<MT,SO,DF>& b ) noexcept;
129 template<
typename MT
152 template<
typename MT
169 template<
typename MT
197 template<
typename MT
228 template<
typename MT
246 template<
typename MT
282 inline void invert( HermitianMatrix<MT,SO,true>& m )
300 m.matrix_ = std::move( tmp );
324 template<
typename MT
328 inline bool tryAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
329 const Vector<VT,false>& rhs,
size_t row,
size_t column )
339 typedef ElementType_< HermitianMatrix<MT,SO,DF> > ET;
341 return ( IsBuiltin<ET>::value ||
343 (~rhs).
size() <= column - row ||
344 isReal( (~rhs)[column-row] ) );
368 template<
typename MT
372 inline bool tryAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
373 const Vector<VT,true>& rhs,
size_t row,
size_t column )
383 typedef ElementType_< HermitianMatrix<MT,SO,DF> > ET;
385 return ( IsBuiltin<ET>::value ||
387 (~rhs).
size() <= row - column ||
388 isReal( (~rhs)[row-column] ) );
412 template<
typename MT1
417 inline bool tryAssign(
const HermitianMatrix<MT1,SO1,DF>& lhs,
418 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
429 const size_t M( (~rhs).
rows() );
430 const size_t N( (~rhs).
columns() );
432 if( ( row + M <= column ) || ( column + N <= row ) )
435 const bool lower( row > column );
436 const size_t size (
min( row + M, column + N ) - ( lower ? row : column ) );
441 const size_t subrow( lower ? 0UL : column - row );
442 const size_t subcol( lower ? row - column : 0UL );
466 template<
typename MT
471 inline bool tryAddAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
472 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
474 return tryAssign( lhs, ~rhs, row, column );
496 template<
typename MT1
501 inline bool tryAddAssign(
const HermitianMatrix<MT1,SO1,DF>& lhs,
502 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
504 return tryAssign( lhs, ~rhs, row, column );
527 template<
typename MT
532 inline bool trySubAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
533 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
535 return tryAssign( lhs, ~rhs, row, column );
558 template<
typename MT1
563 inline bool trySubAssign(
const HermitianMatrix<MT1,SO1,DF>& lhs,
564 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
566 return tryAssign( lhs, ~rhs, row, column );
589 template<
typename MT
594 inline bool tryMultAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
595 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
597 return tryAssign( lhs, ~rhs, row, column );
619 template<
typename MT
624 inline bool tryDivAssign(
const HermitianMatrix<MT,SO,DF>& lhs,
625 const Vector<VT,TF>& rhs,
size_t row,
size_t column )
627 return tryAssign( lhs, ~rhs, row, column );
643 template<
typename MT,
bool SO,
bool DF >
644 struct Rows< HermitianMatrix<MT,SO,DF> > :
public Rows<MT>
660 template<
typename MT,
bool SO,
bool DF >
661 struct Columns< HermitianMatrix<MT,SO,DF> > :
public Columns<MT>
677 template<
typename MT,
bool SO,
bool DF >
678 struct IsSquare< HermitianMatrix<MT,SO,DF> > :
public TrueType
694 template<
typename MT,
bool SO,
bool DF >
695 struct IsSymmetric< HermitianMatrix<MT,SO,DF> >
696 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
712 template<
typename MT,
bool SO,
bool DF >
713 struct IsHermitian< HermitianMatrix<MT,SO,DF> > :
public TrueType
729 template<
typename MT,
bool SO,
bool DF >
730 struct IsAdaptor< HermitianMatrix<MT,SO,DF> > :
public TrueType
746 template<
typename MT,
bool SO,
bool DF >
747 struct IsRestricted< HermitianMatrix<MT,SO,DF> > :
public TrueType
763 template<
typename MT,
bool SO >
764 struct HasConstDataAccess< HermitianMatrix<MT,SO,true> > :
public TrueType
780 template<
typename MT,
bool SO,
bool DF >
781 struct IsAligned< HermitianMatrix<MT,SO,DF> > :
public BoolConstant< IsAligned<MT>::value >
797 template<
typename MT,
bool SO,
bool DF >
798 struct IsPadded< HermitianMatrix<MT,SO,DF> > :
public BoolConstant< IsPadded<MT>::value >
814 template<
typename MT,
bool SO,
bool DF >
815 struct IsResizable< HermitianMatrix<MT,SO,DF> > :
public BoolConstant< IsResizable<MT>::value >
831 template<
typename MT,
bool SO,
bool DF >
832 struct RemoveAdaptor< HermitianMatrix<MT,SO,DF> >
850 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
851 struct AddTrait< HermitianMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
853 using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
856 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
857 struct AddTrait< StaticMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
859 using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
862 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
863 struct AddTrait< HermitianMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
865 using Type = AddTrait_< MT, HybridMatrix<T,M,N,SO2> >;
868 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
869 struct AddTrait< HybridMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
871 using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
874 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
875 struct AddTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
877 using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
880 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
881 struct AddTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
883 using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
886 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
887 struct AddTrait< HermitianMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
889 using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
892 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
893 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, HermitianMatrix<MT,SO2,DF> >
895 using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
898 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
899 struct AddTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
901 using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
904 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
905 struct AddTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
907 using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
910 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
911 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
913 using Type = If_< IsSymmetric< HermitianMatrix<MT1,SO1,DF1> >
914 , SymmetricMatrix< AddTrait_<MT1,MT2> >
915 , AddTrait_<MT1,MT2> >;
918 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
919 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
921 using Type = If_< IsSymmetric< HermitianMatrix<MT2,SO2,DF2> >
922 , SymmetricMatrix< AddTrait_<MT1,MT2> >
923 , AddTrait_<MT1,MT2> >;
926 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
927 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
929 using Type = HermitianMatrix< AddTrait_<MT1,MT2> >;
945 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
946 struct SubTrait< HermitianMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
948 using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
951 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
952 struct SubTrait< StaticMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
954 using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
957 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
958 struct SubTrait< HermitianMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
960 using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
963 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
964 struct SubTrait< HybridMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
966 using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
969 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
970 struct SubTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
972 using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
975 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
976 struct SubTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
978 using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
981 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
982 struct SubTrait< HermitianMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
984 using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
987 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
988 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, HermitianMatrix<MT,SO2,DF> >
990 using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
993 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
994 struct SubTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
996 using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
999 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1000 struct SubTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1002 using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1005 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1006 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2> >
1008 using Type = If_< IsSymmetric< HermitianMatrix<MT1,SO1,DF1> >
1009 , SymmetricMatrix< SubTrait_<MT1,MT2> >
1010 , SubTrait_<MT1,MT2> >;
1013 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1014 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1016 using Type = If_< IsSymmetric< HermitianMatrix<MT2,SO2,DF2> >
1017 , SymmetricMatrix< SubTrait_<MT1,MT2> >
1018 , SubTrait_<MT1,MT2> >;
1021 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1022 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1024 using Type = HermitianMatrix< SubTrait_<MT1,MT2> >;
1040 template<
typename MT,
bool SO,
bool DF,
typename T >
1041 struct MultTrait< HermitianMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1043 using Type = HermitianMatrix< MultTrait_<MT,T> >;
1046 template<
typename T,
typename MT,
bool SO,
bool DF >
1047 struct MultTrait< T, HermitianMatrix<MT,SO,DF>,
EnableIf_< IsNumeric<T> > >
1049 using Type = HermitianMatrix< MultTrait_<T,MT> >;
1052 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1053 struct MultTrait< HermitianMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1055 using Type = MultTrait_< MT, StaticVector<T,N,false> >;
1058 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1059 struct MultTrait< StaticVector<T,N,true>, HermitianMatrix<MT,SO,DF> >
1061 using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1064 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
1065 struct MultTrait< HermitianMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1067 using Type = MultTrait_< MT, HybridVector<T,N,false> >;
1070 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
1071 struct MultTrait< HybridVector<T,N,true>, HermitianMatrix<MT,SO,DF> >
1073 using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1076 template<
typename MT,
bool SO,
bool DF,
typename T >
1077 struct MultTrait< HermitianMatrix<MT,SO,DF>, DynamicVector<T,false> >
1079 using Type = MultTrait_< MT, DynamicVector<T,false> >;
1082 template<
typename T,
typename MT,
bool SO,
bool DF >
1083 struct MultTrait< DynamicVector<T,true>, HermitianMatrix<MT,SO,DF> >
1085 using Type = MultTrait_< DynamicVector<T,true>, MT >;
1088 template<
typename MT,
bool SO,
bool DF,
typename T,
bool AF,
bool PF >
1089 struct MultTrait< HermitianMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1091 using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
1094 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF >
1095 struct MultTrait< CustomVector<T,AF,PF,true>, HermitianMatrix<MT,SO,DF> >
1097 using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1100 template<
typename MT,
bool SO,
bool DF,
typename T >
1101 struct MultTrait< HermitianMatrix<MT,SO,DF>, CompressedVector<T,false> >
1103 using Type = MultTrait_< MT, CompressedVector<T,false> >;
1106 template<
typename T,
typename MT,
bool SO,
bool DF >
1107 struct MultTrait< CompressedVector<T,true>, HermitianMatrix<MT,SO,DF> >
1109 using Type = MultTrait_< CompressedVector<T,true>, MT >;
1112 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1113 struct MultTrait< HermitianMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1115 using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1118 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1119 struct MultTrait< StaticMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
1121 using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1124 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
1125 struct MultTrait< HermitianMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1127 using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1130 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
1131 struct MultTrait< HybridMatrix<T,M,N,SO1>, HermitianMatrix<MT,SO2,DF> >
1133 using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1136 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1137 struct MultTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1139 using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1142 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1143 struct MultTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1145 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1148 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool AF,
bool PF,
bool SO2 >
1149 struct MultTrait< HermitianMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1151 using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1154 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF >
1155 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, HermitianMatrix<MT,SO2,DF> >
1157 using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1160 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
1161 struct MultTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1163 using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
1166 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
1167 struct MultTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1169 using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1172 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1173 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2> >
1175 using Type = MultTrait_<MT1,MT2>;
1178 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1179 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1181 using Type = MultTrait_<MT1,MT2>;
1184 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1185 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1187 using Type = MultTrait_<MT1,MT2>;
1203 template<
typename MT,
bool SO,
bool DF,
typename T >
1204 struct DivTrait< HermitianMatrix<MT,SO,DF>, T,
EnableIf_< IsNumeric<T> > >
1206 using Type = HermitianMatrix< DivTrait_<MT,T> >;
1222 template<
typename MT,
bool SO,
bool DF >
1223 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Abs >
1225 using Type = HermitianMatrix< ForEachTrait_<MT,Abs> >;
1228 template<
typename MT,
bool SO,
bool DF >
1229 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Floor >
1231 using Type = HermitianMatrix< ForEachTrait_<MT,Floor> >;
1234 template<
typename MT,
bool SO,
bool DF >
1235 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Ceil >
1237 using Type = HermitianMatrix< ForEachTrait_<MT,Ceil> >;
1240 template<
typename MT,
bool SO,
bool DF >
1241 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Conj >
1243 using Type = HermitianMatrix< ForEachTrait_<MT,Conj> >;
1246 template<
typename MT,
bool SO,
bool DF >
1247 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Real >
1249 using Type = HermitianMatrix< ForEachTrait_<MT,Real> >;
1252 template<
typename MT,
bool SO,
bool DF >
1253 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Imag >
1255 using Type = If_< IsBuiltin< ElementType_<MT> >
1256 , HermitianMatrix< ForEachTrait_<MT,Imag> >
1257 , ForEachTrait_<MT,Imag> >;
1260 template<
typename MT,
bool SO,
bool DF >
1261 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sqrt >
1263 using Type = HermitianMatrix< ForEachTrait_<MT,Sqrt> >;
1266 template<
typename MT,
bool SO,
bool DF >
1267 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, InvSqrt >
1269 using Type = HermitianMatrix< ForEachTrait_<MT,InvSqrt> >;
1272 template<
typename MT,
bool SO,
bool DF >
1273 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cbrt >
1275 using Type = HermitianMatrix< ForEachTrait_<MT,Cbrt> >;
1278 template<
typename MT,
bool SO,
bool DF >
1279 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, InvCbrt >
1281 using Type = HermitianMatrix< ForEachTrait_<MT,InvCbrt> >;
1284 template<
typename MT,
bool SO,
bool DF,
typename ET >
1285 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Pow<ET> >
1287 using Type = HermitianMatrix< ForEachTrait_< MT, Pow<ET> > >;
1290 template<
typename MT,
bool SO,
bool DF >
1291 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Exp >
1293 using Type = HermitianMatrix< ForEachTrait_< MT, Exp > >;
1296 template<
typename MT,
bool SO,
bool DF >
1297 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Log >
1299 using Type = HermitianMatrix< ForEachTrait_< MT, Log > >;
1302 template<
typename MT,
bool SO,
bool DF >
1303 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Log10 >
1305 using Type = HermitianMatrix< ForEachTrait_< MT, Log10 > >;
1308 template<
typename MT,
bool SO,
bool DF >
1309 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sin >
1311 using Type = HermitianMatrix< ForEachTrait_< MT, Sin > >;
1314 template<
typename MT,
bool SO,
bool DF >
1315 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Asin >
1317 using Type = HermitianMatrix< ForEachTrait_< MT, Asin > >;
1320 template<
typename MT,
bool SO,
bool DF >
1321 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sinh >
1323 using Type = HermitianMatrix< ForEachTrait_< MT, Sinh > >;
1326 template<
typename MT,
bool SO,
bool DF >
1327 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Asinh >
1329 using Type = HermitianMatrix< ForEachTrait_< MT, Asinh > >;
1332 template<
typename MT,
bool SO,
bool DF >
1333 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cos >
1335 using Type = HermitianMatrix< ForEachTrait_< MT, Cos > >;
1338 template<
typename MT,
bool SO,
bool DF >
1339 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Acos >
1341 using Type = HermitianMatrix< ForEachTrait_< MT, Acos > >;
1344 template<
typename MT,
bool SO,
bool DF >
1345 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cosh >
1347 using Type = HermitianMatrix< ForEachTrait_< MT, Cosh > >;
1350 template<
typename MT,
bool SO,
bool DF >
1351 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Acosh >
1353 using Type = HermitianMatrix< ForEachTrait_< MT, Acosh > >;
1356 template<
typename MT,
bool SO,
bool DF >
1357 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Tan >
1359 using Type = HermitianMatrix< ForEachTrait_< MT, Tan > >;
1362 template<
typename MT,
bool SO,
bool DF >
1363 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Atan >
1365 using Type = HermitianMatrix< ForEachTrait_< MT, Atan > >;
1368 template<
typename MT,
bool SO,
bool DF >
1369 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Tanh >
1371 using Type = HermitianMatrix< ForEachTrait_< MT, Tanh > >;
1374 template<
typename MT,
bool SO,
bool DF >
1375 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Atanh >
1377 using Type = HermitianMatrix< ForEachTrait_< MT, Atanh > >;
1380 template<
typename MT,
bool SO,
bool DF >
1381 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Erf >
1383 using Type = HermitianMatrix< ForEachTrait_<MT,Erf> >;
1386 template<
typename MT,
bool SO,
bool DF >
1387 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Erfc >
1389 using Type = HermitianMatrix< ForEachTrait_<MT,Erfc> >;
1405 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
1406 struct MathTrait< HermitianMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1408 using HighType = HermitianMatrix< typename MathTrait<MT1,MT2>::HighType >;
1409 using LowType = HermitianMatrix< typename MathTrait<MT1,MT2>::LowType >;
1425 template<
typename MT,
bool SO,
bool DF >
1426 struct SubmatrixTrait< HermitianMatrix<MT,SO,DF> >
1428 using Type = SubmatrixTrait_<MT>;
1444 template<
typename MT,
bool SO,
bool DF >
1445 struct RowTrait< HermitianMatrix<MT,SO,DF> >
1447 using Type = RowTrait_<MT>;
1463 template<
typename MT,
bool SO,
bool DF >
1464 struct ColumnTrait< HermitianMatrix<MT,SO,DF> >
1466 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.
bool isReal(const DiagonalProxy< MT > &proxy)
Returns whether the matrix element represents a real number.
Definition: DiagonalProxy.h:595
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
Flag for the inversion of a Hermitian matrix (same as byLDLH).
Definition: InversionFlag.h:110
Header file for the dense matrix inversion flags.
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
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 implementation of the base template of the SymmetricMatrix.
Header file for the IsSquare type trait.
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:741
Flag for the inversion of a symmetric matrix (same as byLDLT).
Definition: InversionFlag.h:109
Flag for the Bunch-Kaufman-based inversion for Hermitian matrices.
Definition: InversionFlag.h:105
Constraint on the data type.
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Header file for the multiplication trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for all forward declarations of the math module.
Header file for the Columns type trait.
Header file for the implementation of a fixed-size matrix.
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
HermitianMatrix specialization for sparse matrices.
Header file for the exception macros of the math module.
Header file for the RemoveAdaptor type trait.
Header file for the implementation of the base template of the HeritianMatrix.
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
Flag for the Bunch-Kaufman-based inversion for symmetric matrices.
Definition: InversionFlag.h:104
Flag for the Cholesky-based inversion for positive-definite matrices.
Definition: InversionFlag.h:106
Header file for the conjugate shim.
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
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.
Matrix adapter for Hermitian matrices.
Definition: Forward.h:49
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
#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 IsBuiltin type trait.
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:759
Header file for the for-each trait.
Header file for the isDivisor shim.
Header file for the IntegralConstant class template.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:240
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
SubmatrixExprTrait_< MT, unaligned > submatrix(Matrix< MT, SO > &matrix, size_t row, size_t column, size_t m, size_t n)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:167
Header file for the IsHermitian type trait.
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Header file for the isReal shim.
HermitianMatrix specialization for dense matrices.
#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 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