SymmetricMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_SYMMETRICMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
51 #include <blaze/math/Exception.h>
53 #include <blaze/math/Forward.h>
86 #include <blaze/util/Assert.h>
87 #include <blaze/util/EnableIf.h>
89 #include <blaze/util/TrueType.h>
92 #include <blaze/util/Unused.h>
93 
94 
95 namespace blaze {
96 
97 //=================================================================================================
98 //
99 // SYMMETRICMATRIX OPERATORS
100 //
101 //=================================================================================================
102 
103 //*************************************************************************************************
106 template< typename MT, bool SO, bool DF, bool NF >
107 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m );
108 
109 template< typename MT, bool SO, bool DF, bool NF >
110 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m, size_t i );
111 
112 template< typename MT, bool SO, bool DF, bool NF >
113 inline void clear( SymmetricMatrix<MT,SO,DF,NF>& m );
114 
115 template< bool RF, typename MT, bool SO, bool DF, bool NF >
116 inline bool isDefault( const SymmetricMatrix<MT,SO,DF,NF>& m );
117 
118 template< typename MT, bool SO, bool DF, bool NF >
119 inline bool isIntact( const SymmetricMatrix<MT,SO,DF,NF>& m );
120 
121 template< typename MT, bool SO, bool DF, bool NF >
122 inline void swap( SymmetricMatrix<MT,SO,DF,NF>& a, SymmetricMatrix<MT,SO,DF,NF>& b ) noexcept;
124 //*************************************************************************************************
125 
126 
127 //*************************************************************************************************
134 template< typename MT // Type of the adapted matrix
135  , bool SO // Storage order of the adapted matrix
136  , bool DF // Density flag
137  , bool NF > // Numeric flag
139 {
140  m.reset();
141 }
142 //*************************************************************************************************
143 
144 
145 //*************************************************************************************************
158 template< typename MT // Type of the adapted matrix
159  , bool SO // Storage order of the adapted matrix
160  , bool DF // Density flag
161  , bool NF > // Numeric flag
162 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m, size_t i )
163 {
164  m.reset( i );
165 }
166 //*************************************************************************************************
167 
168 
169 //*************************************************************************************************
176 template< typename MT // Type of the adapted matrix
177  , bool SO // Storage order of the adapted matrix
178  , bool DF // Density flag
179  , bool NF > // Numeric flag
181 {
182  m.clear();
183 }
184 //*************************************************************************************************
185 
186 
187 //*************************************************************************************************
212 template< bool RF // Relaxation flag
213  , typename MT // Type of the adapted matrix
214  , bool SO // Storage order of the adapted matrix
215  , bool DF // Density flag
216  , bool NF > // Numeric flag
218 {
219  return isDefault<RF>( m.matrix_ );
220 }
221 //*************************************************************************************************
222 
223 
224 //*************************************************************************************************
245 template< typename MT // Type of the adapted matrix
246  , bool SO // Storage order of the adapted matrix
247  , bool DF // Density flag
248  , bool NF > // Numeric flag
249 inline bool isIntact( const SymmetricMatrix<MT,SO,DF,NF>& m )
250 {
251  return m.isIntact();
252 }
253 //*************************************************************************************************
254 
255 
256 //*************************************************************************************************
264 template< typename MT // Type of the adapted matrix
265  , bool SO // Storage order of the adapted matrix
266  , bool DF // Density flag
267  , bool NF > // Numeric flag
269 {
270  a.swap( b );
271 }
272 //*************************************************************************************************
273 
274 
275 //*************************************************************************************************
298 template< InversionFlag IF // Inversion algorithm
299  , typename MT // Type of the dense matrix
300  , bool SO > // Storage order of the dense matrix
302 {
304 
305  if( IF == asUniLower || IF == asUniUpper ) {
306  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
307  return;
308  }
309 
310  constexpr InversionFlag flag( ( IF == byLU || IF == byLDLT || IF == byLDLH ||
311  IF == asGeneral || IF == asSymmetric || IF == asHermitian )
312  ? ( byLDLT )
313  : ( ( IF == byLLH )
314  ?( byLLH )
315  :( asDiagonal ) ) );
316 
317  MT tmp( m.matrix_ );
318  invert<flag>( tmp );
319  m.matrix_ = std::move( tmp );
320 
321  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
322 }
324 //*************************************************************************************************
325 
326 
327 //*************************************************************************************************
343 template< typename MT1 // Type of the adapted matrix
344  , bool SO1 // Storage order of the adapted matrix
345  , bool DF // Density flag
346  , bool NF // Numeric flag
347  , typename MT2 // Type of the right-hand side matrix
348  , bool SO2 > // Storage order of the right-hand side matrix
349 inline bool tryAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
350  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
351 {
353 
354  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
355  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
356  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
357  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
358 
359  UNUSED_PARAMETER( lhs );
360 
361  const size_t M( (~rhs).rows() );
362  const size_t N( (~rhs).columns() );
363 
364  if( ( row + M <= column ) || ( column + N <= row ) )
365  return true;
366 
367  const bool lower( row > column );
368  const size_t size ( min( row + M, column + N ) - ( lower ? row : column ) );
369 
370  if( size < 2UL )
371  return true;
372 
373  const size_t subrow( lower ? 0UL : column - row );
374  const size_t subcol( lower ? row - column : 0UL );
375 
376  return isSymmetric( submatrix( ~rhs, subrow, subcol, size, size ) );
377 }
379 //*************************************************************************************************
380 
381 
382 //*************************************************************************************************
398 template< typename MT1 // Type of the adapted matrix
399  , bool SO1 // Storage order of the adapted matrix
400  , bool DF // Density flag
401  , bool NF // Numeric flag
402  , typename MT2 // Type of the right-hand side matrix
403  , bool SO2 > // Storage order of the right-hand side matrix
404 inline bool tryAddAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
405  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
406 {
407  return tryAssign( lhs, ~rhs, row, column );
408 }
410 //*************************************************************************************************
411 
412 
413 //*************************************************************************************************
430 template< typename MT1 // Type of the adapted matrix
431  , bool SO1 // Storage order of the adapted matrix
432  , bool DF // Density flag
433  , bool NF // Numeric flag
434  , typename MT2 // Type of the right-hand side matrix
435  , bool SO2 > // Storage order of the right-hand side matrix
436 inline bool trySubAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
437  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
438 {
439  return tryAssign( lhs, ~rhs, row, column );
440 }
442 //*************************************************************************************************
443 
444 
445 //*************************************************************************************************
462 template< typename MT1 // Type of the adapted matrix
463  , bool SO1 // Storage order of the adapted matrix
464  , bool DF // Density flag
465  , bool NF // Numeric flag
466  , typename MT2 // Type of the right-hand side matrix
467  , bool SO2 > // Storage order of the right-hand side matrix
468 inline bool trySchurAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
469  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
470 {
471  return tryAssign( lhs, ~rhs, row, column );
472 }
474 //*************************************************************************************************
475 
476 
477 
478 
479 //=================================================================================================
480 //
481 // ROWS SPECIALIZATIONS
482 //
483 //=================================================================================================
484 
485 //*************************************************************************************************
487 template< typename MT, bool SO, bool DF, bool NF >
488 struct Rows< SymmetricMatrix<MT,SO,DF,NF> >
489  : public Rows<MT>
490 {};
492 //*************************************************************************************************
493 
494 
495 
496 
497 //=================================================================================================
498 //
499 // COLUMNS SPECIALIZATIONS
500 //
501 //=================================================================================================
502 
503 //*************************************************************************************************
505 template< typename MT, bool SO, bool DF, bool NF >
506 struct Columns< SymmetricMatrix<MT,SO,DF,NF> >
507  : public Columns<MT>
508 {};
510 //*************************************************************************************************
511 
512 
513 
514 
515 //=================================================================================================
516 //
517 // ISSQUARE SPECIALIZATIONS
518 //
519 //=================================================================================================
520 
521 //*************************************************************************************************
523 template< typename MT, bool SO, bool DF, bool NF >
524 struct IsSquare< SymmetricMatrix<MT,SO,DF,NF> >
525  : public TrueType
526 {};
528 //*************************************************************************************************
529 
530 
531 
532 
533 //=================================================================================================
534 //
535 // ISSYMMETRIC SPECIALIZATIONS
536 //
537 //=================================================================================================
538 
539 //*************************************************************************************************
541 template< typename MT, bool SO, bool DF, bool NF >
542 struct IsSymmetric< SymmetricMatrix<MT,SO,DF,NF> >
543  : public TrueType
544 {};
546 //*************************************************************************************************
547 
548 
549 
550 
551 //=================================================================================================
552 //
553 // ISHERMITIAN SPECIALIZATIONS
554 //
555 //=================================================================================================
556 
557 //*************************************************************************************************
559 template< typename MT, bool SO, bool DF, bool NF >
560 struct IsHermitian< SymmetricMatrix<MT,SO,DF,NF> >
561  : public BoolConstant< IsBuiltin< ElementType_<MT> >::value >
562 {};
564 //*************************************************************************************************
565 
566 
567 
568 
569 //=================================================================================================
570 //
571 // ISADAPTOR SPECIALIZATIONS
572 //
573 //=================================================================================================
574 
575 //*************************************************************************************************
577 template< typename MT, bool SO, bool DF, bool NF >
578 struct IsAdaptor< SymmetricMatrix<MT,SO,DF,NF> >
579  : public TrueType
580 {};
582 //*************************************************************************************************
583 
584 
585 
586 
587 //=================================================================================================
588 //
589 // ISRESTRICTED SPECIALIZATIONS
590 //
591 //=================================================================================================
592 
593 //*************************************************************************************************
595 template< typename MT, bool SO, bool DF, bool NF >
596 struct IsRestricted< SymmetricMatrix<MT,SO,DF,NF> >
597  : public TrueType
598 {};
600 //*************************************************************************************************
601 
602 
603 
604 
605 //=================================================================================================
606 //
607 // HASCONSTDATAACCESS SPECIALIZATIONS
608 //
609 //=================================================================================================
610 
611 //*************************************************************************************************
613 template< typename MT, bool SO, bool NF >
614 struct HasConstDataAccess< SymmetricMatrix<MT,SO,true,NF> >
615  : public TrueType
616 {};
618 //*************************************************************************************************
619 
620 
621 
622 
623 //=================================================================================================
624 //
625 // ISALIGNED SPECIALIZATIONS
626 //
627 //=================================================================================================
628 
629 //*************************************************************************************************
631 template< typename MT, bool SO, bool DF, bool NF >
632 struct IsAligned< SymmetricMatrix<MT,SO,DF,NF> >
633  : public BoolConstant< IsAligned<MT>::value >
634 {};
636 //*************************************************************************************************
637 
638 
639 
640 
641 //=================================================================================================
642 //
643 // ISPADDED SPECIALIZATIONS
644 //
645 //=================================================================================================
646 
647 //*************************************************************************************************
649 template< typename MT, bool SO, bool DF, bool NF >
650 struct IsPadded< SymmetricMatrix<MT,SO,DF,NF> >
651  : public BoolConstant< IsPadded<MT>::value >
652 {};
654 //*************************************************************************************************
655 
656 
657 
658 
659 //=================================================================================================
660 //
661 // ISRESIZABLE SPECIALIZATIONS
662 //
663 //=================================================================================================
664 
665 //*************************************************************************************************
667 template< typename MT, bool SO, bool DF, bool NF >
668 struct IsResizable< SymmetricMatrix<MT,SO,DF,NF> >
669  : public BoolConstant< IsResizable<MT>::value >
670 {};
672 //*************************************************************************************************
673 
674 
675 
676 
677 //=================================================================================================
678 //
679 // ISSHRINKABLE SPECIALIZATIONS
680 //
681 //=================================================================================================
682 
683 //*************************************************************************************************
685 template< typename MT, bool SO, bool DF, bool NF >
686 struct IsShrinkable< SymmetricMatrix<MT,SO,DF,NF> >
687  : public BoolConstant< IsShrinkable<MT>::value >
688 {};
690 //*************************************************************************************************
691 
692 
693 
694 
695 //=================================================================================================
696 //
697 // REMOVEADAPTOR SPECIALIZATIONS
698 //
699 //=================================================================================================
700 
701 //*************************************************************************************************
703 template< typename MT, bool SO, bool DF, bool NF >
704 struct RemoveAdaptor< SymmetricMatrix<MT,SO,DF,NF> >
705 {
706  using Type = MT;
707 };
709 //*************************************************************************************************
710 
711 
712 
713 
714 //=================================================================================================
715 //
716 // ADDTRAIT SPECIALIZATIONS
717 //
718 //=================================================================================================
719 
720 //*************************************************************************************************
722 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
723 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
724 {
726 };
727 
728 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
729 struct AddTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
730 {
731  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
732 };
733 
734 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
735 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
736 {
738 };
739 
740 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
741 struct AddTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
742 {
743  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
744 };
745 
746 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
747 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
748 {
750 };
751 
752 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
753 struct AddTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
754 {
755  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
756 };
757 
758 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
759 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
760 {
762 };
763 
764 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
765 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
766 {
767  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
768 };
769 
770 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
771 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
772 {
774 };
775 
776 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
777 struct AddTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
778 {
779  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
780 };
781 
782 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
783 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
784 {
786 };
787 
788 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
789 struct AddTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
790 {
792 };
793 
794 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
795 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
796 {
798 };
800 //*************************************************************************************************
801 
802 
803 
804 
805 //=================================================================================================
806 //
807 // SUBTRAIT SPECIALIZATIONS
808 //
809 //=================================================================================================
810 
811 //*************************************************************************************************
813 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
814 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
815 {
817 };
818 
819 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
820 struct SubTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
821 {
822  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
823 };
824 
825 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
826 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
827 {
829 };
830 
831 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
832 struct SubTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
833 {
834  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
835 };
836 
837 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
838 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
839 {
841 };
842 
843 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
844 struct SubTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
845 {
846  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
847 };
848 
849 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
850 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
851 {
853 };
854 
855 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
856 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
857 {
858  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
859 };
860 
861 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
862 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
863 {
865 };
866 
867 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
868 struct SubTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
869 {
870  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
871 };
872 
873 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
874 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
875 {
877 };
878 
879 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
880 struct SubTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
881 {
883 };
884 
885 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
886 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
887 {
889 };
891 //*************************************************************************************************
892 
893 
894 
895 
896 //=================================================================================================
897 //
898 // SCHURTRAIT SPECIALIZATIONS
899 //
900 //=================================================================================================
901 
902 //*************************************************************************************************
904 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
905 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
906 {
908 };
909 
910 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
911 struct SchurTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
912 {
913  using Type = SchurTrait_< StaticMatrix<T,M,N,SO1>, MT >;
914 };
915 
916 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
917 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
918 {
920 };
921 
922 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
923 struct SchurTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
924 {
925  using Type = SchurTrait_< HybridMatrix<T,M,N,SO1>, MT >;
926 };
927 
928 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
929 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
930 {
932 };
933 
934 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
935 struct SchurTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
936 {
937  using Type = SchurTrait_< DynamicMatrix<T,SO1>, MT >;
938 };
939 
940 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
941 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
942 {
944 };
945 
946 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
947 struct SchurTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
948 {
949  using Type = SchurTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
950 };
951 
952 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
953 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
954 {
956 };
957 
958 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
959 struct SchurTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
960 {
961  using Type = SchurTrait_< CompressedMatrix<T,SO1>, MT >;
962 };
963 
964 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
965 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
966 {
968 };
969 
970 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
971 struct SchurTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
972 {
974 };
975 
976 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
977 struct SchurTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
978 {
980 };
982 //*************************************************************************************************
983 
984 
985 
986 
987 //=================================================================================================
988 //
989 // MULTTRAIT SPECIALIZATIONS
990 //
991 //=================================================================================================
992 
993 //*************************************************************************************************
995 template< typename MT, bool SO, bool DF, bool NF, typename T >
996 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, T, EnableIf_< IsNumeric<T> > >
997 {
998  using Type = SymmetricMatrix< MultTrait_<MT,T> >;
999 };
1000 
1001 template< typename T, typename MT, bool SO, bool DF, bool NF >
1002 struct MultTrait< T, SymmetricMatrix<MT,SO,DF,NF>, EnableIf_< IsNumeric<T> > >
1003 {
1004  using Type = SymmetricMatrix< MultTrait_<T,MT> >;
1005 };
1006 
1007 template< typename MT, bool SO, bool DF, bool NF, typename T, size_t N >
1008 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, StaticVector<T,N,false> >
1009 {
1011 };
1012 
1013 template< typename T, size_t N, typename MT, bool SO, bool DF, bool NF >
1014 struct MultTrait< StaticVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
1015 {
1016  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1017 };
1018 
1019 template< typename MT, bool SO, bool DF, bool NF, typename T, size_t N >
1020 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, HybridVector<T,N,false> >
1021 {
1023 };
1024 
1025 template< typename T, size_t N, typename MT, bool SO, bool DF, bool NF >
1026 struct MultTrait< HybridVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
1027 {
1028  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1029 };
1030 
1031 template< typename MT, bool SO, bool DF, bool NF, typename T >
1032 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, DynamicVector<T,false> >
1033 {
1035 };
1036 
1037 template< typename T, typename MT, bool SO, bool DF, bool NF >
1038 struct MultTrait< DynamicVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
1039 {
1040  using Type = MultTrait_< DynamicVector<T,true>, MT >;
1041 };
1042 
1043 template< typename MT, bool SO, bool DF, bool NF, typename T, bool AF, bool PF >
1044 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CustomVector<T,AF,PF,false> >
1045 {
1047 };
1048 
1049 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF, bool NF >
1050 struct MultTrait< CustomVector<T,AF,PF,true>, SymmetricMatrix<MT,SO,DF,NF> >
1051 {
1052  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1053 };
1054 
1055 template< typename MT, bool SO, bool DF, bool NF, typename T >
1056 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CompressedVector<T,false> >
1057 {
1059 };
1060 
1061 template< typename T, typename MT, bool SO, bool DF, bool NF >
1062 struct MultTrait< CompressedVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
1063 {
1064  using Type = MultTrait_< CompressedVector<T,true>, MT >;
1065 };
1066 
1067 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
1068 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
1069 {
1071 };
1072 
1073 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1074 struct MultTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1075 {
1076  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1077 };
1078 
1079 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
1080 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
1081 {
1083 };
1084 
1085 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1086 struct MultTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1087 {
1088  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1089 };
1090 
1091 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1092 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
1093 {
1094  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1095 };
1096 
1097 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1098 struct MultTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1099 {
1100  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1101 };
1102 
1103 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
1104 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
1105 {
1107 };
1108 
1109 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1110 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1111 {
1112  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1113 };
1114 
1115 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1116 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
1117 {
1119 };
1120 
1121 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1122 struct MultTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1123 {
1124  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1125 };
1126 
1127 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1128 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
1129 {
1131 };
1132 
1133 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1134 struct MultTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1135 {
1137 };
1138 
1139 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1140 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1141 {
1142  using Type = MultTrait_<MT1,MT2>;
1143 };
1145 //*************************************************************************************************
1146 
1147 
1148 
1149 
1150 //=================================================================================================
1151 //
1152 // DIVTRAIT SPECIALIZATIONS
1153 //
1154 //=================================================================================================
1155 
1156 //*************************************************************************************************
1158 template< typename MT, bool SO, bool DF, bool NF, typename T >
1159 struct DivTrait< SymmetricMatrix<MT,SO,DF,NF>, T, EnableIf_< IsNumeric<T> > >
1160 {
1161  using Type = SymmetricMatrix< DivTrait_<MT,T> >;
1162 };
1164 //*************************************************************************************************
1165 
1166 
1167 
1168 
1169 //=================================================================================================
1170 //
1171 // UNARYMAPTRAIT SPECIALIZATIONS
1172 //
1173 //=================================================================================================
1174 
1175 //*************************************************************************************************
1177 template< typename MT, bool SO, bool DF, bool NF >
1178 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Abs >
1179 {
1181 };
1182 
1183 template< typename MT, bool SO, bool DF, bool NF >
1184 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Floor >
1185 {
1187 };
1188 
1189 template< typename MT, bool SO, bool DF, bool NF >
1190 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Ceil >
1191 {
1193 };
1194 
1195 template< typename MT, bool SO, bool DF, bool NF >
1196 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Trunc >
1197 {
1199 };
1200 
1201 template< typename MT, bool SO, bool DF, bool NF >
1202 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Round >
1203 {
1205 };
1206 
1207 template< typename MT, bool SO, bool DF, bool NF >
1208 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Conj >
1209 {
1211 };
1212 
1213 template< typename MT, bool SO, bool DF, bool NF >
1214 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Real >
1215 {
1217 };
1218 
1219 template< typename MT, bool SO, bool DF, bool NF >
1220 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Imag >
1221 {
1223 };
1224 
1225 template< typename MT, bool SO, bool DF, bool NF >
1226 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sqrt >
1227 {
1229 };
1230 
1231 template< typename MT, bool SO, bool DF, bool NF >
1232 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, InvSqrt >
1233 {
1235 };
1236 
1237 template< typename MT, bool SO, bool DF, bool NF >
1238 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cbrt >
1239 {
1241 };
1242 
1243 template< typename MT, bool SO, bool DF, bool NF >
1244 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, InvCbrt >
1245 {
1247 };
1248 
1249 template< typename MT, bool SO, bool DF, bool NF, typename ET >
1250 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Pow<ET> >
1251 {
1253 };
1254 
1255 template< typename MT, bool SO, bool DF, bool NF >
1256 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Exp >
1257 {
1259 };
1260 
1261 template< typename MT, bool SO, bool DF, bool NF >
1262 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Log >
1263 {
1265 };
1266 
1267 template< typename MT, bool SO, bool DF, bool NF >
1268 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Log10 >
1269 {
1271 };
1272 
1273 template< typename MT, bool SO, bool DF, bool NF >
1274 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sin >
1275 {
1277 };
1278 
1279 template< typename MT, bool SO, bool DF, bool NF >
1280 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Asin >
1281 {
1283 };
1284 
1285 template< typename MT, bool SO, bool DF, bool NF >
1286 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sinh >
1287 {
1289 };
1290 
1291 template< typename MT, bool SO, bool DF, bool NF >
1292 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Asinh >
1293 {
1295 };
1296 
1297 template< typename MT, bool SO, bool DF, bool NF >
1298 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cos >
1299 {
1301 };
1302 
1303 template< typename MT, bool SO, bool DF, bool NF >
1304 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Acos >
1305 {
1307 };
1308 
1309 template< typename MT, bool SO, bool DF, bool NF >
1310 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cosh >
1311 {
1313 };
1314 
1315 template< typename MT, bool SO, bool DF, bool NF >
1316 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Acosh >
1317 {
1319 };
1320 
1321 template< typename MT, bool SO, bool DF, bool NF >
1322 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Tan >
1323 {
1325 };
1326 
1327 template< typename MT, bool SO, bool DF, bool NF >
1328 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Atan >
1329 {
1331 };
1332 
1333 template< typename MT, bool SO, bool DF, bool NF >
1334 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Tanh >
1335 {
1337 };
1338 
1339 template< typename MT, bool SO, bool DF, bool NF >
1340 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Atanh >
1341 {
1343 };
1344 
1345 template< typename MT, bool SO, bool DF, bool NF >
1346 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Erf >
1347 {
1349 };
1350 
1351 template< typename MT, bool SO, bool DF, bool NF >
1352 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Erfc >
1353 {
1355 };
1357 //*************************************************************************************************
1358 
1359 
1360 
1361 
1362 //=================================================================================================
1363 //
1364 // BINARYMAPTRAIT SPECIALIZATIONS
1365 //
1366 //=================================================================================================
1367 
1368 //*************************************************************************************************
1370 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1371 struct BinaryMapTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2>, Min >
1372 {
1374 };
1375 
1376 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1377 struct BinaryMapTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2>, Max >
1378 {
1380 };
1382 //*************************************************************************************************
1383 
1384 
1385 
1386 
1387 //=================================================================================================
1388 //
1389 // DECLSYMTRAIT SPECIALIZATIONS
1390 //
1391 //=================================================================================================
1392 
1393 //*************************************************************************************************
1395 template< typename MT, bool SO, bool DF, bool NF >
1396 struct DeclSymTrait< SymmetricMatrix<MT,SO,DF,NF> >
1397 {
1398  using Type = SymmetricMatrix<MT,SO,DF,NF>;
1399 };
1401 //*************************************************************************************************
1402 
1403 
1404 
1405 
1406 //=================================================================================================
1407 //
1408 // DECLHERMTRAIT SPECIALIZATIONS
1409 //
1410 //=================================================================================================
1411 
1412 //*************************************************************************************************
1414 template< typename MT, bool SO, bool DF, bool NF >
1415 struct DeclHermTrait< SymmetricMatrix<MT,SO,DF,NF> >
1416 {
1417  using Type = HermitianMatrix<MT>;
1418 };
1420 //*************************************************************************************************
1421 
1422 
1423 
1424 
1425 //=================================================================================================
1426 //
1427 // DECLLOWTRAIT SPECIALIZATIONS
1428 //
1429 //=================================================================================================
1430 
1431 //*************************************************************************************************
1433 template< typename MT, bool SO, bool DF, bool NF >
1434 struct DeclLowTrait< SymmetricMatrix<MT,SO,DF,NF> >
1435 {
1436  using Type = DiagonalMatrix<MT>;
1437 };
1439 //*************************************************************************************************
1440 
1441 
1442 
1443 
1444 //=================================================================================================
1445 //
1446 // DECLUPPTRAIT SPECIALIZATIONS
1447 //
1448 //=================================================================================================
1449 
1450 //*************************************************************************************************
1452 template< typename MT, bool SO, bool DF, bool NF >
1453 struct DeclUppTrait< SymmetricMatrix<MT,SO,DF,NF> >
1454 {
1455  using Type = DiagonalMatrix<MT>;
1456 };
1458 //*************************************************************************************************
1459 
1460 
1461 
1462 
1463 //=================================================================================================
1464 //
1465 // DECLDIAGTRAIT SPECIALIZATIONS
1466 //
1467 //=================================================================================================
1468 
1469 //*************************************************************************************************
1471 template< typename MT, bool SO, bool DF, bool NF >
1472 struct DeclDiagTrait< SymmetricMatrix<MT,SO,DF,NF> >
1473 {
1474  using Type = DiagonalMatrix<MT>;
1475 };
1477 //*************************************************************************************************
1478 
1479 
1480 
1481 
1482 //=================================================================================================
1483 //
1484 // HIGHTYPE SPECIALIZATIONS
1485 //
1486 //=================================================================================================
1487 
1488 //*************************************************************************************************
1490 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1491 struct HighType< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1492 {
1494 };
1496 //*************************************************************************************************
1497 
1498 
1499 
1500 
1501 //=================================================================================================
1502 //
1503 // LOWTYPE SPECIALIZATIONS
1504 //
1505 //=================================================================================================
1506 
1507 //*************************************************************************************************
1509 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1510 struct LowType< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1511 {
1513 };
1515 //*************************************************************************************************
1516 
1517 
1518 
1519 
1520 //=================================================================================================
1521 //
1522 // SUBMATRIXTRAIT SPECIALIZATIONS
1523 //
1524 //=================================================================================================
1525 
1526 //*************************************************************************************************
1528 template< typename MT, bool SO, bool DF, bool NF >
1529 struct SubmatrixTrait< SymmetricMatrix<MT,SO,DF,NF> >
1530 {
1531  using Type = SubmatrixTrait_<MT>;
1532 };
1534 //*************************************************************************************************
1535 
1536 
1537 
1538 
1539 //=================================================================================================
1540 //
1541 // ROWTRAIT SPECIALIZATIONS
1542 //
1543 //=================================================================================================
1544 
1545 //*************************************************************************************************
1547 template< typename MT, bool SO, bool DF, bool NF >
1548 struct RowTrait< SymmetricMatrix<MT,SO,DF,NF> >
1549 {
1550  using Type = RowTrait_<MT>;
1551 };
1553 //*************************************************************************************************
1554 
1555 
1556 
1557 
1558 //=================================================================================================
1559 //
1560 // COLUMNTRAIT SPECIALIZATIONS
1561 //
1562 //=================================================================================================
1563 
1564 //*************************************************************************************************
1566 template< typename MT, bool SO, bool DF, bool NF >
1567 struct ColumnTrait< SymmetricMatrix<MT,SO,DF,NF> >
1568 {
1569  using Type = ColumnTrait_<MT>;
1570 };
1572 //*************************************************************************************************
1573 
1574 } // namespace blaze
1575 
1576 #endif
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Header file for the decldiag trait.
Header file for the Schur product trait.
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
Flag for the inversion of a diagonal matrix.
Definition: InversionFlag.h:115
Flag for the inversion of a general matrix (same as byLU).
Definition: InversionFlag.h:108
Header file for the row trait.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:128
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:127
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
typename RowTrait< MT >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:162
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Base template for the DeclUppTrait class.
Definition: DeclUppTrait.h:133
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the dense matrix inversion flags.
Base template for the SchurTrait class.
Definition: SchurTrait.h:124
Flag for the Bunch-Kaufman-based inversion for Hermitian matrices.
Definition: InversionFlag.h:105
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
Submatrix< MT, AF > 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:352
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
Matrix adapter for symmetric matrices.
Definition: BaseTemplate.h:611
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:250
Column< MT > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:124
Header file for the implementation of the base template of the SymmetricMatrix.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1686
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Header file for the IsSquare type trait.
Row< MT > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:124
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Base template for the RowTrait class.
Definition: RowTrait.h:127
Constraint on the data type.
SymmetricMatrix specialization for dense matrices with non-numeric element type.
Header file for the LowType type trait.
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the unary map trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Header file for the IsShrinkable type trait.
Header file for all forward declarations of the math module.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
SymmetricMatrix specialization for sparse matrices with numeric element type.
Header file for the decllow trait.
Header file for the Columns type trait.
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Flag for the inversion of a Hermitian matrix (same as byLDLH).
Definition: InversionFlag.h:110
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
typename SchurTrait< T1, T2 >::Type SchurTrait_
Auxiliary alias declaration for the SchurTrait class template.The SchurTrait_ alias declaration provi...
Definition: SchurTrait.h:167
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:340
Flag for the Bunch-Kaufman-based inversion for symmetric matrices.
Definition: InversionFlag.h:104
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:134
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
Header file for the exception macros of the math module.
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:580
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Compile time check for shrinkable data types.This type trait tests whether the given data type is a s...
Definition: IsShrinkable.h:75
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the declupp trait.
SymmetricMatrix specialization for sparse matrices with non-numeric element type. ...
Flag for the inversion of a symmetric matrix (same as byLDLT).
Definition: InversionFlag.h:109
Header file for the binary map trait.
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:139
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:134
Base template for the MultTrait class.
Definition: MultTrait.h:139
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Header file for the declsym trait.
Matrix adapter for Hermitian matrices.
Definition: BaseTemplate.h:614
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:270
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
#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
Flag for the Cholesky-based inversion for positive-definite matrices.
Definition: InversionFlag.h:106
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:700
#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
typename SubmatrixTrait< MT >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:163
Base template for the DivTrait class.
Definition: DivTrait.h:139
SymmetricMatrix specialization for dense matrices with numeric element type.
typename ColumnTrait< MT >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:162
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:324
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:133
Removal of top level adaptor types.In case the given type is an adaptor type (SymmetricMatrix, LowerMatrix, UpperMatrix, ...), the RemoveAdaptor type trait removes the adaptor and extracts the contained general matrix type. Else the given type is returned as is. Note that cv-qualifiers are preserved.
Definition: RemoveAdaptor.h:76
Header file for the IsBuiltin type trait.
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:250
Header file for the isDivisor shim.
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:75
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
Base template for the SubTrait class.
Definition: SubTrait.h:139
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:560
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the IsHermitian type trait.
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:133
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:119
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:117
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:250
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#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 HighType type trait.
Header file for the TrueType type/value trait base class.