35 #ifndef _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_DIAGONALMATRIX_H_
85 template<
typename MT,
bool SO,
bool DF >
86 inline void reset( DiagonalMatrix<MT,SO,DF>& m );
88 template<
typename MT,
bool SO,
bool DF >
89 inline void reset( DiagonalMatrix<MT,SO,DF>& m,
size_t i );
91 template<
typename MT,
bool SO,
bool DF >
92 inline void clear( DiagonalMatrix<MT,SO,DF>& m );
94 template<
typename MT,
bool SO,
bool DF >
95 inline bool isDefault(
const DiagonalMatrix<MT,SO,DF>& m );
97 template<
typename MT,
bool SO,
bool DF >
98 inline void swap( DiagonalMatrix<MT,SO,DF>& a, DiagonalMatrix<MT,SO,DF>& b ) ;
110 template<
typename MT
133 template<
typename MT
150 template<
typename MT
178 template<
typename MT
197 template<
typename MT
222 template<
typename MT
225 inline MT& derestrict( DiagonalMatrix<MT,SO,DF>& m )
243 template<
typename MT,
bool SO,
bool DF >
244 struct Rows< DiagonalMatrix<MT,SO,DF> > :
public Rows<MT>
260 template<
typename MT,
bool SO,
bool DF >
261 struct Columns< DiagonalMatrix<MT,SO,DF> > :
public Columns<MT>
277 template<
typename MT,
bool SO,
bool DF >
278 struct IsSquare< DiagonalMatrix<MT,SO,DF> > :
public TrueType
297 template<
typename MT,
bool SO,
bool DF >
298 struct IsSymmetric< DiagonalMatrix<MT,SO,DF> > :
public TrueType
317 template<
typename MT,
bool SO,
bool DF >
318 struct IsLower< DiagonalMatrix<MT,SO,DF> > :
public TrueType
337 template<
typename MT,
bool SO,
bool DF >
338 struct IsUpper< DiagonalMatrix<MT,SO,DF> > :
public TrueType
357 template<
typename MT,
bool SO,
bool DF >
358 struct IsAdaptor< DiagonalMatrix<MT,SO,DF> > :
public TrueType
377 template<
typename MT,
bool SO,
bool DF >
378 struct IsRestricted< DiagonalMatrix<MT,SO,DF> > :
public TrueType
397 template<
typename MT,
bool SO >
398 struct HasConstDataAccess< DiagonalMatrix<MT,SO,true> > :
public TrueType
417 template<
typename MT,
bool SO,
bool DF >
418 struct IsResizable< DiagonalMatrix<MT,SO,DF> > :
public IsResizable<MT>::Type
420 enum { value = IsResizable<MT>::value };
421 typedef typename IsResizable<MT>::Type Type;
437 template<
typename MT,
bool SO,
bool DF >
438 struct RemoveAdaptor< DiagonalMatrix<MT,SO,DF> >
456 template<
typename MT,
bool SO,
bool DF >
457 struct DerestrictTrait< DiagonalMatrix<MT,SO,DF> >
475 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
476 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
478 typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
481 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
482 struct AddTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
484 typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
487 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
488 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
490 typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
493 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
494 struct AddTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
496 typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
499 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
500 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
502 typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
505 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
506 struct AddTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
508 typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
511 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
512 struct AddTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
514 typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
517 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
518 struct AddTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
520 typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
523 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
524 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
526 typedef typename AddTrait<MT1,MT2>::Type Type;
529 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
530 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
532 typedef typename AddTrait<MT1,MT2>::Type Type;
535 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
536 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
538 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
541 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
542 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
544 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
547 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
548 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
550 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
553 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
554 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
556 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
559 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
560 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
562 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
565 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
566 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
568 typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
571 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
572 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
574 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
577 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
578 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
580 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
583 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
584 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
586 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
589 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
590 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
592 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
595 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
596 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
598 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
601 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
602 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
604 typedef UpperMatrix< typename AddTrait<MT1,MT2>::Type > Type;
607 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
608 struct AddTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
610 typedef DiagonalMatrix< typename AddTrait<MT1,MT2>::Type > Type;
626 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
627 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
629 typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
632 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
633 struct SubTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
635 typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
638 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
639 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
641 typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
644 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
645 struct SubTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
647 typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
650 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
651 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
653 typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
656 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
657 struct SubTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
659 typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
662 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
663 struct SubTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
665 typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
668 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
669 struct SubTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
671 typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
674 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
675 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
677 typedef typename SubTrait<MT1,MT2>::Type Type;
680 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
681 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
683 typedef typename SubTrait<MT1,MT2>::Type Type;
686 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
687 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
689 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
692 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
693 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
695 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
698 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
699 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
701 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
704 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
705 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
707 typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
710 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
711 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
713 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
716 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
717 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
719 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
722 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
723 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
725 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
728 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
729 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
731 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
734 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
735 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
737 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
740 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
741 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
743 typedef UpperMatrix< typename SubTrait<MT1,MT2>::Type > Type;
746 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
747 struct SubTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
749 typedef DiagonalMatrix< typename SubTrait<MT1,MT2>::Type > Type;
765 template<
typename MT,
bool SO,
bool DF,
typename T >
766 struct MultTrait< DiagonalMatrix<MT,SO,DF>, T >
768 typedef DiagonalMatrix< typename MultTrait<MT,T>::Type > Type;
772 template<
typename T,
typename MT,
bool SO,
bool DF >
773 struct MultTrait< T, DiagonalMatrix<MT,SO,DF> >
775 typedef DiagonalMatrix< typename MultTrait<T,MT>::Type > Type;
779 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
780 struct MultTrait< DiagonalMatrix<MT,SO,DF>, StaticVector<T,N,false> >
782 typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
785 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
786 struct MultTrait< StaticVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
788 typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
791 template<
typename MT,
bool SO,
bool DF,
typename T,
size_t N >
792 struct MultTrait< DiagonalMatrix<MT,SO,DF>, HybridVector<T,N,false> >
794 typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
797 template<
typename T,
size_t N,
typename MT,
bool SO,
bool DF >
798 struct MultTrait< HybridVector<T,N,true>, DiagonalMatrix<MT,SO,DF> >
800 typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
803 template<
typename MT,
bool SO,
bool DF,
typename T >
804 struct MultTrait< DiagonalMatrix<MT,SO,DF>, DynamicVector<T,false> >
806 typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
809 template<
typename T,
typename MT,
bool SO,
bool DF >
810 struct MultTrait< DynamicVector<T,true>, DiagonalMatrix<MT,SO,DF> >
812 typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
815 template<
typename MT,
bool SO,
bool DF,
typename T >
816 struct MultTrait< DiagonalMatrix<MT,SO,DF>, CompressedVector<T,false> >
818 typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
821 template<
typename T,
typename MT,
bool SO,
bool DF >
822 struct MultTrait< CompressedVector<T,true>, DiagonalMatrix<MT,SO,DF> >
824 typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
827 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
828 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
830 typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
833 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
834 struct MultTrait< StaticMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
836 typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
839 template<
typename MT,
bool SO1,
bool DF,
typename T,
size_t M,
size_t N,
bool SO2 >
840 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
842 typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
845 template<
typename T,
size_t M,
size_t N,
bool SO1,
typename MT,
bool SO2,
bool DF >
846 struct MultTrait< HybridMatrix<T,M,N,SO1>, DiagonalMatrix<MT,SO2,DF> >
848 typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
851 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
852 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
854 typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
857 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
858 struct MultTrait< DynamicMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
860 typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
863 template<
typename MT,
bool SO1,
bool DF,
typename T,
bool SO2 >
864 struct MultTrait< DiagonalMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
866 typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
869 template<
typename T,
bool SO1,
typename MT,
bool SO2,
bool DF >
870 struct MultTrait< CompressedMatrix<T,SO1>, DiagonalMatrix<MT,SO2,DF> >
872 typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
875 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2,
bool NF >
876 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
878 typedef typename MultTrait<MT1,MT2>::Type Type;
881 template<
typename MT1,
bool SO1,
bool DF1,
bool NF,
typename MT2,
bool SO2,
bool DF2 >
882 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, DiagonalMatrix<MT2,SO2,DF2> >
884 typedef typename MultTrait<MT1,MT2>::Type Type;
887 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
888 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
890 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
893 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
894 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
896 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
899 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
900 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
902 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
905 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
906 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
908 typedef LowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
911 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
912 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
914 typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
917 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
918 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
920 typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
923 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
924 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
926 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
929 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
930 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
932 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
935 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
936 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
938 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
941 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
942 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
944 typedef UpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
947 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
948 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
950 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
953 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
954 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
956 typedef StrictlyUpperMatrix< typename MultTrait<MT1,MT2>::Type > Type;
959 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
960 struct MultTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
962 typedef DiagonalMatrix< typename MultTrait<MT1,MT2>::Type > Type;
978 template<
typename MT,
bool SO,
bool DF,
typename T >
979 struct DivTrait< DiagonalMatrix<MT,SO,DF>, T >
981 typedef DiagonalMatrix< typename DivTrait<MT,T>::Type > Type;
998 template<
typename MT1,
bool SO1,
bool DF1,
typename MT2,
bool SO2,
bool DF2 >
999 struct MathTrait< DiagonalMatrix<MT1,SO1,DF1>, DiagonalMatrix<MT2,SO2,DF2> >
1001 typedef DiagonalMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
1002 typedef DiagonalMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
1018 template<
typename MT,
bool SO,
bool DF >
1019 struct SubmatrixTrait< DiagonalMatrix<MT,SO,DF> >
1021 typedef typename SubmatrixTrait<MT>::Type Type;
1037 template<
typename MT,
bool SO,
bool DF >
1038 struct RowTrait< DiagonalMatrix<MT,SO,DF> >
1040 typedef typename RowTrait<MT>::Type Type;
1056 template<
typename MT,
bool SO,
bool DF >
1057 struct ColumnTrait< DiagonalMatrix<MT,SO,DF> >
1059 typedef typename ColumnTrait<MT>::Type Type;
Constraint on the data type.
Header file for the Rows type trait.
Header file for the subtraction trait.
Header file for the row trait.
Header file for the implementation of the base template of the DiagonalMatrix.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:821
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:861
Header file for the implementation of the base template of the UpperMatrix.
Header file for the IsSquare type trait.
Header file for the multiplication trait.
Header file for the IsSymmetric type trait.
Header file for the implementation of the base template of the LowerMatrix.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for all forward declarations of the math module.
Header file for the Columns type trait.
Header file for the IsLower type trait.
Header file for the RemoveAdaptor type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
Header file for the IsAdaptor type trait.
Header file for the implementation of the base template of the StrictlyUpperMatrix.
Header file for the DerestrictTrait class template.
Header file for the HasConstDataAccess type trait.
DiagonalMatrix specialization for sparse matrices.
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
#define BLAZE_CONSTRAINT_MUST_BE_NUMERIC_TYPE(T)
Constraint on the data type.In case the given data type T is not a numeric (integral or floating poin...
Definition: Numeric.h:79
Header file for the column trait.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:200
Header file for the mathematical trait.
DiagonalMatrix specialization for dense matrices.
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:525
Header file for the IsUpper type trait.
boost::true_type TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: TrueType.h:61
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Header file for the implementation of the base template of the StrictlyLowerMatrix.