HermitianMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_HERMITIANMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
51 #include <blaze/math/Exception.h>
52 #include <blaze/math/Forward.h>
53 #include <blaze/math/Functions.h>
80 #include <blaze/util/Assert.h>
81 #include <blaze/util/EnableIf.h>
83 #include <blaze/util/mpl/If.h>
84 #include <blaze/util/TrueType.h>
87 #include <blaze/util/Unused.h>
88 
89 
90 namespace blaze {
91 
92 //=================================================================================================
93 //
94 // HERMITIANMATRIX OPERATORS
95 //
96 //=================================================================================================
97 
98 //*************************************************************************************************
101 template< typename MT, bool SO, bool DF >
102 inline void reset( HermitianMatrix<MT,SO,DF>& m );
103 
104 template< typename MT, bool SO, bool DF >
105 inline void reset( HermitianMatrix<MT,SO,DF>& m, size_t i );
106 
107 template< typename MT, bool SO, bool DF >
108 inline void clear( HermitianMatrix<MT,SO,DF>& m );
109 
110 template< typename MT, bool SO, bool DF >
111 inline bool isDefault( const HermitianMatrix<MT,SO,DF>& m );
112 
113 template< typename MT, bool SO, bool DF >
114 inline bool isIntact( const HermitianMatrix<MT,SO,DF>& m );
115 
116 template< typename MT, bool SO, bool DF >
117 inline void swap( HermitianMatrix<MT,SO,DF>& a, HermitianMatrix<MT,SO,DF>& b ) noexcept;
119 //*************************************************************************************************
120 
121 
122 //*************************************************************************************************
129 template< typename MT // Type of the adapted matrix
130  , bool SO // Storage order of the adapted matrix
131  , bool DF > // Density flag
133 {
134  m.reset();
135 }
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
152 template< typename MT // Type of the adapted matrix
153  , bool SO // Storage order of the adapted matrix
154  , bool DF > // Density flag
155 inline void reset( HermitianMatrix<MT,SO,DF>& m, size_t i )
156 {
157  m.reset( i );
158 }
159 //*************************************************************************************************
160 
161 
162 //*************************************************************************************************
169 template< typename MT // Type of the adapted matrix
170  , bool SO // Storage order of the adapted matrix
171  , bool DF > // Density flag
173 {
174  m.clear();
175 }
176 //*************************************************************************************************
177 
178 
179 //*************************************************************************************************
197 template< typename MT // Type of the adapted matrix
198  , bool SO // Storage order of the adapted matrix
199  , bool DF > // Density flag
200 inline bool isDefault( const HermitianMatrix<MT,SO,DF>& m )
201 {
202  return isDefault( m.matrix_ );
203 }
204 //*************************************************************************************************
205 
206 
207 //*************************************************************************************************
228 template< typename MT // Type of the adapted matrix
229  , bool SO // Storage order of the adapted matrix
230  , bool DF > // Density flag
231 inline bool isIntact( const HermitianMatrix<MT,SO,DF>& m )
232 {
233  return m.isIntact();
234 }
235 //*************************************************************************************************
236 
237 
238 //*************************************************************************************************
246 template< typename MT // Type of the adapted matrix
247  , bool SO // Storage order of the adapted matrix
248  , bool DF > // Density flag
250 {
251  a.swap( b );
252 }
253 //*************************************************************************************************
254 
255 
256 //*************************************************************************************************
279 template< InversionFlag IF // Inversion algorithm
280  , typename MT // Type of the dense matrix
281  , bool SO > // Storage order of the dense matrix
282 inline void invert( HermitianMatrix<MT,SO,true>& m )
283 {
285 
286  if( IF == asUniLower || IF == asUniUpper ) {
287  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
288  return;
289  }
290 
291  constexpr InversionFlag flag( ( IF == byLU || IF == byLDLT || IF == byLDLH ||
292  IF == asGeneral || IF == asSymmetric || IF == asHermitian )
293  ? ( byLDLH )
294  : ( ( IF == byLLH )
295  ?( byLLH )
296  :( asDiagonal ) ) );
297 
298  MT tmp( m.matrix_ );
299  invert<flag>( tmp );
300  m.matrix_ = std::move( tmp );
301 
302  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
303 }
305 //*************************************************************************************************
306 
307 
308 //*************************************************************************************************
324 template< typename MT // Type of the adapted matrix
325  , bool SO // Storage order of the adapted matrix
326  , bool DF // Density flag
327  , typename VT > // Type of the right-hand side vector
328 inline bool tryAssign( const HermitianMatrix<MT,SO,DF>& lhs,
329  const Vector<VT,false>& rhs, size_t row, size_t column )
330 {
332 
333  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
334  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
335  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
336 
337  UNUSED_PARAMETER( lhs );
338 
339  typedef ElementType_< HermitianMatrix<MT,SO,DF> > ET;
340 
341  return ( IsBuiltin<ET>::value ||
342  column < row ||
343  (~rhs).size() <= column - row ||
344  isReal( (~rhs)[column-row] ) );
345 
346  return true;
347 }
349 //*************************************************************************************************
350 
351 
352 //*************************************************************************************************
368 template< typename MT // Type of the adapted matrix
369  , bool SO // Storage order of the adapted matrix
370  , bool DF // Density flag
371  , typename VT > // Type of the right-hand side vector
372 inline bool tryAssign( const HermitianMatrix<MT,SO,DF>& lhs,
373  const Vector<VT,true>& rhs, size_t row, size_t column )
374 {
376 
377  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
378  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
379  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
380 
381  UNUSED_PARAMETER( lhs );
382 
383  typedef ElementType_< HermitianMatrix<MT,SO,DF> > ET;
384 
385  return ( IsBuiltin<ET>::value ||
386  row < column ||
387  (~rhs).size() <= row - column ||
388  isReal( (~rhs)[row-column] ) );
389 
390  return true;
391 }
393 //*************************************************************************************************
394 
395 
396 //*************************************************************************************************
412 template< typename MT1 // Type of the adapted matrix
413  , bool SO1 // Storage order of the adapted matrix
414  , bool DF // Density flag
415  , typename MT2 // Type of the right-hand side matrix
416  , bool SO2 > // Storage order of the right-hand side matrix
417 inline bool tryAssign( const HermitianMatrix<MT1,SO1,DF>& lhs,
418  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
419 {
421 
422  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
423  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
424  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
425  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
426 
427  UNUSED_PARAMETER( lhs );
428 
429  const size_t M( (~rhs).rows() );
430  const size_t N( (~rhs).columns() );
431 
432  if( ( row + M <= column ) || ( column + N <= row ) )
433  return true;
434 
435  const bool lower( row > column );
436  const size_t size ( min( row + M, column + N ) - ( lower ? row : column ) );
437 
438  if( size < 2UL )
439  return true;
440 
441  const size_t subrow( lower ? 0UL : column - row );
442  const size_t subcol( lower ? row - column : 0UL );
443 
444  return isHermitian( submatrix( ~rhs, subrow, subcol, size, size ) );
445 }
447 //*************************************************************************************************
448 
449 
450 //*************************************************************************************************
466 template< typename MT // Type of the adapted matrix
467  , bool SO // Storage order of the adapted matrix
468  , bool DF // Density flag
469  , typename VT // Type of the right-hand side vector
470  , bool TF > // Transpose flag of the right-hand side vector
471 inline bool tryAddAssign( const HermitianMatrix<MT,SO,DF>& lhs,
472  const Vector<VT,TF>& rhs, size_t row, size_t column )
473 {
474  return tryAssign( lhs, ~rhs, row, column );
475 }
477 //*************************************************************************************************
478 
479 
480 //*************************************************************************************************
496 template< typename MT1 // Type of the adapted matrix
497  , bool SO1 // Storage order of the adapted matrix
498  , bool DF // Density flag
499  , typename MT2 // Type of the right-hand side matrix
500  , bool SO2 > // Storage order of the right-hand side matrix
501 inline bool tryAddAssign( const HermitianMatrix<MT1,SO1,DF>& lhs,
502  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
503 {
504  return tryAssign( lhs, ~rhs, row, column );
505 }
507 //*************************************************************************************************
508 
509 
510 //*************************************************************************************************
527 template< typename MT // Type of the adapted matrix
528  , bool SO // Storage order of the adapted matrix
529  , bool DF // Density flag
530  , typename VT // Type of the right-hand side vector
531  , bool TF > // Transpose flag of the right-hand side vector
532 inline bool trySubAssign( const HermitianMatrix<MT,SO,DF>& lhs,
533  const Vector<VT,TF>& rhs, size_t row, size_t column )
534 {
535  return tryAssign( lhs, ~rhs, row, column );
536 }
538 //*************************************************************************************************
539 
540 
541 //*************************************************************************************************
558 template< typename MT1 // Type of the adapted matrix
559  , bool SO1 // Storage order of the adapted matrix
560  , bool DF // Density flag
561  , typename MT2 // Type of the right-hand side matrix
562  , bool SO2 > // Storage order of the right-hand side matrix
563 inline bool trySubAssign( const HermitianMatrix<MT1,SO1,DF>& lhs,
564  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
565 {
566  return tryAssign( lhs, ~rhs, row, column );
567 }
569 //*************************************************************************************************
570 
571 
572 //*************************************************************************************************
589 template< typename MT // Type of the adapted matrix
590  , bool SO // Storage order of the adapted matrix
591  , bool DF // Density flag
592  , typename VT // Type of the right-hand side vector
593  , bool TF > // Transpose flag of the right-hand side vector
594 inline bool tryMultAssign( const HermitianMatrix<MT,SO,DF>& lhs,
595  const Vector<VT,TF>& rhs, size_t row, size_t column )
596 {
597  return tryAssign( lhs, ~rhs, row, column );
598 }
600 //*************************************************************************************************
601 
602 
603 //*************************************************************************************************
619 template< typename MT // Type of the adapted matrix
620  , bool SO // Storage order of the adapted matrix
621  , bool DF // Density flag
622  , typename VT // Type of the right-hand side vector
623  , bool TF > // Transpose flag of the right-hand side vector
624 inline bool tryDivAssign( const HermitianMatrix<MT,SO,DF>& lhs,
625  const Vector<VT,TF>& rhs, size_t row, size_t column )
626 {
627  return tryAssign( lhs, ~rhs, row, column );
628 }
630 //*************************************************************************************************
631 
632 
633 
634 
635 //=================================================================================================
636 //
637 // ROWS SPECIALIZATIONS
638 //
639 //=================================================================================================
640 
641 //*************************************************************************************************
643 template< typename MT, bool SO, bool DF >
644 struct Rows< HermitianMatrix<MT,SO,DF> > : public Rows<MT>
645 {};
647 //*************************************************************************************************
648 
649 
650 
651 
652 //=================================================================================================
653 //
654 // COLUMNS SPECIALIZATIONS
655 //
656 //=================================================================================================
657 
658 //*************************************************************************************************
660 template< typename MT, bool SO, bool DF >
661 struct Columns< HermitianMatrix<MT,SO,DF> > : public Columns<MT>
662 {};
664 //*************************************************************************************************
665 
666 
667 
668 
669 //=================================================================================================
670 //
671 // ISSQUARE SPECIALIZATIONS
672 //
673 //=================================================================================================
674 
675 //*************************************************************************************************
677 template< typename MT, bool SO, bool DF >
678 struct IsSquare< HermitianMatrix<MT,SO,DF> > : public TrueType
679 {};
681 //*************************************************************************************************
682 
683 
684 
685 
686 //=================================================================================================
687 //
688 // ISSYMMETRIC SPECIALIZATIONS
689 //
690 //=================================================================================================
691 
692 //*************************************************************************************************
694 template< typename MT, bool SO, bool DF >
695 struct IsSymmetric< HermitianMatrix<MT,SO,DF> >
696  : public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
697 {};
699 //*************************************************************************************************
700 
701 
702 
703 
704 //=================================================================================================
705 //
706 // ISHERMITIAN SPECIALIZATIONS
707 //
708 //=================================================================================================
709 
710 //*************************************************************************************************
712 template< typename MT, bool SO, bool DF >
713 struct IsHermitian< HermitianMatrix<MT,SO,DF> > : public TrueType
714 {};
716 //*************************************************************************************************
717 
718 
719 
720 
721 //=================================================================================================
722 //
723 // ISADAPTOR SPECIALIZATIONS
724 //
725 //=================================================================================================
726 
727 //*************************************************************************************************
729 template< typename MT, bool SO, bool DF >
730 struct IsAdaptor< HermitianMatrix<MT,SO,DF> > : public TrueType
731 {};
733 //*************************************************************************************************
734 
735 
736 
737 
738 //=================================================================================================
739 //
740 // ISRESTRICTED SPECIALIZATIONS
741 //
742 //=================================================================================================
743 
744 //*************************************************************************************************
746 template< typename MT, bool SO, bool DF >
747 struct IsRestricted< HermitianMatrix<MT,SO,DF> > : public TrueType
748 {};
750 //*************************************************************************************************
751 
752 
753 
754 
755 //=================================================================================================
756 //
757 // HASCONSTDATAACCESS SPECIALIZATIONS
758 //
759 //=================================================================================================
760 
761 //*************************************************************************************************
763 template< typename MT, bool SO >
764 struct HasConstDataAccess< HermitianMatrix<MT,SO,true> > : public TrueType
765 {};
767 //*************************************************************************************************
768 
769 
770 
771 
772 //=================================================================================================
773 //
774 // ISALIGNED SPECIALIZATIONS
775 //
776 //=================================================================================================
777 
778 //*************************************************************************************************
780 template< typename MT, bool SO, bool DF >
781 struct IsAligned< HermitianMatrix<MT,SO,DF> > : public BoolConstant< IsAligned<MT>::value >
782 {};
784 //*************************************************************************************************
785 
786 
787 
788 
789 //=================================================================================================
790 //
791 // ISPADDED SPECIALIZATIONS
792 //
793 //=================================================================================================
794 
795 //*************************************************************************************************
797 template< typename MT, bool SO, bool DF >
798 struct IsPadded< HermitianMatrix<MT,SO,DF> > : public BoolConstant< IsPadded<MT>::value >
799 {};
801 //*************************************************************************************************
802 
803 
804 
805 
806 //=================================================================================================
807 //
808 // ISRESIZABLE SPECIALIZATIONS
809 //
810 //=================================================================================================
811 
812 //*************************************************************************************************
814 template< typename MT, bool SO, bool DF >
815 struct IsResizable< HermitianMatrix<MT,SO,DF> > : public BoolConstant< IsResizable<MT>::value >
816 {};
818 //*************************************************************************************************
819 
820 
821 
822 
823 //=================================================================================================
824 //
825 // REMOVEADAPTOR SPECIALIZATIONS
826 //
827 //=================================================================================================
828 
829 //*************************************************************************************************
831 template< typename MT, bool SO, bool DF >
832 struct RemoveAdaptor< HermitianMatrix<MT,SO,DF> >
833 {
834  using Type = MT;
835 };
837 //*************************************************************************************************
838 
839 
840 
841 
842 //=================================================================================================
843 //
844 // ADDTRAIT SPECIALIZATIONS
845 //
846 //=================================================================================================
847 
848 //*************************************************************************************************
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> >
852 {
853  using Type = AddTrait_< MT, StaticMatrix<T,M,N,SO2> >;
854 };
855 
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> >
858 {
859  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
860 };
861 
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> >
864 {
865  using Type = AddTrait_< MT, HybridMatrix<T,M,N,SO2> >;
866 };
867 
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> >
870 {
871  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
872 };
873 
874 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
875 struct AddTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
876 {
877  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
878 };
879 
880 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
881 struct AddTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
882 {
883  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
884 };
885 
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> >
888 {
889  using Type = AddTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
890 };
891 
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> >
894 {
895  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
896 };
897 
898 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
899 struct AddTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
900 {
901  using Type = AddTrait_< MT, CompressedMatrix<T,SO2> >;
902 };
903 
904 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
905 struct AddTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
906 {
907  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
908 };
909 
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> >
912 {
913  using Type = If_< IsSymmetric< HermitianMatrix<MT1,SO1,DF1> >
914  , SymmetricMatrix< AddTrait_<MT1,MT2> >
915  , AddTrait_<MT1,MT2> >;
916 };
917 
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> >
920 {
921  using Type = If_< IsSymmetric< HermitianMatrix<MT2,SO2,DF2> >
922  , SymmetricMatrix< AddTrait_<MT1,MT2> >
923  , AddTrait_<MT1,MT2> >;
924 };
925 
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> >
928 {
929  using Type = HermitianMatrix< AddTrait_<MT1,MT2> >;
930 };
932 //*************************************************************************************************
933 
934 
935 
936 
937 //=================================================================================================
938 //
939 // SUBTRAIT SPECIALIZATIONS
940 //
941 //=================================================================================================
942 
943 //*************************************************************************************************
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> >
947 {
948  using Type = SubTrait_< MT, StaticMatrix<T,M,N,SO2> >;
949 };
950 
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> >
953 {
954  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
955 };
956 
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> >
959 {
960  using Type = SubTrait_< MT, HybridMatrix<T,M,N,SO2> >;
961 };
962 
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> >
965 {
966  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
967 };
968 
969 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
970 struct SubTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
971 {
972  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
973 };
974 
975 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
976 struct SubTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
977 {
978  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
979 };
980 
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> >
983 {
984  using Type = SubTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
985 };
986 
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> >
989 {
990  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
991 };
992 
993 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
994 struct SubTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
995 {
996  using Type = SubTrait_< MT, CompressedMatrix<T,SO2> >;
997 };
998 
999 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1000 struct SubTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1001 {
1002  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1003 };
1004 
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> >
1007 {
1008  using Type = If_< IsSymmetric< HermitianMatrix<MT1,SO1,DF1> >
1009  , SymmetricMatrix< SubTrait_<MT1,MT2> >
1010  , SubTrait_<MT1,MT2> >;
1011 };
1012 
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> >
1015 {
1016  using Type = If_< IsSymmetric< HermitianMatrix<MT2,SO2,DF2> >
1017  , SymmetricMatrix< SubTrait_<MT1,MT2> >
1018  , SubTrait_<MT1,MT2> >;
1019 };
1020 
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> >
1023 {
1024  using Type = HermitianMatrix< SubTrait_<MT1,MT2> >;
1025 };
1027 //*************************************************************************************************
1028 
1029 
1030 
1031 
1032 //=================================================================================================
1033 //
1034 // MULTTRAIT SPECIALIZATIONS
1035 //
1036 //=================================================================================================
1037 
1038 //*************************************************************************************************
1040 template< typename MT, bool SO, bool DF, typename T >
1041 struct MultTrait< HermitianMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1042 {
1043  using Type = HermitianMatrix< MultTrait_<MT,T> >;
1044 };
1045 
1046 template< typename T, typename MT, bool SO, bool DF >
1047 struct MultTrait< T, HermitianMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
1048 {
1049  using Type = HermitianMatrix< MultTrait_<T,MT> >;
1050 };
1051 
1052 template< typename MT, bool SO, bool DF, typename T, size_t N >
1053 struct MultTrait< HermitianMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1054 {
1055  using Type = MultTrait_< MT, StaticVector<T,N,false> >;
1056 };
1057 
1058 template< typename T, size_t N, typename MT, bool SO, bool DF >
1059 struct MultTrait< StaticVector<T,N,true>, HermitianMatrix<MT,SO,DF> >
1060 {
1061  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1062 };
1063 
1064 template< typename MT, bool SO, bool DF, typename T, size_t N >
1065 struct MultTrait< HermitianMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1066 {
1067  using Type = MultTrait_< MT, HybridVector<T,N,false> >;
1068 };
1069 
1070 template< typename T, size_t N, typename MT, bool SO, bool DF >
1071 struct MultTrait< HybridVector<T,N,true>, HermitianMatrix<MT,SO,DF> >
1072 {
1073  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1074 };
1075 
1076 template< typename MT, bool SO, bool DF, typename T >
1077 struct MultTrait< HermitianMatrix<MT,SO,DF>, DynamicVector<T,false> >
1078 {
1079  using Type = MultTrait_< MT, DynamicVector<T,false> >;
1080 };
1081 
1082 template< typename T, typename MT, bool SO, bool DF >
1083 struct MultTrait< DynamicVector<T,true>, HermitianMatrix<MT,SO,DF> >
1084 {
1085  using Type = MultTrait_< DynamicVector<T,true>, MT >;
1086 };
1087 
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> >
1090 {
1091  using Type = MultTrait_< MT, CustomVector<T,AF,PF,false> >;
1092 };
1093 
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> >
1096 {
1097  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1098 };
1099 
1100 template< typename MT, bool SO, bool DF, typename T >
1101 struct MultTrait< HermitianMatrix<MT,SO,DF>, CompressedVector<T,false> >
1102 {
1103  using Type = MultTrait_< MT, CompressedVector<T,false> >;
1104 };
1105 
1106 template< typename T, typename MT, bool SO, bool DF >
1107 struct MultTrait< CompressedVector<T,true>, HermitianMatrix<MT,SO,DF> >
1108 {
1109  using Type = MultTrait_< CompressedVector<T,true>, MT >;
1110 };
1111 
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> >
1114 {
1115  using Type = MultTrait_< MT, StaticMatrix<T,M,N,SO2> >;
1116 };
1117 
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> >
1120 {
1121  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1122 };
1123 
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> >
1126 {
1127  using Type = MultTrait_< MT, HybridMatrix<T,M,N,SO2> >;
1128 };
1129 
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> >
1132 {
1133  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1134 };
1135 
1136 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1137 struct MultTrait< HermitianMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1138 {
1139  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1140 };
1141 
1142 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1143 struct MultTrait< DynamicMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1144 {
1145  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1146 };
1147 
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> >
1150 {
1151  using Type = MultTrait_< MT, CustomMatrix<T,AF,PF,SO2> >;
1152 };
1153 
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> >
1156 {
1157  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1158 };
1159 
1160 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1161 struct MultTrait< HermitianMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1162 {
1163  using Type = MultTrait_< MT, CompressedMatrix<T,SO2> >;
1164 };
1165 
1166 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1167 struct MultTrait< CompressedMatrix<T,SO1>, HermitianMatrix<MT,SO2,DF> >
1168 {
1169  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1170 };
1171 
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> >
1174 {
1175  using Type = MultTrait_<MT1,MT2>;
1176 };
1177 
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> >
1180 {
1181  using Type = MultTrait_<MT1,MT2>;
1182 };
1183 
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> >
1186 {
1187  using Type = MultTrait_<MT1,MT2>;
1188 };
1190 //*************************************************************************************************
1191 
1192 
1193 
1194 
1195 //=================================================================================================
1196 //
1197 // DIVTRAIT SPECIALIZATIONS
1198 //
1199 //=================================================================================================
1200 
1201 //*************************************************************************************************
1203 template< typename MT, bool SO, bool DF, typename T >
1204 struct DivTrait< HermitianMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1205 {
1206  using Type = HermitianMatrix< DivTrait_<MT,T> >;
1207 };
1209 //*************************************************************************************************
1210 
1211 
1212 
1213 
1214 //=================================================================================================
1215 //
1216 // FOREACHTRAIT SPECIALIZATIONS
1217 //
1218 //=================================================================================================
1219 
1220 //*************************************************************************************************
1222 template< typename MT, bool SO, bool DF >
1223 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Abs >
1224 {
1225  using Type = HermitianMatrix< ForEachTrait_<MT,Abs> >;
1226 };
1227 
1228 template< typename MT, bool SO, bool DF >
1229 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Floor >
1230 {
1231  using Type = HermitianMatrix< ForEachTrait_<MT,Floor> >;
1232 };
1233 
1234 template< typename MT, bool SO, bool DF >
1235 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Ceil >
1236 {
1237  using Type = HermitianMatrix< ForEachTrait_<MT,Ceil> >;
1238 };
1239 
1240 template< typename MT, bool SO, bool DF >
1241 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Conj >
1242 {
1243  using Type = HermitianMatrix< ForEachTrait_<MT,Conj> >;
1244 };
1245 
1246 template< typename MT, bool SO, bool DF >
1247 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Real >
1248 {
1249  using Type = HermitianMatrix< ForEachTrait_<MT,Real> >;
1250 };
1251 
1252 template< typename MT, bool SO, bool DF >
1253 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Imag >
1254 {
1255  using Type = If_< IsBuiltin< ElementType_<MT> >
1256  , HermitianMatrix< ForEachTrait_<MT,Imag> >
1257  , ForEachTrait_<MT,Imag> >;
1258 };
1259 
1260 template< typename MT, bool SO, bool DF >
1261 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sqrt >
1262 {
1263  using Type = HermitianMatrix< ForEachTrait_<MT,Sqrt> >;
1264 };
1265 
1266 template< typename MT, bool SO, bool DF >
1267 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, InvSqrt >
1268 {
1269  using Type = HermitianMatrix< ForEachTrait_<MT,InvSqrt> >;
1270 };
1271 
1272 template< typename MT, bool SO, bool DF >
1273 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cbrt >
1274 {
1275  using Type = HermitianMatrix< ForEachTrait_<MT,Cbrt> >;
1276 };
1277 
1278 template< typename MT, bool SO, bool DF >
1279 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, InvCbrt >
1280 {
1281  using Type = HermitianMatrix< ForEachTrait_<MT,InvCbrt> >;
1282 };
1283 
1284 template< typename MT, bool SO, bool DF, typename ET >
1285 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Pow<ET> >
1286 {
1287  using Type = HermitianMatrix< ForEachTrait_< MT, Pow<ET> > >;
1288 };
1289 
1290 template< typename MT, bool SO, bool DF >
1291 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Exp >
1292 {
1293  using Type = HermitianMatrix< ForEachTrait_< MT, Exp > >;
1294 };
1295 
1296 template< typename MT, bool SO, bool DF >
1297 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Log >
1298 {
1299  using Type = HermitianMatrix< ForEachTrait_< MT, Log > >;
1300 };
1301 
1302 template< typename MT, bool SO, bool DF >
1303 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Log10 >
1304 {
1305  using Type = HermitianMatrix< ForEachTrait_< MT, Log10 > >;
1306 };
1307 
1308 template< typename MT, bool SO, bool DF >
1309 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sin >
1310 {
1311  using Type = HermitianMatrix< ForEachTrait_< MT, Sin > >;
1312 };
1313 
1314 template< typename MT, bool SO, bool DF >
1315 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Asin >
1316 {
1317  using Type = HermitianMatrix< ForEachTrait_< MT, Asin > >;
1318 };
1319 
1320 template< typename MT, bool SO, bool DF >
1321 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Sinh >
1322 {
1323  using Type = HermitianMatrix< ForEachTrait_< MT, Sinh > >;
1324 };
1325 
1326 template< typename MT, bool SO, bool DF >
1327 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Asinh >
1328 {
1329  using Type = HermitianMatrix< ForEachTrait_< MT, Asinh > >;
1330 };
1331 
1332 template< typename MT, bool SO, bool DF >
1333 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cos >
1334 {
1335  using Type = HermitianMatrix< ForEachTrait_< MT, Cos > >;
1336 };
1337 
1338 template< typename MT, bool SO, bool DF >
1339 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Acos >
1340 {
1341  using Type = HermitianMatrix< ForEachTrait_< MT, Acos > >;
1342 };
1343 
1344 template< typename MT, bool SO, bool DF >
1345 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Cosh >
1346 {
1347  using Type = HermitianMatrix< ForEachTrait_< MT, Cosh > >;
1348 };
1349 
1350 template< typename MT, bool SO, bool DF >
1351 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Acosh >
1352 {
1353  using Type = HermitianMatrix< ForEachTrait_< MT, Acosh > >;
1354 };
1355 
1356 template< typename MT, bool SO, bool DF >
1357 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Tan >
1358 {
1359  using Type = HermitianMatrix< ForEachTrait_< MT, Tan > >;
1360 };
1361 
1362 template< typename MT, bool SO, bool DF >
1363 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Atan >
1364 {
1365  using Type = HermitianMatrix< ForEachTrait_< MT, Atan > >;
1366 };
1367 
1368 template< typename MT, bool SO, bool DF >
1369 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Tanh >
1370 {
1371  using Type = HermitianMatrix< ForEachTrait_< MT, Tanh > >;
1372 };
1373 
1374 template< typename MT, bool SO, bool DF >
1375 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Atanh >
1376 {
1377  using Type = HermitianMatrix< ForEachTrait_< MT, Atanh > >;
1378 };
1379 
1380 template< typename MT, bool SO, bool DF >
1381 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Erf >
1382 {
1383  using Type = HermitianMatrix< ForEachTrait_<MT,Erf> >;
1384 };
1385 
1386 template< typename MT, bool SO, bool DF >
1387 struct ForEachTrait< HermitianMatrix<MT,SO,DF>, Erfc >
1388 {
1389  using Type = HermitianMatrix< ForEachTrait_<MT,Erfc> >;
1390 };
1392 //*************************************************************************************************
1393 
1394 
1395 
1396 
1397 //=================================================================================================
1398 //
1399 // MATHTRAIT SPECIALIZATIONS
1400 //
1401 //=================================================================================================
1402 
1403 //*************************************************************************************************
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> >
1407 {
1408  using HighType = HermitianMatrix< typename MathTrait<MT1,MT2>::HighType >;
1409  using LowType = HermitianMatrix< typename MathTrait<MT1,MT2>::LowType >;
1410 };
1412 //*************************************************************************************************
1413 
1414 
1415 
1416 
1417 //=================================================================================================
1418 //
1419 // SUBMATRIXTRAIT SPECIALIZATIONS
1420 //
1421 //=================================================================================================
1422 
1423 //*************************************************************************************************
1425 template< typename MT, bool SO, bool DF >
1426 struct SubmatrixTrait< HermitianMatrix<MT,SO,DF> >
1427 {
1428  using Type = SubmatrixTrait_<MT>;
1429 };
1431 //*************************************************************************************************
1432 
1433 
1434 
1435 
1436 //=================================================================================================
1437 //
1438 // ROWTRAIT SPECIALIZATIONS
1439 //
1440 //=================================================================================================
1441 
1442 //*************************************************************************************************
1444 template< typename MT, bool SO, bool DF >
1445 struct RowTrait< HermitianMatrix<MT,SO,DF> >
1446 {
1447  using Type = RowTrait_<MT>;
1448 };
1450 //*************************************************************************************************
1451 
1452 
1453 
1454 
1455 //=================================================================================================
1456 //
1457 // COLUMNTRAIT SPECIALIZATIONS
1458 //
1459 //=================================================================================================
1460 
1461 //*************************************************************************************************
1463 template< typename MT, bool SO, bool DF >
1464 struct ColumnTrait< HermitianMatrix<MT,SO,DF> >
1465 {
1466  using Type = ColumnTrait_<MT>;
1467 };
1469 //*************************************************************************************************
1470 
1471 } // namespace blaze
1472 
1473 #endif
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