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>
90 #include <blaze/util/Assert.h>
91 #include <blaze/util/EnableIf.h>
92 #include <blaze/util/TrueType.h>
95 #include <blaze/util/Unused.h>
96 
97 
98 namespace blaze {
99 
100 //=================================================================================================
101 //
102 // SYMMETRICMATRIX OPERATORS
103 //
104 //=================================================================================================
105 
106 //*************************************************************************************************
109 template< typename MT, bool SO, bool DF, bool NF >
110 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m );
111 
112 template< typename MT, bool SO, bool DF, bool NF >
113 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m, size_t i );
114 
115 template< typename MT, bool SO, bool DF, bool NF >
116 inline void clear( SymmetricMatrix<MT,SO,DF,NF>& m );
117 
118 template< bool RF, typename MT, bool SO, bool DF, bool NF >
119 inline bool isDefault( const SymmetricMatrix<MT,SO,DF,NF>& m );
120 
121 template< typename MT, bool SO, bool DF, bool NF >
122 inline bool isIntact( const SymmetricMatrix<MT,SO,DF,NF>& m );
123 
124 template< typename MT, bool SO, bool DF, bool NF >
125 inline void swap( SymmetricMatrix<MT,SO,DF,NF>& a, SymmetricMatrix<MT,SO,DF,NF>& b ) noexcept;
127 //*************************************************************************************************
128 
129 
130 //*************************************************************************************************
137 template< typename MT // Type of the adapted matrix
138  , bool SO // Storage order of the adapted matrix
139  , bool DF // Density flag
140  , bool NF > // Numeric flag
142 {
143  m.reset();
144 }
145 //*************************************************************************************************
146 
147 
148 //*************************************************************************************************
161 template< typename MT // Type of the adapted matrix
162  , bool SO // Storage order of the adapted matrix
163  , bool DF // Density flag
164  , bool NF > // Numeric flag
165 inline void reset( SymmetricMatrix<MT,SO,DF,NF>& m, size_t i )
166 {
167  m.reset( i );
168 }
169 //*************************************************************************************************
170 
171 
172 //*************************************************************************************************
179 template< typename MT // Type of the adapted matrix
180  , bool SO // Storage order of the adapted matrix
181  , bool DF // Density flag
182  , bool NF > // Numeric flag
184 {
185  m.clear();
186 }
187 //*************************************************************************************************
188 
189 
190 //*************************************************************************************************
215 template< bool RF // Relaxation flag
216  , typename MT // Type of the adapted matrix
217  , bool SO // Storage order of the adapted matrix
218  , bool DF // Density flag
219  , bool NF > // Numeric flag
221 {
222  return isDefault<RF>( m.matrix_ );
223 }
224 //*************************************************************************************************
225 
226 
227 //*************************************************************************************************
248 template< typename MT // Type of the adapted matrix
249  , bool SO // Storage order of the adapted matrix
250  , bool DF // Density flag
251  , bool NF > // Numeric flag
252 inline bool isIntact( const SymmetricMatrix<MT,SO,DF,NF>& m )
253 {
254  return m.isIntact();
255 }
256 //*************************************************************************************************
257 
258 
259 //*************************************************************************************************
267 template< typename MT // Type of the adapted matrix
268  , bool SO // Storage order of the adapted matrix
269  , bool DF // Density flag
270  , bool NF > // Numeric flag
272 {
273  a.swap( b );
274 }
275 //*************************************************************************************************
276 
277 
278 //*************************************************************************************************
301 template< InversionFlag IF // Inversion algorithm
302  , typename MT // Type of the dense matrix
303  , bool SO > // Storage order of the dense matrix
305 {
307 
308  if( IF == asUniLower || IF == asUniUpper ) {
309  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
310  return;
311  }
312 
313  constexpr InversionFlag flag( ( IF == byLU || IF == byLDLT || IF == byLDLH ||
314  IF == asGeneral || IF == asSymmetric || IF == asHermitian )
315  ? ( byLDLT )
316  : ( ( IF == byLLH )
317  ?( byLLH )
318  :( asDiagonal ) ) );
319 
320  MT tmp( m.matrix_ );
321  invert<flag>( tmp );
322  m.matrix_ = std::move( tmp );
323 
324  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
325 }
327 //*************************************************************************************************
328 
329 
330 //*************************************************************************************************
346 template< typename MT1 // Type of the adapted matrix
347  , bool SO1 // Storage order of the adapted matrix
348  , bool DF // Density flag
349  , bool NF // Numeric flag
350  , typename MT2 // Type of the right-hand side matrix
351  , bool SO2 > // Storage order of the right-hand side matrix
352 inline bool tryAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
353  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
354 {
356 
357  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
358  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
359  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
360  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
361 
362  UNUSED_PARAMETER( lhs );
363 
364  const size_t M( (~rhs).rows() );
365  const size_t N( (~rhs).columns() );
366 
367  if( ( row + M <= column ) || ( column + N <= row ) )
368  return true;
369 
370  const bool lower( row > column );
371  const size_t size ( min( row + M, column + N ) - ( lower ? row : column ) );
372 
373  if( size < 2UL )
374  return true;
375 
376  const size_t subrow( lower ? 0UL : column - row );
377  const size_t subcol( lower ? row - column : 0UL );
378 
379  return isSymmetric( submatrix( ~rhs, subrow, subcol, size, size ) );
380 }
382 //*************************************************************************************************
383 
384 
385 //*************************************************************************************************
401 template< typename MT1 // Type of the adapted matrix
402  , bool SO1 // Storage order of the adapted matrix
403  , bool DF // Density flag
404  , bool NF // Numeric flag
405  , typename MT2 // Type of the right-hand side matrix
406  , bool SO2 > // Storage order of the right-hand side matrix
407 inline bool tryAddAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
408  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
409 {
410  return tryAssign( lhs, ~rhs, row, column );
411 }
413 //*************************************************************************************************
414 
415 
416 //*************************************************************************************************
433 template< typename MT1 // Type of the adapted matrix
434  , bool SO1 // Storage order of the adapted matrix
435  , bool DF // Density flag
436  , bool NF // Numeric flag
437  , typename MT2 // Type of the right-hand side matrix
438  , bool SO2 > // Storage order of the right-hand side matrix
439 inline bool trySubAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
440  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
441 {
442  return tryAssign( lhs, ~rhs, row, column );
443 }
445 //*************************************************************************************************
446 
447 
448 //*************************************************************************************************
465 template< typename MT1 // Type of the adapted matrix
466  , bool SO1 // Storage order of the adapted matrix
467  , bool DF // Density flag
468  , bool NF // Numeric flag
469  , typename MT2 // Type of the right-hand side matrix
470  , bool SO2 > // Storage order of the right-hand side matrix
471 inline bool trySchurAssign( const SymmetricMatrix<MT1,SO1,DF,NF>& lhs,
472  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
473 {
474  return tryAssign( lhs, ~rhs, row, column );
475 }
477 //*************************************************************************************************
478 
479 
480 
481 
482 //=================================================================================================
483 //
484 // SIZE SPECIALIZATIONS
485 //
486 //=================================================================================================
487 
488 //*************************************************************************************************
490 template< typename MT, bool SO, bool DF, bool NF >
491 struct Size< SymmetricMatrix<MT,SO,DF,NF>, 0UL >
492  : public Size<MT,0UL>
493 {};
494 
495 template< typename MT, bool SO, bool DF, bool NF >
496 struct Size< SymmetricMatrix<MT,SO,DF,NF>, 1UL >
497  : public Size<MT,1UL>
498 {};
500 //*************************************************************************************************
501 
502 
503 
504 
505 //=================================================================================================
506 //
507 // ISSQUARE SPECIALIZATIONS
508 //
509 //=================================================================================================
510 
511 //*************************************************************************************************
513 template< typename MT, bool SO, bool DF, bool NF >
514 struct IsSquare< SymmetricMatrix<MT,SO,DF,NF> >
515  : public TrueType
516 {};
518 //*************************************************************************************************
519 
520 
521 
522 
523 //=================================================================================================
524 //
525 // ISSYMMETRIC SPECIALIZATIONS
526 //
527 //=================================================================================================
528 
529 //*************************************************************************************************
531 template< typename MT, bool SO, bool DF, bool NF >
532 struct IsSymmetric< SymmetricMatrix<MT,SO,DF,NF> >
533  : public TrueType
534 {};
536 //*************************************************************************************************
537 
538 
539 
540 
541 //=================================================================================================
542 //
543 // ISHERMITIAN SPECIALIZATIONS
544 //
545 //=================================================================================================
546 
547 //*************************************************************************************************
549 template< typename MT, bool SO, bool DF, bool NF >
550 struct IsHermitian< SymmetricMatrix<MT,SO,DF,NF> >
551  : public IsBuiltin< ElementType_<MT> >
552 {};
554 //*************************************************************************************************
555 
556 
557 
558 
559 //=================================================================================================
560 //
561 // ISADAPTOR SPECIALIZATIONS
562 //
563 //=================================================================================================
564 
565 //*************************************************************************************************
567 template< typename MT, bool SO, bool DF, bool NF >
568 struct IsAdaptor< SymmetricMatrix<MT,SO,DF,NF> >
569  : public TrueType
570 {};
572 //*************************************************************************************************
573 
574 
575 
576 
577 //=================================================================================================
578 //
579 // ISRESTRICTED SPECIALIZATIONS
580 //
581 //=================================================================================================
582 
583 //*************************************************************************************************
585 template< typename MT, bool SO, bool DF, bool NF >
586 struct IsRestricted< SymmetricMatrix<MT,SO,DF,NF> >
587  : public TrueType
588 {};
590 //*************************************************************************************************
591 
592 
593 
594 
595 //=================================================================================================
596 //
597 // HASCONSTDATAACCESS SPECIALIZATIONS
598 //
599 //=================================================================================================
600 
601 //*************************************************************************************************
603 template< typename MT, bool SO, bool NF >
604 struct HasConstDataAccess< SymmetricMatrix<MT,SO,true,NF> >
605  : public TrueType
606 {};
608 //*************************************************************************************************
609 
610 
611 
612 
613 //=================================================================================================
614 //
615 // ISALIGNED SPECIALIZATIONS
616 //
617 //=================================================================================================
618 
619 //*************************************************************************************************
621 template< typename MT, bool SO, bool DF, bool NF >
622 struct IsAligned< SymmetricMatrix<MT,SO,DF,NF> >
623  : public IsAligned<MT>
624 {};
626 //*************************************************************************************************
627 
628 
629 
630 
631 //=================================================================================================
632 //
633 // ISCONTIGUOUS SPECIALIZATIONS
634 //
635 //=================================================================================================
636 
637 //*************************************************************************************************
639 template< typename MT, bool SO, bool DF, bool NF >
640 struct IsContiguous< SymmetricMatrix<MT,SO,DF,NF> >
641  : public IsContiguous<MT>
642 {};
644 //*************************************************************************************************
645 
646 
647 
648 
649 //=================================================================================================
650 //
651 // ISPADDED SPECIALIZATIONS
652 //
653 //=================================================================================================
654 
655 //*************************************************************************************************
657 template< typename MT, bool SO, bool DF, bool NF >
658 struct IsPadded< SymmetricMatrix<MT,SO,DF,NF> >
659  : public IsPadded<MT>
660 {};
662 //*************************************************************************************************
663 
664 
665 
666 
667 //=================================================================================================
668 //
669 // ISRESIZABLE SPECIALIZATIONS
670 //
671 //=================================================================================================
672 
673 //*************************************************************************************************
675 template< typename MT, bool SO, bool DF, bool NF >
676 struct IsResizable< SymmetricMatrix<MT,SO,DF,NF> >
677  : public IsResizable<MT>
678 {};
680 //*************************************************************************************************
681 
682 
683 
684 
685 //=================================================================================================
686 //
687 // ISSHRINKABLE SPECIALIZATIONS
688 //
689 //=================================================================================================
690 
691 //*************************************************************************************************
693 template< typename MT, bool SO, bool DF, bool NF >
694 struct IsShrinkable< SymmetricMatrix<MT,SO,DF,NF> >
695  : public IsShrinkable<MT>
696 {};
698 //*************************************************************************************************
699 
700 
701 
702 
703 //=================================================================================================
704 //
705 // REMOVEADAPTOR SPECIALIZATIONS
706 //
707 //=================================================================================================
708 
709 //*************************************************************************************************
711 template< typename MT, bool SO, bool DF, bool NF >
712 struct RemoveAdaptor< SymmetricMatrix<MT,SO,DF,NF> >
713 {
714  using Type = MT;
715 };
717 //*************************************************************************************************
718 
719 
720 
721 
722 //=================================================================================================
723 //
724 // ADDTRAIT SPECIALIZATIONS
725 //
726 //=================================================================================================
727 
728 //*************************************************************************************************
730 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
731 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
732 {
734 };
735 
736 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
737 struct AddTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
738 {
739  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
740 };
741 
742 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
743 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
744 {
746 };
747 
748 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
749 struct AddTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
750 {
751  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
752 };
753 
754 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
755 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
756 {
758 };
759 
760 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
761 struct AddTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
762 {
763  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
764 };
765 
766 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
767 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
768 {
770 };
771 
772 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
773 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
774 {
775  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
776 };
777 
778 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
779 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
780 {
782 };
783 
784 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
785 struct AddTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
786 {
787  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
788 };
789 
790 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
791 struct AddTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
792 {
794 };
795 
796 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
797 struct AddTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
798 {
800 };
801 
802 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
803 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
804 {
806 };
808 //*************************************************************************************************
809 
810 
811 
812 
813 //=================================================================================================
814 //
815 // SUBTRAIT SPECIALIZATIONS
816 //
817 //=================================================================================================
818 
819 //*************************************************************************************************
821 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
822 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
823 {
825 };
826 
827 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
828 struct SubTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
829 {
830  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
831 };
832 
833 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
834 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
835 {
837 };
838 
839 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
840 struct SubTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
841 {
842  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
843 };
844 
845 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
846 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
847 {
849 };
850 
851 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
852 struct SubTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
853 {
854  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
855 };
856 
857 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
858 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
859 {
861 };
862 
863 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
864 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
865 {
866  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
867 };
868 
869 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
870 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
871 {
873 };
874 
875 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
876 struct SubTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
877 {
878  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
879 };
880 
881 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
882 struct SubTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
883 {
885 };
886 
887 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
888 struct SubTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
889 {
891 };
892 
893 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
894 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
895 {
897 };
899 //*************************************************************************************************
900 
901 
902 
903 
904 //=================================================================================================
905 //
906 // SCHURTRAIT SPECIALIZATIONS
907 //
908 //=================================================================================================
909 
910 //*************************************************************************************************
912 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
913 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
914 {
916 };
917 
918 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
919 struct SchurTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
920 {
921  using Type = SchurTrait_< StaticMatrix<T,M,N,SO1>, MT >;
922 };
923 
924 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
925 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
926 {
928 };
929 
930 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
931 struct SchurTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
932 {
933  using Type = SchurTrait_< HybridMatrix<T,M,N,SO1>, MT >;
934 };
935 
936 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
937 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
938 {
940 };
941 
942 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
943 struct SchurTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
944 {
945  using Type = SchurTrait_< DynamicMatrix<T,SO1>, MT >;
946 };
947 
948 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
949 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
950 {
952 };
953 
954 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
955 struct SchurTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
956 {
957  using Type = SchurTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
958 };
959 
960 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
961 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
962 {
964 };
965 
966 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
967 struct SchurTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
968 {
969  using Type = SchurTrait_< CompressedMatrix<T,SO1>, MT >;
970 };
971 
972 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
973 struct SchurTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
974 {
976 };
977 
978 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
979 struct SchurTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
980 {
982 };
983 
984 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
985 struct SchurTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
986 {
988 };
990 //*************************************************************************************************
991 
992 
993 
994 
995 //=================================================================================================
996 //
997 // MULTTRAIT SPECIALIZATIONS
998 //
999 //=================================================================================================
1000 
1001 //*************************************************************************************************
1003 template< typename MT, bool SO, bool DF, bool NF, typename T >
1004 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, T, EnableIf_< IsNumeric<T> > >
1005 {
1006  using Type = SymmetricMatrix< MultTrait_<MT,T> >;
1007 };
1008 
1009 template< typename T, typename MT, bool SO, bool DF, bool NF >
1010 struct MultTrait< T, SymmetricMatrix<MT,SO,DF,NF>, EnableIf_< IsNumeric<T> > >
1011 {
1012  using Type = SymmetricMatrix< MultTrait_<T,MT> >;
1013 };
1014 
1015 template< typename MT, bool SO, bool DF, bool NF, typename T, size_t N >
1016 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, StaticVector<T,N,false> >
1017 {
1019 };
1020 
1021 template< typename T, size_t N, typename MT, bool SO, bool DF, bool NF >
1022 struct MultTrait< StaticVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
1023 {
1024  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1025 };
1026 
1027 template< typename MT, bool SO, bool DF, bool NF, typename T, size_t N >
1028 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, HybridVector<T,N,false> >
1029 {
1031 };
1032 
1033 template< typename T, size_t N, typename MT, bool SO, bool DF, bool NF >
1034 struct MultTrait< HybridVector<T,N,true>, SymmetricMatrix<MT,SO,DF,NF> >
1035 {
1036  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1037 };
1038 
1039 template< typename MT, bool SO, bool DF, bool NF, typename T >
1040 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, DynamicVector<T,false> >
1041 {
1043 };
1044 
1045 template< typename T, typename MT, bool SO, bool DF, bool NF >
1046 struct MultTrait< DynamicVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
1047 {
1048  using Type = MultTrait_< DynamicVector<T,true>, MT >;
1049 };
1050 
1051 template< typename MT, bool SO, bool DF, bool NF, typename T, bool AF, bool PF >
1052 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CustomVector<T,AF,PF,false> >
1053 {
1055 };
1056 
1057 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF, bool NF >
1058 struct MultTrait< CustomVector<T,AF,PF,true>, SymmetricMatrix<MT,SO,DF,NF> >
1059 {
1060  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1061 };
1062 
1063 template< typename MT, bool SO, bool DF, bool NF, typename T >
1064 struct MultTrait< SymmetricMatrix<MT,SO,DF,NF>, CompressedVector<T,false> >
1065 {
1067 };
1068 
1069 template< typename T, typename MT, bool SO, bool DF, bool NF >
1070 struct MultTrait< CompressedVector<T,true>, SymmetricMatrix<MT,SO,DF,NF> >
1071 {
1072  using Type = MultTrait_< CompressedVector<T,true>, MT >;
1073 };
1074 
1075 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
1076 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, StaticMatrix<T,M,N,SO2> >
1077 {
1079 };
1080 
1081 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1082 struct MultTrait< StaticMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1083 {
1084  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1085 };
1086 
1087 template< typename MT, bool SO1, bool DF, bool NF, typename T, size_t M, size_t N, bool SO2 >
1088 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, HybridMatrix<T,M,N,SO2> >
1089 {
1091 };
1092 
1093 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1094 struct MultTrait< HybridMatrix<T,M,N,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1095 {
1096  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1097 };
1098 
1099 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1100 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, DynamicMatrix<T,SO2> >
1101 {
1102  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1103 };
1104 
1105 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1106 struct MultTrait< DynamicMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1107 {
1108  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1109 };
1110 
1111 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool AF, bool PF, bool SO2 >
1112 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CustomMatrix<T,AF,PF,SO2> >
1113 {
1115 };
1116 
1117 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1118 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1119 {
1120  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1121 };
1122 
1123 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1124 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, CompressedMatrix<T,SO2> >
1125 {
1127 };
1128 
1129 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1130 struct MultTrait< CompressedMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1131 {
1132  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1133 };
1134 
1135 template< typename MT, bool SO1, bool DF, bool NF, typename T, bool SO2 >
1136 struct MultTrait< SymmetricMatrix<MT,SO1,DF,NF>, IdentityMatrix<T,SO2> >
1137 {
1139 };
1140 
1141 template< typename T, bool SO1, typename MT, bool SO2, bool DF, bool NF >
1142 struct MultTrait< IdentityMatrix<T,SO1>, SymmetricMatrix<MT,SO2,DF,NF> >
1143 {
1145 };
1146 
1147 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1148 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1149 {
1150  using Type = MultTrait_<MT1,MT2>;
1151 };
1153 //*************************************************************************************************
1154 
1155 
1156 
1157 
1158 //=================================================================================================
1159 //
1160 // DIVTRAIT SPECIALIZATIONS
1161 //
1162 //=================================================================================================
1163 
1164 //*************************************************************************************************
1166 template< typename MT, bool SO, bool DF, bool NF, typename T >
1167 struct DivTrait< SymmetricMatrix<MT,SO,DF,NF>, T, EnableIf_< IsNumeric<T> > >
1168 {
1169  using Type = SymmetricMatrix< DivTrait_<MT,T> >;
1170 };
1172 //*************************************************************************************************
1173 
1174 
1175 
1176 
1177 //=================================================================================================
1178 //
1179 // UNARYMAPTRAIT SPECIALIZATIONS
1180 //
1181 //=================================================================================================
1182 
1183 //*************************************************************************************************
1185 template< typename MT, bool SO, bool DF, bool NF >
1186 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Abs >
1187 {
1189 };
1190 
1191 template< typename MT, bool SO, bool DF, bool NF >
1192 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Floor >
1193 {
1195 };
1196 
1197 template< typename MT, bool SO, bool DF, bool NF >
1198 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Ceil >
1199 {
1201 };
1202 
1203 template< typename MT, bool SO, bool DF, bool NF >
1204 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Trunc >
1205 {
1207 };
1208 
1209 template< typename MT, bool SO, bool DF, bool NF >
1210 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Round >
1211 {
1213 };
1214 
1215 template< typename MT, bool SO, bool DF, bool NF >
1216 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Conj >
1217 {
1219 };
1220 
1221 template< typename MT, bool SO, bool DF, bool NF >
1222 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Real >
1223 {
1225 };
1226 
1227 template< typename MT, bool SO, bool DF, bool NF >
1228 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Imag >
1229 {
1231 };
1232 
1233 template< typename MT, bool SO, bool DF, bool NF >
1234 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sqrt >
1235 {
1237 };
1238 
1239 template< typename MT, bool SO, bool DF, bool NF >
1240 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, InvSqrt >
1241 {
1243 };
1244 
1245 template< typename MT, bool SO, bool DF, bool NF >
1246 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cbrt >
1247 {
1249 };
1250 
1251 template< typename MT, bool SO, bool DF, bool NF >
1252 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, InvCbrt >
1253 {
1255 };
1256 
1257 template< typename MT, bool SO, bool DF, bool NF, typename ET >
1258 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, UnaryPow<ET> >
1259 {
1261 };
1262 
1263 template< typename MT, bool SO, bool DF, bool NF >
1264 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Exp >
1265 {
1267 };
1268 
1269 template< typename MT, bool SO, bool DF, bool NF >
1270 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Log >
1271 {
1273 };
1274 
1275 template< typename MT, bool SO, bool DF, bool NF >
1276 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Log10 >
1277 {
1279 };
1280 
1281 template< typename MT, bool SO, bool DF, bool NF >
1282 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sin >
1283 {
1285 };
1286 
1287 template< typename MT, bool SO, bool DF, bool NF >
1288 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Asin >
1289 {
1291 };
1292 
1293 template< typename MT, bool SO, bool DF, bool NF >
1294 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Sinh >
1295 {
1297 };
1298 
1299 template< typename MT, bool SO, bool DF, bool NF >
1300 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Asinh >
1301 {
1303 };
1304 
1305 template< typename MT, bool SO, bool DF, bool NF >
1306 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cos >
1307 {
1309 };
1310 
1311 template< typename MT, bool SO, bool DF, bool NF >
1312 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Acos >
1313 {
1315 };
1316 
1317 template< typename MT, bool SO, bool DF, bool NF >
1318 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Cosh >
1319 {
1321 };
1322 
1323 template< typename MT, bool SO, bool DF, bool NF >
1324 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Acosh >
1325 {
1327 };
1328 
1329 template< typename MT, bool SO, bool DF, bool NF >
1330 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Tan >
1331 {
1333 };
1334 
1335 template< typename MT, bool SO, bool DF, bool NF >
1336 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Atan >
1337 {
1339 };
1340 
1341 template< typename MT, bool SO, bool DF, bool NF >
1342 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Tanh >
1343 {
1345 };
1346 
1347 template< typename MT, bool SO, bool DF, bool NF >
1348 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Atanh >
1349 {
1351 };
1352 
1353 template< typename MT, bool SO, bool DF, bool NF >
1354 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Erf >
1355 {
1357 };
1358 
1359 template< typename MT, bool SO, bool DF, bool NF >
1360 struct UnaryMapTrait< SymmetricMatrix<MT,SO,DF,NF>, Erfc >
1361 {
1363 };
1365 //*************************************************************************************************
1366 
1367 
1368 
1369 
1370 //=================================================================================================
1371 //
1372 // BINARYMAPTRAIT SPECIALIZATIONS
1373 //
1374 //=================================================================================================
1375 
1376 //*************************************************************************************************
1378 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1379 struct BinaryMapTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2>, Min >
1380 {
1382 };
1383 
1384 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1385 struct BinaryMapTrait< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2>, Max >
1386 {
1388 };
1390 //*************************************************************************************************
1391 
1392 
1393 
1394 
1395 //=================================================================================================
1396 //
1397 // DECLSYMTRAIT SPECIALIZATIONS
1398 //
1399 //=================================================================================================
1400 
1401 //*************************************************************************************************
1403 template< typename MT, bool SO, bool DF, bool NF >
1404 struct DeclSymTrait< SymmetricMatrix<MT,SO,DF,NF> >
1405 {
1406  using Type = SymmetricMatrix<MT,SO,DF,NF>;
1407 };
1409 //*************************************************************************************************
1410 
1411 
1412 
1413 
1414 //=================================================================================================
1415 //
1416 // DECLHERMTRAIT SPECIALIZATIONS
1417 //
1418 //=================================================================================================
1419 
1420 //*************************************************************************************************
1422 template< typename MT, bool SO, bool DF, bool NF >
1423 struct DeclHermTrait< SymmetricMatrix<MT,SO,DF,NF> >
1424 {
1425  using Type = HermitianMatrix<MT>;
1426 };
1428 //*************************************************************************************************
1429 
1430 
1431 
1432 
1433 //=================================================================================================
1434 //
1435 // DECLLOWTRAIT SPECIALIZATIONS
1436 //
1437 //=================================================================================================
1438 
1439 //*************************************************************************************************
1441 template< typename MT, bool SO, bool DF, bool NF >
1442 struct DeclLowTrait< SymmetricMatrix<MT,SO,DF,NF> >
1443 {
1444  using Type = DiagonalMatrix<MT>;
1445 };
1447 //*************************************************************************************************
1448 
1449 
1450 
1451 
1452 //=================================================================================================
1453 //
1454 // DECLUPPTRAIT SPECIALIZATIONS
1455 //
1456 //=================================================================================================
1457 
1458 //*************************************************************************************************
1460 template< typename MT, bool SO, bool DF, bool NF >
1461 struct DeclUppTrait< SymmetricMatrix<MT,SO,DF,NF> >
1462 {
1463  using Type = DiagonalMatrix<MT>;
1464 };
1466 //*************************************************************************************************
1467 
1468 
1469 
1470 
1471 //=================================================================================================
1472 //
1473 // DECLDIAGTRAIT SPECIALIZATIONS
1474 //
1475 //=================================================================================================
1476 
1477 //*************************************************************************************************
1479 template< typename MT, bool SO, bool DF, bool NF >
1480 struct DeclDiagTrait< SymmetricMatrix<MT,SO,DF,NF> >
1481 {
1482  using Type = DiagonalMatrix<MT>;
1483 };
1485 //*************************************************************************************************
1486 
1487 
1488 
1489 
1490 //=================================================================================================
1491 //
1492 // HIGHTYPE SPECIALIZATIONS
1493 //
1494 //=================================================================================================
1495 
1496 //*************************************************************************************************
1498 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1499 struct HighType< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1500 {
1502 };
1504 //*************************************************************************************************
1505 
1506 
1507 
1508 
1509 //=================================================================================================
1510 //
1511 // LOWTYPE SPECIALIZATIONS
1512 //
1513 //=================================================================================================
1514 
1515 //*************************************************************************************************
1517 template< typename MT1, bool SO1, bool DF1, bool NF1, typename MT2, bool SO2, bool DF2, bool NF2 >
1518 struct LowType< SymmetricMatrix<MT1,SO1,DF1,NF1>, SymmetricMatrix<MT2,SO2,DF2,NF2> >
1519 {
1521 };
1523 //*************************************************************************************************
1524 
1525 
1526 
1527 
1528 //=================================================================================================
1529 //
1530 // SUBMATRIXTRAIT SPECIALIZATIONS
1531 //
1532 //=================================================================================================
1533 
1534 //*************************************************************************************************
1536 template< typename MT, bool SO, bool DF, bool NF, size_t... CSAs >
1537 struct SubmatrixTrait< SymmetricMatrix<MT,SO,DF,NF>, CSAs... >
1538 {
1539  using Type = SubmatrixTrait_<MT,CSAs...>;
1540 };
1542 //*************************************************************************************************
1543 
1544 
1545 
1546 
1547 //=================================================================================================
1548 //
1549 // ROWTRAIT SPECIALIZATIONS
1550 //
1551 //=================================================================================================
1552 
1553 //*************************************************************************************************
1555 template< typename MT, bool SO, bool DF, bool NF, size_t... CRAs >
1556 struct RowTrait< SymmetricMatrix<MT,SO,DF,NF>, CRAs... >
1557 {
1558  using Type = RowTrait_<MT,CRAs...>;
1559 };
1561 //*************************************************************************************************
1562 
1563 
1564 
1565 
1566 //=================================================================================================
1567 //
1568 // ROWSTRAIT SPECIALIZATIONS
1569 //
1570 //=================================================================================================
1571 
1572 //*************************************************************************************************
1574 template< typename MT, bool SO, bool DF, bool NF, size_t... CRAs >
1575 struct RowsTrait< SymmetricMatrix<MT,SO,DF,NF>, CRAs... >
1576 {
1577  using Type = RowsTrait_<MT,CRAs...>;
1578 };
1580 //*************************************************************************************************
1581 
1582 
1583 
1584 
1585 //=================================================================================================
1586 //
1587 // COLUMNTRAIT SPECIALIZATIONS
1588 //
1589 //=================================================================================================
1590 
1591 //*************************************************************************************************
1593 template< typename MT, bool SO, bool DF, bool NF, size_t... CCAs >
1594 struct ColumnTrait< SymmetricMatrix<MT,SO,DF,NF>, CCAs... >
1595 {
1596  using Type = ColumnTrait_<MT,CCAs...>;
1597 };
1599 //*************************************************************************************************
1600 
1601 
1602 
1603 
1604 //=================================================================================================
1605 //
1606 // COLUMNSTRAIT SPECIALIZATIONS
1607 //
1608 //=================================================================================================
1609 
1610 //*************************************************************************************************
1612 template< typename MT, bool SO, bool DF, bool NF, size_t... CCAs >
1613 struct ColumnsTrait< SymmetricMatrix<MT,SO,DF,NF>, CCAs... >
1614 {
1615  using Type = ColumnsTrait_<MT,CCAs...>;
1616 };
1618 //*************************************************************************************************
1619 
1620 
1621 
1622 
1623 //=================================================================================================
1624 //
1625 // BANDTRAIT SPECIALIZATIONS
1626 //
1627 //=================================================================================================
1628 
1629 //*************************************************************************************************
1631 template< typename MT, bool SO, bool DF, bool NF, ptrdiff_t... CBAs >
1632 struct BandTrait< SymmetricMatrix<MT,SO,DF,NF>, CBAs... >
1633 {
1634  using Type = BandTrait_<MT,CBAs...>;
1635 };
1637 //*************************************************************************************************
1638 
1639 } // namespace blaze
1640 
1641 #endif
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
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 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:109
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
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:113
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:112
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:588
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1903
Matrix adapter for symmetric matrices.
Definition: BaseTemplate.h:608
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:291
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:145
typename RowTrait< MT, CRAs... >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:145
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Header file for the band trait.
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:1827
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.
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:109
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
Constraint on the data type.
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:144
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.
typename ColumnsTrait< MT, CCAs... >::Type ColumnsTrait_
Auxiliary alias declaration for the ColumnsTrait type trait.The ColumnsTrait_ alias declaration provi...
Definition: ColumnsTrait.h:145
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
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.
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:208
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:506
Flag for the Bunch-Kaufman-based inversion for symmetric matrices.
Definition: InversionFlag.h:104
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:113
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
decltype(auto) submatrix(Matrix< MT, SO > &, RSAs...)
Creating a view on a specific submatrix of the given matrix.
Definition: Submatrix.h:360
typename BandTrait< MT, CBAs... >::Type BandTrait_
Auxiliary alias declaration for the BandTrait type trait.The BandTrait_ alias declaration provides a ...
Definition: BandTrait.h:145
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
typename RowsTrait< MT, CRAs... >::Type RowsTrait_
Auxiliary alias declaration for the RowsTrait type trait.The RowsTrait_ alias declaration provides a ...
Definition: RowsTrait.h:145
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:119
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:113
Base template for the MultTrait class.
Definition: MultTrait.h:119
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Header file for the IsContiguous type trait.
Header file for the columns trait.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
Header file for the declsym trait.
Matrix adapter for Hermitian matrices.
Definition: BaseTemplate.h:611
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:272
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Compile time check for built-in data types.This type trait tests whether or not the given template pa...
Definition: IsBuiltin.h:75
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:841
#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
Base template for the DivTrait class.
Definition: DivTrait.h:120
SymmetricMatrix specialization for dense matrices with numeric element type.
Header file for the rows 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:490
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:113
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
Base template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
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:291
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Header file for the isDivisor shim.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
Base template for the SubTrait class.
Definition: SubTrait.h:119
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:113
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
Header file for the Size type trait.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:291
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.
Base template for the BandTrait class.
Definition: BandTrait.h:109