35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
98 template<
typename MT,
bool SO,
bool DF,
bool NF >
99 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m );
101 template<
typename MT,
bool SO,
bool DF,
bool NF >
102 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m,
size_t i );
104 template<
typename MT,
bool SO,
bool DF,
bool NF >
105 inline void clear( SymmetricMatrix<MT,SO,DF,NF>& m );
107 template<
typename MT,
bool SO,
bool DF,
bool NF >
108 inline bool isDefault(
const SymmetricMatrix<MT,SO,DF,NF>& m );
110 template<
typename MT,
bool SO,
bool DF,
bool NF >
111 inline bool isIntact(
const SymmetricMatrix<MT,SO,DF,NF>& m );
113 template<
typename MT,
bool SO,
bool DF,
bool NF >
114 inline void swap( SymmetricMatrix<MT,SO,DF,NF>& a, SymmetricMatrix<MT,SO,DF,NF>& b ) noexcept;
126 template<
typename MT
150 template<
typename MT
168 template<
typename MT
197 template<
typename MT
229 template<
typename MT
248 template<
typename MT
285 inline void invert( SymmetricMatrix<MT,SO,true,true>& m )
303 m.matrix_ = std::move( tmp );
327 template<
typename MT1
333 inline bool tryAssign(
const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
334 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
345 const size_t M( (~rhs).
rows() );
346 const size_t N( (~rhs).
columns() );
348 if( ( row + M <= column ) || ( column + N <= row ) )
351 const bool lower( row > column );
352 const size_t size (
min( row + M, column + N ) - ( lower ? row : column ) );
357 const size_t subrow( lower ? 0UL : column - row );
358 const size_t subcol( lower ? row - column : 0UL );
382 template<
typename MT1
388 inline bool tryAddAssign(
const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
389 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
391 return tryAssign( lhs, ~rhs, row, column );
414 template<
typename MT1
420 inline bool trySubAssign(
const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
421 const Matrix<MT2,SO2>& rhs,
size_t row,
size_t column )
423 return tryAssign( lhs, ~rhs, row, column );
439 template<
typename MT,
bool SO,
bool DF,
bool NF >
440 struct Rows< SymmetricMatrix<MT,SO,DF,NF> > :
public Rows<MT>
456 template<
typename MT,
bool SO,
bool DF,
bool NF >
457 struct Columns< SymmetricMatrix<MT,SO,DF,NF> > :
public Columns<MT>
473 template<
typename MT,
bool SO,
bool DF,
bool NF >
474 struct IsSquare< SymmetricMatrix<MT,SO,DF,NF> > :
public TrueType
490 template<
typename MT,
bool SO,
bool DF,
bool NF >
491 struct IsSymmetric< SymmetricMatrix<MT,SO,DF,NF> > :
public TrueType
507 template<
typename MT,
bool SO,
bool DF,
bool NF >
508 struct IsHermitian< SymmetricMatrix<MT,SO,DF,NF> >
509 :
public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
525 template<
typename MT,
bool SO,
bool DF,
bool NF >
526 struct IsAdaptor< SymmetricMatrix<MT,SO,DF,NF> > :
public TrueType
542 template<
typename MT,
bool SO,
bool DF,
bool NF >
543 struct IsRestricted< SymmetricMatrix<MT,SO,DF,NF> > :
public TrueType
559 template<
typename MT,
bool SO,
bool NF >
560 struct HasConstDataAccess< SymmetricMatrix<MT,SO,true,NF> > :
public TrueType
576 template<
typename MT,
bool SO,
bool DF,
bool NF >
577 struct IsAligned< SymmetricMatrix<MT,SO,DF,NF> > :
public BoolConstant< IsAligned<MT>::value >
593 template<
typename MT,
bool SO,
bool DF,
bool NF >
594 struct IsPadded< SymmetricMatrix<MT,SO,DF,NF> > :
public BoolConstant< IsPadded<MT>::value >
610 template<
typename MT,
bool SO,
bool DF,
bool NF >
611 struct IsResizable< SymmetricMatrix<MT,SO,DF,NF> > :
public BoolConstant< IsResizable<MT>::value >
627 template<
typename MT,
bool SO,
bool DF,
bool NF >
628 struct RemoveAdaptor< SymmetricMatrix<MT,SO,DF,NF> >
646 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
647 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
649 using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
652 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
653 struct AddTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
655 using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
658 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
659 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
661 using Type = AddTrait_< MT, HybridMatrix<T,M,N,SO2> >;
664 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
665 struct AddTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
667 using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
670 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
671 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
673 using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
676 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
677 struct AddTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
679 using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
682 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool AF,
bool PF,
bool SO2 >
683 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
685 using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
688 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
689 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
691 using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
694 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
695 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
697 using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
700 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
701 struct AddTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
703 using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
706 template<
typename MT1,
bool SO1,
bool DF1,
bool NF1,
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
707 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
709 using Type = SymmetricMatrix< AddTrait_<MT1,MT2> >;
725 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
726 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
728 using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
731 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
732 struct SubTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
734 using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
737 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
738 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
740 using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
743 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
744 struct SubTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
746 using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
749 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
750 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
752 using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
755 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
756 struct SubTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
758 using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
761 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool AF,
bool PF,
bool SO2 >
762 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
764 using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
767 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
768 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
770 using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
773 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
774 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
776 using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
779 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
780 struct SubTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
782 using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
785 template<
typename MT1,
bool SO1,
bool DF1,
bool NF1,
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
786 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
788 using Type = SymmetricMatrix< SubTrait_<MT1,MT2> >;
804 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T >
805 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, T,
EnableIf_< IsNumeric<T> > >
807 using Type = SymmetricMatrix< MultTrait_<MT,T> >;
810 template<
typename T,
typename MT,
bool SO,
bool DF,
bool NF >
811 struct MultTrait< T, SymmetricMatrix<MT,SO,DF,NF>,
EnableIf_< IsNumeric<T> > >
813 using Type = SymmetricMatrix< MultTrait_<T,MT> >;
816 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T,
size_t N >
817 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, StaticVector<T,N,false> >
819 using Type = MultTrait_< MT, StaticVector<T,N,false> >;
822 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF,
bool NF >
823 struct MultTrait< StaticVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
825 using Type = MultTrait_< StaticVector<T,N,true>, MT >;
828 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T,
size_t N >
829 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, HybridVector<T,N,false> >
831 using Type = MultTrait_< MT, HybridVector<T,N,false> >;
834 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF,
bool NF >
835 struct MultTrait< HybridVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
837 using Type = MultTrait_< HybridVector<T,N,true>, MT >;
840 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T >
841 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, DynamicVector<T,false> >
843 using Type = MultTrait_< MT, DynamicVector<T,false> >;
846 template<
typename T,
typename MT,
bool SO,
bool DF,
bool NF >
847 struct MultTrait< DynamicVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
849 using Type = MultTrait_< DynamicVector<T,true>, MT >;
852 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T,
bool AF,
bool PF >
853 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CustomVector<T,AF,PF,false> >
855 using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
858 template<
typename T,
bool AF,
bool PF,
typename MT,
bool SO,
bool DF,
bool NF >
859 struct MultTrait< CustomVector<T,AF,PF,true>, SymmetricMatrix<MT,SO,DF,NF> >
861 using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
864 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T >
865 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CompressedVector<T,false> >
867 using Type = MultTrait_< MT, CompressedVector<T,false> >;
870 template<
typename T,
typename MT,
bool SO,
bool DF,
bool NF >
871 struct MultTrait< CompressedVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
873 using Type = MultTrait_< CompressedVector<T,true>, MT >;
876 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
877 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
879 using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
882 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
883 struct MultTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
885 using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
888 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
size_t M,
size_t N,
bool SO2 >
889 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
891 using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
894 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
895 struct MultTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
897 using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
900 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
901 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
903 using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
906 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
907 struct MultTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
909 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
912 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool AF,
bool PF,
bool SO2 >
913 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
915 using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
918 template<
typename T,
bool AF,
bool PF,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
919 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
921 using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
924 template<
typename MT,
bool SO1,
bool DF,
bool NF,
typename T,
bool SO2 >
925 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
927 using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
930 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF,
bool NF >
931 struct MultTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
933 using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
936 template<
typename MT1,
bool SO1,
bool DF1,
bool NF1,
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
937 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
939 using Type = MultTrait_<MT1,MT2>;
955 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename T >
956 struct DivTrait< SymmetricMatrix<MT,SO,DF,NF>, T,
EnableIf_< IsNumeric<T> > >
958 using Type = SymmetricMatrix< DivTrait_<MT,T> >;
974 template<
typename MT,
bool SO,
bool DF,
bool NF >
975 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Abs >
977 using Type = SymmetricMatrix< ForEachTrait_<MT,Abs> >;
980 template<
typename MT,
bool SO,
bool DF,
bool NF >
981 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Floor >
983 using Type = SymmetricMatrix< ForEachTrait_<MT,Floor> >;
986 template<
typename MT,
bool SO,
bool DF,
bool NF >
987 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Ceil >
989 using Type = SymmetricMatrix< ForEachTrait_<MT,Ceil> >;
992 template<
typename MT,
bool SO,
bool DF,
bool NF >
993 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Conj >
995 using Type = SymmetricMatrix< ForEachTrait_<MT,Conj> >;
998 template<
typename MT,
bool SO,
bool DF,
bool NF >
999 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Real >
1001 using Type = SymmetricMatrix< ForEachTrait_<MT,Real> >;
1004 template<
typename MT,
bool SO,
bool DF,
bool NF >
1005 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Imag >
1007 using Type = SymmetricMatrix< ForEachTrait_<MT,Imag> >;
1010 template<
typename MT,
bool SO,
bool DF,
bool NF >
1011 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Sqrt >
1013 using Type = SymmetricMatrix< ForEachTrait_<MT,InvSqrt> >;
1016 template<
typename MT,
bool SO,
bool DF,
bool NF >
1017 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Cbrt >
1019 using Type = SymmetricMatrix< ForEachTrait_<MT,Cbrt> >;
1022 template<
typename MT,
bool SO,
bool DF,
bool NF >
1023 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, InvCbrt >
1025 using Type = SymmetricMatrix< ForEachTrait_<MT,InvCbrt> >;
1028 template<
typename MT,
bool SO,
bool DF,
bool NF,
typename ET >
1029 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Pow<ET> >
1031 using Type = SymmetricMatrix< ForEachTrait_< MT, Pow<ET> > >;
1034 template<
typename MT,
bool SO,
bool DF,
bool NF >
1035 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Exp >
1037 using Type = SymmetricMatrix< ForEachTrait_<MT,Exp> >;
1040 template<
typename MT,
bool SO,
bool DF,
bool NF >
1041 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Log >
1043 using Type = SymmetricMatrix< ForEachTrait_<MT,Log> >;
1046 template<
typename MT,
bool SO,
bool DF,
bool NF >
1047 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Log10 >
1049 using Type = SymmetricMatrix< ForEachTrait_<MT,Log10> >;
1052 template<
typename MT,
bool SO,
bool DF,
bool NF >
1053 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Sin >
1055 using Type = SymmetricMatrix< ForEachTrait_<MT,Sin> >;
1058 template<
typename MT,
bool SO,
bool DF,
bool NF >
1059 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Asin >
1061 using Type = SymmetricMatrix< ForEachTrait_<MT,Asin> >;
1064 template<
typename MT,
bool SO,
bool DF,
bool NF >
1065 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Sinh >
1067 using Type = SymmetricMatrix< ForEachTrait_<MT,Sinh> >;
1070 template<
typename MT,
bool SO,
bool DF,
bool NF >
1071 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Asinh >
1073 using Type = SymmetricMatrix< ForEachTrait_<MT,Asinh> >;
1076 template<
typename MT,
bool SO,
bool DF,
bool NF >
1077 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Cos >
1079 using Type = SymmetricMatrix< ForEachTrait_<MT,Cos> >;
1082 template<
typename MT,
bool SO,
bool DF,
bool NF >
1083 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Acos >
1085 using Type = SymmetricMatrix< ForEachTrait_<MT,Acos> >;
1088 template<
typename MT,
bool SO,
bool DF,
bool NF >
1089 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Cosh >
1091 using Type = SymmetricMatrix< ForEachTrait_<MT,Cosh> >;
1094 template<
typename MT,
bool SO,
bool DF,
bool NF >
1095 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Acosh >
1097 using Type = SymmetricMatrix< ForEachTrait_<MT,Acosh> >;
1100 template<
typename MT,
bool SO,
bool DF,
bool NF >
1101 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Tan >
1103 using Type = SymmetricMatrix< ForEachTrait_<MT,Tan> >;
1106 template<
typename MT,
bool SO,
bool DF,
bool NF >
1107 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Atan >
1109 using Type = SymmetricMatrix< ForEachTrait_<MT,Atan> >;
1112 template<
typename MT,
bool SO,
bool DF,
bool NF >
1113 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Tanh >
1115 using Type = SymmetricMatrix< ForEachTrait_<MT,Tanh> >;
1118 template<
typename MT,
bool SO,
bool DF,
bool NF >
1119 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Atanh >
1121 using Type = SymmetricMatrix< ForEachTrait_<MT,Atanh> >;
1124 template<
typename MT,
bool SO,
bool DF,
bool NF >
1125 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Erf >
1127 using Type = SymmetricMatrix< ForEachTrait_<MT,Erf> >;
1130 template<
typename MT,
bool SO,
bool DF,
bool NF >
1131 struct ForEachTrait< SymmetricMatrix<MT,SO,DF,NF>, Erfc >
1133 using Type = SymmetricMatrix< ForEachTrait_<MT,Erfc> >;
1149 template<
typename MT1,
bool SO1,
bool DF1,
bool NF1,
typename MT2,
bool SO2,
bool DF2,
bool NF2 >
1150 struct MathTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1152 typedef SymmetricMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
1153 typedef SymmetricMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
1169 template<
typename MT,
bool SO,
bool DF,
bool NF >
1170 struct SubmatrixTrait< SymmetricMatrix<MT,SO,DF,NF> >
1172 using Type = SubmatrixTrait_<MT>;
1188 template<
typename MT,
bool SO,
bool DF,
bool NF >
1189 struct RowTrait< SymmetricMatrix<MT,SO,DF,NF> >
1191 using Type = RowTrait_<MT>;
1207 template<
typename MT,
bool SO,
bool DF,
bool NF >
1208 struct ColumnTrait< SymmetricMatrix<MT,SO,DF,NF> >
1210 using Type = ColumnTrait_<MT>;
Header file for auxiliary alias declarations.
Header file for mathematical functions.
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Header file for the row trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
Flag for the inversion of a Hermitian matrix (same as byLDLH).
Definition: InversionFlag.h:110
Header file for the dense matrix inversion flags.
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:689
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
Matrix adapter for symmetric matrices.
Definition: Forward.h:52
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.
SymmetricMatrix specialization for dense matrices with non-numeric element 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 all forward declarations of the math module.
SymmetricMatrix specialization for sparse matrices with numeric element type.
Header file for the Columns type trait.
Header file for the implementation of a fixed-size matrix.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
Header file for the exception macros of the math module.
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
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 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
SymmetricMatrix specialization for sparse matrices with non-numeric element type. ...
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_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
SymmetricMatrix specialization for dense matrices with numeric element type.
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.
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.
#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