StrictlyUpperMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYUPPERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/math/Forward.h>
50 #include <blaze/math/Functions.h>
74 #include <blaze/util/Assert.h>
75 #include <blaze/util/EnableIf.h>
77 #include <blaze/util/TrueType.h>
79 #include <blaze/util/Unused.h>
80 
81 
82 namespace blaze {
83 
84 //=================================================================================================
85 //
86 // STRICTLYUPPERMATRIX OPERATORS
87 //
88 //=================================================================================================
89 
90 //*************************************************************************************************
93 template< typename MT, bool SO, bool DF >
94 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m );
95 
96 template< typename MT, bool SO, bool DF >
97 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m, size_t i );
98 
99 template< typename MT, bool SO, bool DF >
100 inline void clear( StrictlyUpperMatrix<MT,SO,DF>& m );
101 
102 template< bool RF, typename MT, bool SO, bool DF >
103 inline bool isDefault( const StrictlyUpperMatrix<MT,SO,DF>& m );
104 
105 template< typename MT, bool SO, bool DF >
106 inline bool isIntact( const StrictlyUpperMatrix<MT,SO,DF>& m );
107 
108 template< typename MT, bool SO, bool DF >
109 inline void swap( StrictlyUpperMatrix<MT,SO,DF>& a, StrictlyUpperMatrix<MT,SO,DF>& b ) noexcept;
111 //*************************************************************************************************
112 
113 
114 //*************************************************************************************************
121 template< typename MT // Type of the adapted matrix
122  , bool SO // Storage order of the adapted matrix
123  , bool DF > // Density flag
125 {
126  m.reset();
127 }
128 //*************************************************************************************************
129 
130 
131 //*************************************************************************************************
144 template< typename MT // Type of the adapted matrix
145  , bool SO // Storage order of the adapted matrix
146  , bool DF > // Density flag
147 inline void reset( StrictlyUpperMatrix<MT,SO,DF>& m, size_t i )
148 {
149  m.reset( i );
150 }
151 //*************************************************************************************************
152 
153 
154 //*************************************************************************************************
161 template< typename MT // Type of the adapted matrix
162  , bool SO // Storage order of the adapted matrix
163  , bool DF > // Density flag
165 {
166  m.clear();
167 }
168 //*************************************************************************************************
169 
170 
171 //*************************************************************************************************
182 template< bool RF // Relaxation flag
183  , typename MT // Type of the adapted matrix
184  , bool SO // Storage order of the adapted matrix
185  , bool DF > // Density flag
186 inline bool isDefault_backend( const StrictlyUpperMatrix<MT,SO,DF>& m, TrueType )
187 {
188  return ( m.rows() == 0UL );
189 }
191 //*************************************************************************************************
192 
193 
194 //*************************************************************************************************
205 template< bool RF // Relaxation flag
206  , typename MT // Type of the adapted matrix
207  , bool SO // Storage order of the adapted matrix
208  , bool DF > // Density flag
209 inline bool isDefault_backend( const StrictlyUpperMatrix<MT,SO,DF>& m, FalseType )
210 {
211  if( SO ) {
212  for( size_t j=1UL; j<m.columns(); ++j ) {
213  for( size_t i=0UL; i<j; ++i ) {
214  if( !isDefault<RF>( m(i,j) ) )
215  return false;
216  }
217  }
218  }
219  else {
220  for( size_t i=0UL; i<m.rows(); ++i ) {
221  for( size_t j=i+1UL; j<m.columns(); ++j ) {
222  if( !isDefault<RF>( m(i,j) ) )
223  return false;
224  }
225  }
226  }
227 
228  return true;
229 }
231 //*************************************************************************************************
232 
233 
234 //*************************************************************************************************
261 template< bool RF // Relaxation flag
262  , typename MT // Type of the adapted matrix
263  , bool SO // Storage order of the adapted matrix
264  , bool DF > // Density flag
266 {
267  return isDefault_backend<RF>( m, typename IsResizable<MT>::Type() );
268 }
269 //*************************************************************************************************
270 
271 
272 //*************************************************************************************************
293 template< typename MT // Type of the adapted matrix
294  , bool SO // Storage order of the adapted matrix
295  , bool DF > // Density flag
297 {
298  return m.isIntact();
299 }
300 //*************************************************************************************************
301 
302 
303 //*************************************************************************************************
311 template< typename MT // Type of the adapted matrix
312  , bool SO // Storage order of the adapted matrix
313  , bool DF > // Density flag
315 {
316  a.swap( b );
317 }
318 //*************************************************************************************************
319 
320 
321 //*************************************************************************************************
338 template< typename MT // Type of the adapted matrix
339  , bool SO // Storage order of the adapted matrix
340  , bool DF // Density flag
341  , typename VT > // Type of the right-hand side dense vector
342 inline bool tryAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
343  const DenseVector<VT,false>& rhs, size_t row, size_t column )
344 {
346 
347  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
348  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
349  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
350 
351  UNUSED_PARAMETER( lhs );
352 
353  const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
354 
355  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
356  if( !isDefault( (~rhs)[i] ) )
357  return false;
358  }
359 
360  return true;
361 }
363 //*************************************************************************************************
364 
365 
366 //*************************************************************************************************
383 template< typename MT // Type of the adapted matrix
384  , bool SO // Storage order of the adapted matrix
385  , bool DF // Density flag
386  , typename VT > // Type of the right-hand side dense vector
387 inline bool tryAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
388  const DenseVector<VT,true>& rhs, size_t row, size_t column )
389 {
391 
392  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
393  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
394  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
395 
396  UNUSED_PARAMETER( lhs );
397 
398  if( row < column )
399  return true;
400 
401  const size_t iend( min( row - column + 1UL, (~rhs).size() ) );
402 
403  for( size_t i=0UL; i<iend; ++i ) {
404  if( !isDefault( (~rhs)[i] ) )
405  return false;
406  }
407 
408  return true;
409 }
411 //*************************************************************************************************
412 
413 
414 //*************************************************************************************************
431 template< typename MT // Type of the adapted matrix
432  , bool SO // Storage order of the adapted matrix
433  , bool DF // Density flag
434  , typename VT > // Type of the right-hand side sparse vector
435 inline bool tryAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
436  const SparseVector<VT,false>& rhs, size_t row, size_t column )
437 {
439 
440  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
441  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
442  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
443 
444  UNUSED_PARAMETER( lhs );
445 
446  typedef typename VT::ConstIterator RhsIterator;
447 
448  const RhsIterator last( (~rhs).end() );
449  RhsIterator element( (~rhs).lowerBound( ( column <= row )?( 0UL ):( column - row ) ) );
450 
451  for( ; element!=last; ++element ) {
452  if( !isDefault( element->value() ) )
453  return false;
454  }
455 
456  return true;
457 }
459 //*************************************************************************************************
460 
461 
462 //*************************************************************************************************
479 template< typename MT // Type of the adapted matrix
480  , bool SO // Storage order of the adapted matrix
481  , bool DF // Density flag
482  , typename VT > // Type of the right-hand side sparse vector
483 inline bool tryAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
484  const SparseVector<VT,true>& rhs, size_t row, size_t column )
485 {
487 
488  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
489  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
490  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
491 
492  UNUSED_PARAMETER( lhs );
493 
494  typedef typename VT::ConstIterator RhsIterator;
495 
496  if( row < column )
497  return true;
498 
499  const RhsIterator last( (~rhs).lowerBound( row - column + 1UL ) );
500 
501  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
502  if( !isDefault( element->value() ) )
503  return false;
504  }
505 
506  return true;
507 }
509 //*************************************************************************************************
510 
511 
512 //*************************************************************************************************
529 template< typename MT1 // Type of the adapted matrix
530  , bool SO // Storage order of the adapted matrix
531  , bool DF // Density flag
532  , typename MT2 > // Type of the right-hand side dense matrix
533 inline bool tryAssign( const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
534  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
535 {
537 
538  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
539  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
540  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
541  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
542 
543  UNUSED_PARAMETER( lhs );
544 
545  const size_t M( (~rhs).rows() );
546  const size_t N( (~rhs).columns() );
547 
548  if( column + 1UL >= row + M )
549  return true;
550 
551  const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
552 
553  for( size_t i=ibegin; i<M; ++i )
554  {
555  const size_t jend( min( row + i - column + 1UL, N ) );
556 
557  for( size_t j=0UL; j<jend; ++j ) {
558  if( !isDefault( (~rhs)(i,j) ) )
559  return false;
560  }
561  }
562 
563  return true;
564 }
566 //*************************************************************************************************
567 
568 
569 //*************************************************************************************************
586 template< typename MT1 // Type of the adapted matrix
587  , bool SO // Storage order of the adapted matrix
588  , bool DF // Density flag
589  , typename MT2 > // Type of the right-hand side dense matrix
590 inline bool tryAssign( const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
591  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
592 {
594 
595  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
596  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
597  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
598  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
599 
600  UNUSED_PARAMETER( lhs );
601 
602  const size_t M( (~rhs).rows() );
603  const size_t N( (~rhs).columns() );
604 
605  if( column + 1UL >= row + M )
606  return true;
607 
608  const size_t jend( min( row + M - column, N ) );
609 
610  for( size_t j=0UL; j<jend; ++j )
611  {
612  const bool containsDiagonal( column + j >= row );
613  const size_t ibegin( ( containsDiagonal )?( column + j - row ):( 0UL ) );
614 
615  for( size_t i=ibegin; i<M; ++i ) {
616  if( !isDefault( (~rhs)(i,j) ) )
617  return false;
618  }
619  }
620 
621  return true;
622 }
624 //*************************************************************************************************
625 
626 
627 //*************************************************************************************************
644 template< typename MT1 // Type of the adapted matrix
645  , bool SO // Storage order of the adapted matrix
646  , bool DF // Density flag
647  , typename MT2 > // Type of the right-hand side sparse matrix
648 inline bool tryAssign( const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
649  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
650 {
652 
653  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
654  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
655  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
656  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
657 
658  UNUSED_PARAMETER( lhs );
659 
660  typedef typename MT2::ConstIterator RhsIterator;
661 
662  const size_t M( (~rhs).rows() );
663  const size_t N( (~rhs).columns() );
664 
665  if( column + 1UL >= row + M )
666  return true;
667 
668  const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
669 
670  for( size_t i=ibegin; i<M; ++i )
671  {
672  const size_t index( row + i - column + 1UL );
673  const RhsIterator last( (~rhs).lowerBound( i, min( index, N ) ) );
674 
675  for( RhsIterator element=(~rhs).begin(i); element!=last; ++element ) {
676  if( !isDefault( element->value() ) )
677  return false;
678  }
679  }
680 
681  return true;
682 }
684 //*************************************************************************************************
685 
686 
687 //*************************************************************************************************
704 template< typename MT1 // Type of the adapted matrix
705  , bool SO // Storage order of the adapted matrix
706  , bool DF // Density flag
707  , typename MT2 > // Type of the right-hand side sparse matrix
708 inline bool tryAssign( const StrictlyUpperMatrix<MT1,SO,DF>& lhs,
709  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
710 {
712 
713  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
714  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
715  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
716  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
717 
718  UNUSED_PARAMETER( lhs );
719 
720  typedef typename MT2::ConstIterator RhsIterator;
721 
722  const size_t M( (~rhs).rows() );
723  const size_t N( (~rhs).columns() );
724 
725  if( column + 1UL >= row + M )
726  return true;
727 
728  const size_t jend( min( row + M - column, N ) );
729 
730  for( size_t j=0UL; j<jend; ++j )
731  {
732  const bool containsDiagonal( column + j >= row );
733  const size_t index( ( containsDiagonal )?( column + j - row ):( 0UL ) );
734 
735  const RhsIterator last( (~rhs).end(j) );
736  RhsIterator element( (~rhs).lowerBound( index, j ) );
737 
738  for( ; element!=last; ++element ) {
739  if( !isDefault( element->value() ) )
740  return false;
741  }
742  }
743 
744  return true;
745 }
747 //*************************************************************************************************
748 
749 
750 //*************************************************************************************************
767 template< typename MT // Type of the adapted matrix
768  , bool SO // Storage order of the adapted matrix
769  , bool DF // Density flag
770  , typename VT // Type of the right-hand side vector
771  , bool TF > // Transpose flag of the right-hand side vector
772 inline bool tryAddAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
773  const Vector<VT,TF>& rhs, size_t row, size_t column )
774 {
775  return tryAssign( lhs, ~rhs, row, column );
776 }
778 //*************************************************************************************************
779 
780 
781 //*************************************************************************************************
798 template< typename MT1 // Type of the adapted matrix
799  , bool SO1 // Storage order of the adapted matrix
800  , bool DF // Density flag
801  , typename MT2 // Type of the right-hand side matrix
802  , bool SO2 > // Storage order of the right-hand side matrix
803 inline bool tryAddAssign( const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
804  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
805 {
806  return tryAssign( lhs, ~rhs, row, column );
807 }
809 //*************************************************************************************************
810 
811 
812 //*************************************************************************************************
829 template< typename MT // Type of the adapted matrix
830  , bool SO // Storage order of the adapted matrix
831  , bool DF // Density flag
832  , typename VT // Type of the right-hand side vector
833  , bool TF > // Transpose flag of the right-hand side vector
834 inline bool trySubAssign( const StrictlyUpperMatrix<MT,SO,DF>& lhs,
835  const Vector<VT,TF>& rhs, size_t row, size_t column )
836 {
837  return tryAssign( lhs, ~rhs, row, column );
838 }
840 //*************************************************************************************************
841 
842 
843 //*************************************************************************************************
860 template< typename MT1 // Type of the adapted matrix
861  , bool SO1 // Storage order of the adapted matrix
862  , bool DF // Density flag
863  , typename MT2 // Type of the right-hand side matrix
864  , bool SO2 > // Storage order of the right-hand side matrix
865 inline bool trySubAssign( const StrictlyUpperMatrix<MT1,SO1,DF>& lhs,
866  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
867 {
868  return tryAssign( lhs, ~rhs, row, column );
869 }
871 //*************************************************************************************************
872 
873 
874 //*************************************************************************************************
888 template< typename MT // Type of the adapted matrix
889  , bool SO // Storage order of the adapted matrix
890  , bool DF > // Density flag
891 inline MT& derestrict( StrictlyUpperMatrix<MT,SO,DF>& m )
892 {
893  return m.matrix_;
894 }
896 //*************************************************************************************************
897 
898 
899 
900 
901 //=================================================================================================
902 //
903 // ROWS SPECIALIZATIONS
904 //
905 //=================================================================================================
906 
907 //*************************************************************************************************
909 template< typename MT, bool SO, bool DF >
910 struct Rows< StrictlyUpperMatrix<MT,SO,DF> > : public Rows<MT>
911 {};
913 //*************************************************************************************************
914 
915 
916 
917 
918 //=================================================================================================
919 //
920 // COLUMNS SPECIALIZATIONS
921 //
922 //=================================================================================================
923 
924 //*************************************************************************************************
926 template< typename MT, bool SO, bool DF >
927 struct Columns< StrictlyUpperMatrix<MT,SO,DF> > : public Columns<MT>
928 {};
930 //*************************************************************************************************
931 
932 
933 
934 
935 //=================================================================================================
936 //
937 // ISSQUARE SPECIALIZATIONS
938 //
939 //=================================================================================================
940 
941 //*************************************************************************************************
943 template< typename MT, bool SO, bool DF >
944 struct IsSquare< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
945 {};
947 //*************************************************************************************************
948 
949 
950 
951 
952 //=================================================================================================
953 //
954 // ISSTRICTLYUPPER SPECIALIZATIONS
955 //
956 //=================================================================================================
957 
958 //*************************************************************************************************
960 template< typename MT, bool SO, bool DF >
961 struct IsStrictlyUpper< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
962 {};
964 //*************************************************************************************************
965 
966 
967 
968 
969 //=================================================================================================
970 //
971 // ISADAPTOR SPECIALIZATIONS
972 //
973 //=================================================================================================
974 
975 //*************************************************************************************************
977 template< typename MT, bool SO, bool DF >
978 struct IsAdaptor< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
979 {};
981 //*************************************************************************************************
982 
983 
984 
985 
986 //=================================================================================================
987 //
988 // ISRESTRICTED SPECIALIZATIONS
989 //
990 //=================================================================================================
991 
992 //*************************************************************************************************
994 template< typename MT, bool SO, bool DF >
995 struct IsRestricted< StrictlyUpperMatrix<MT,SO,DF> > : public TrueType
996 {};
998 //*************************************************************************************************
999 
1000 
1001 
1002 
1003 //=================================================================================================
1004 //
1005 // HASCONSTDATAACCESS SPECIALIZATIONS
1006 //
1007 //=================================================================================================
1008 
1009 //*************************************************************************************************
1011 template< typename MT, bool SO >
1012 struct HasConstDataAccess< StrictlyUpperMatrix<MT,SO,true> > : public TrueType
1013 {};
1015 //*************************************************************************************************
1016 
1017 
1018 
1019 
1020 //=================================================================================================
1021 //
1022 // ISALIGNED SPECIALIZATIONS
1023 //
1024 //=================================================================================================
1025 
1026 //*************************************************************************************************
1028 template< typename MT, bool SO, bool DF >
1029 struct IsAligned< StrictlyUpperMatrix<MT,SO,DF> > : public BoolConstant< IsAligned<MT>::value >
1030 {};
1032 //*************************************************************************************************
1033 
1034 
1035 
1036 
1037 //=================================================================================================
1038 //
1039 // ISPADDED SPECIALIZATIONS
1040 //
1041 //=================================================================================================
1042 
1043 //*************************************************************************************************
1045 template< typename MT, bool SO, bool DF >
1046 struct IsPadded< StrictlyUpperMatrix<MT,SO,DF> > : public BoolConstant< IsPadded<MT>::value >
1047 {};
1049 //*************************************************************************************************
1050 
1051 
1052 
1053 
1054 //=================================================================================================
1055 //
1056 // ISRESIZABLE SPECIALIZATIONS
1057 //
1058 //=================================================================================================
1059 
1060 //*************************************************************************************************
1062 template< typename MT, bool SO, bool DF >
1063 struct IsResizable< StrictlyUpperMatrix<MT,SO,DF> > : public BoolConstant< IsResizable<MT>::value >
1064 {};
1066 //*************************************************************************************************
1067 
1068 
1069 
1070 
1071 //=================================================================================================
1072 //
1073 // REMOVEADAPTOR SPECIALIZATIONS
1074 //
1075 //=================================================================================================
1076 
1077 //*************************************************************************************************
1079 template< typename MT, bool SO, bool DF >
1080 struct RemoveAdaptor< StrictlyUpperMatrix<MT,SO,DF> >
1081 {
1082  using Type = MT;
1083 };
1085 //*************************************************************************************************
1086 
1087 
1088 
1089 
1090 //=================================================================================================
1091 //
1092 // DERESTRICTTRAIT SPECIALIZATIONS
1093 //
1094 //=================================================================================================
1095 
1096 //*************************************************************************************************
1098 template< typename MT, bool SO, bool DF >
1099 struct DerestrictTrait< StrictlyUpperMatrix<MT,SO,DF> >
1100 {
1101  using Type = MT&;
1102 };
1104 //*************************************************************************************************
1105 
1106 
1107 
1108 
1109 //=================================================================================================
1110 //
1111 // ADDTRAIT SPECIALIZATIONS
1112 //
1113 //=================================================================================================
1114 
1115 //*************************************************************************************************
1117 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1118 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1119 {
1121 };
1122 
1123 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1124 struct AddTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1125 {
1126  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1127 };
1128 
1129 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1130 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1131 {
1133 };
1134 
1135 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1136 struct AddTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1137 {
1138  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1139 };
1140 
1141 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1142 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1143 {
1144  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1145 };
1146 
1147 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1148 struct AddTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1149 {
1150  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1151 };
1152 
1153 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1154 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1155 {
1157 };
1158 
1159 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1160 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1161 {
1162  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1163 };
1164 
1165 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1166 struct AddTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1167 {
1169 };
1170 
1171 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1172 struct AddTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1173 {
1174  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1175 };
1176 
1177 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1178 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1179 {
1180  using Type = AddTrait_<MT1,MT2>;
1181 };
1182 
1183 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1184 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1185 {
1186  using Type = AddTrait_<MT1,MT2>;
1187 };
1188 
1189 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1190 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1191 {
1192  using Type = AddTrait_<MT1,MT2>;
1193 };
1194 
1195 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1196 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1197 {
1198  using Type = AddTrait_<MT1,MT2>;
1199 };
1200 
1201 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1202 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1203 {
1204  using Type = AddTrait_<MT1,MT2>;
1205 };
1206 
1207 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1208 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1209 {
1210  using Type = AddTrait_<MT1,MT2>;
1211 };
1212 
1213 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1214 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1215 {
1216  using Type = AddTrait_<MT1,MT2>;
1217 };
1218 
1219 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1220 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1221 {
1222  using Type = AddTrait_<MT1,MT2>;
1223 };
1224 
1225 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1226 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1227 {
1228  using Type = AddTrait_<MT1,MT2>;
1229 };
1230 
1231 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1232 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1233 {
1234  using Type = AddTrait_<MT1,MT2>;
1235 };
1236 
1237 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1238 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1239 {
1240  using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1241 };
1242 
1243 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1244 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1245 {
1246  using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1247 };
1248 
1249 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1250 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1251 {
1252  using Type = UniUpperMatrix< AddTrait_<MT1,MT2> >;
1253 };
1254 
1255 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1256 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1257 {
1258  using Type = UniUpperMatrix< AddTrait_<MT1,MT2> >;
1259 };
1260 
1261 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1262 struct AddTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1263 {
1265 };
1267 //*************************************************************************************************
1268 
1269 
1270 
1271 
1272 //=================================================================================================
1273 //
1274 // SUBTRAIT SPECIALIZATIONS
1275 //
1276 //=================================================================================================
1277 
1278 //*************************************************************************************************
1280 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1281 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1282 {
1284 };
1285 
1286 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1287 struct SubTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1288 {
1289  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1290 };
1291 
1292 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1293 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1294 {
1296 };
1297 
1298 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1299 struct SubTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1300 {
1301  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1302 };
1303 
1304 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1305 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1306 {
1307  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1308 };
1309 
1310 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1311 struct SubTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1312 {
1313  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1314 };
1315 
1316 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1317 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1318 {
1320 };
1321 
1322 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1323 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1324 {
1325  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1326 };
1327 
1328 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1329 struct SubTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1330 {
1332 };
1333 
1334 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1335 struct SubTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1336 {
1337  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1338 };
1339 
1340 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1341 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1342 {
1343  using Type = SubTrait_<MT1,MT2>;
1344 };
1345 
1346 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1347 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1348 {
1349  using Type = SubTrait_<MT1,MT2>;
1350 };
1351 
1352 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1353 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1354 {
1355  using Type = SubTrait_<MT1,MT2>;
1356 };
1357 
1358 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1359 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1360 {
1361  using Type = SubTrait_<MT1,MT2>;
1362 };
1363 
1364 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1365 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1366 {
1367  using Type = SubTrait_<MT1,MT2>;
1368 };
1369 
1370 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1371 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1372 {
1373  using Type = SubTrait_<MT1,MT2>;
1374 };
1375 
1376 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1377 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1378 {
1379  using Type = SubTrait_<MT1,MT2>;
1380 };
1381 
1382 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1383 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1384 {
1385  using Type = SubTrait_<MT1,MT2>;
1386 };
1387 
1388 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1389 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1390 {
1391  using Type = SubTrait_<MT1,MT2>;
1392 };
1393 
1394 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1395 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1396 {
1397  using Type = SubTrait_<MT1,MT2>;
1398 };
1399 
1400 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1401 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1402 {
1403  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1404 };
1405 
1406 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1407 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1408 {
1409  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1410 };
1411 
1412 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1413 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1414 {
1415  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
1416 };
1417 
1418 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1419 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1420 {
1421  using Type = UniUpperMatrix< SubTrait_<MT1,MT2> >;
1422 };
1423 
1424 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1425 struct SubTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1426 {
1428 };
1430 //*************************************************************************************************
1431 
1432 
1433 
1434 
1435 //=================================================================================================
1436 //
1437 // MULTTRAIT SPECIALIZATIONS
1438 //
1439 //=================================================================================================
1440 
1441 //*************************************************************************************************
1443 template< typename MT, bool SO, bool DF, typename T >
1444 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1445 {
1447 };
1448 
1449 template< typename T, typename MT, bool SO, bool DF >
1450 struct MultTrait< T, StrictlyUpperMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
1451 {
1453 };
1454 
1455 template< typename MT, bool SO, bool DF, typename T, size_t N >
1456 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1457 {
1459 };
1460 
1461 template< typename T, size_t N, typename MT, bool SO, bool DF >
1462 struct MultTrait< StaticVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1463 {
1464  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1465 };
1466 
1467 template< typename MT, bool SO, bool DF, typename T, size_t N >
1468 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1469 {
1471 };
1472 
1473 template< typename T, size_t N, typename MT, bool SO, bool DF >
1474 struct MultTrait< HybridVector<T,N,true>, StrictlyUpperMatrix<MT,SO,DF> >
1475 {
1476  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1477 };
1478 
1479 template< typename MT, bool SO, bool DF, typename T >
1480 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
1481 {
1483 };
1484 
1485 template< typename T, typename MT, bool SO, bool DF >
1486 struct MultTrait< DynamicVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1487 {
1488  using Type = MultTrait_< DynamicVector<T,true>, MT >;
1489 };
1490 
1491 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
1492 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1493 {
1495 };
1496 
1497 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
1498 struct MultTrait< CustomVector<T,AF,PF,true>, StrictlyUpperMatrix<MT,SO,DF> >
1499 {
1500  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
1501 };
1502 
1503 template< typename MT, bool SO, bool DF, typename T >
1504 struct MultTrait< StrictlyUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
1505 {
1507 };
1508 
1509 template< typename T, typename MT, bool SO, bool DF >
1510 struct MultTrait< CompressedVector<T,true>, StrictlyUpperMatrix<MT,SO,DF> >
1511 {
1512  using Type = MultTrait_< CompressedVector<T,true>, MT >;
1513 };
1514 
1515 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1516 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1517 {
1519 };
1520 
1521 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1522 struct MultTrait< StaticMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1523 {
1524  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1525 };
1526 
1527 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1528 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1529 {
1531 };
1532 
1533 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1534 struct MultTrait< HybridMatrix<T,M,N,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1535 {
1536  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1537 };
1538 
1539 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1540 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1541 {
1542  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
1543 };
1544 
1545 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1546 struct MultTrait< DynamicMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1547 {
1548  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
1549 };
1550 
1551 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1552 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1553 {
1555 };
1556 
1557 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1558 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1559 {
1560  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1561 };
1562 
1563 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1564 struct MultTrait< StrictlyUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1565 {
1567 };
1568 
1569 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1570 struct MultTrait< CompressedMatrix<T,SO1>, StrictlyUpperMatrix<MT,SO2,DF> >
1571 {
1572  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
1573 };
1574 
1575 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1576 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1577 {
1578  using Type = MultTrait_<MT1,MT2>;
1579 };
1580 
1581 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1582 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1583 {
1584  using Type = MultTrait_<MT1,MT2>;
1585 };
1586 
1587 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1588 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1589 {
1590  using Type = MultTrait_<MT1,MT2>;
1591 };
1592 
1593 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1594 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1595 {
1596  using Type = MultTrait_<MT1,MT2>;
1597 };
1598 
1599 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1600 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1601 {
1602  using Type = MultTrait_<MT1,MT2>;
1603 };
1604 
1605 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1606 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1607 {
1608  using Type = MultTrait_<MT1,MT2>;
1609 };
1610 
1611 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1612 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1613 {
1614  using Type = MultTrait_<MT1,MT2>;
1615 };
1616 
1617 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1618 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1619 {
1620  using Type = MultTrait_<MT1,MT2>;
1621 };
1622 
1623 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1624 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1625 {
1626  using Type = MultTrait_<MT1,MT2>;
1627 };
1628 
1629 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1630 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1631 {
1632  using Type = MultTrait_<MT1,MT2>;
1633 };
1634 
1635 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1636 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1637 {
1639 };
1640 
1641 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1642 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1643 {
1645 };
1646 
1647 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1648 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1649 {
1651 };
1652 
1653 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1654 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1655 {
1657 };
1658 
1659 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1660 struct MultTrait< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1661 {
1663 };
1665 //*************************************************************************************************
1666 
1667 
1668 
1669 
1670 //=================================================================================================
1671 //
1672 // DIVTRAIT SPECIALIZATIONS
1673 //
1674 //=================================================================================================
1675 
1676 //*************************************************************************************************
1678 template< typename MT, bool SO, bool DF, typename T >
1679 struct DivTrait< StrictlyUpperMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1680 {
1681  using Type = StrictlyUpperMatrix< DivTrait_<MT,T> >;
1682 };
1684 //*************************************************************************************************
1685 
1686 
1687 
1688 
1689 //=================================================================================================
1690 //
1691 // FOREACHTRAIT SPECIALIZATIONS
1692 //
1693 //=================================================================================================
1694 
1695 //*************************************************************************************************
1697 template< typename MT, bool SO, bool DF >
1698 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Abs >
1699 {
1701 };
1702 
1703 template< typename MT, bool SO, bool DF >
1704 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Floor >
1705 {
1707 };
1708 
1709 template< typename MT, bool SO, bool DF >
1710 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Ceil >
1711 {
1713 };
1714 
1715 template< typename MT, bool SO, bool DF >
1716 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Conj >
1717 {
1719 };
1720 
1721 template< typename MT, bool SO, bool DF >
1722 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Real >
1723 {
1725 };
1726 
1727 template< typename MT, bool SO, bool DF >
1728 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Imag >
1729 {
1731 };
1732 
1733 template< typename MT, bool SO, bool DF >
1734 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Sin >
1735 {
1737 };
1738 
1739 template< typename MT, bool SO, bool DF >
1740 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Asin >
1741 {
1743 };
1744 
1745 template< typename MT, bool SO, bool DF >
1746 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Sinh >
1747 {
1749 };
1750 
1751 template< typename MT, bool SO, bool DF >
1752 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Asinh >
1753 {
1755 };
1756 
1757 template< typename MT, bool SO, bool DF >
1758 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Tan >
1759 {
1761 };
1762 
1763 template< typename MT, bool SO, bool DF >
1764 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Atan >
1765 {
1767 };
1768 
1769 template< typename MT, bool SO, bool DF >
1770 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Tanh >
1771 {
1773 };
1774 
1775 template< typename MT, bool SO, bool DF >
1776 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Atanh >
1777 {
1779 };
1780 
1781 template< typename MT, bool SO, bool DF >
1782 struct ForEachTrait< StrictlyUpperMatrix<MT,SO,DF>, Erf >
1783 {
1785 };
1787 //*************************************************************************************************
1788 
1789 
1790 
1791 
1792 //=================================================================================================
1793 //
1794 // HIGHTYPE SPECIALIZATIONS
1795 //
1796 //=================================================================================================
1797 
1798 //*************************************************************************************************
1800 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1801 struct HighType< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1802 {
1804 };
1806 //*************************************************************************************************
1807 
1808 
1809 
1810 
1811 //=================================================================================================
1812 //
1813 // LOWTYPE SPECIALIZATIONS
1814 //
1815 //=================================================================================================
1816 
1817 //*************************************************************************************************
1819 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1820 struct LowType< StrictlyUpperMatrix<MT1,SO1,DF1>, StrictlyUpperMatrix<MT2,SO2,DF2> >
1821 {
1823 };
1825 //*************************************************************************************************
1826 
1827 
1828 
1829 
1830 //=================================================================================================
1831 //
1832 // SUBMATRIXTRAIT SPECIALIZATIONS
1833 //
1834 //=================================================================================================
1835 
1836 //*************************************************************************************************
1838 template< typename MT, bool SO, bool DF >
1839 struct SubmatrixTrait< StrictlyUpperMatrix<MT,SO,DF> >
1840 {
1841  using Type = SubmatrixTrait_<MT>;
1842 };
1844 //*************************************************************************************************
1845 
1846 
1847 
1848 
1849 //=================================================================================================
1850 //
1851 // ROWTRAIT SPECIALIZATIONS
1852 //
1853 //=================================================================================================
1854 
1855 //*************************************************************************************************
1857 template< typename MT, bool SO, bool DF >
1858 struct RowTrait< StrictlyUpperMatrix<MT,SO,DF> >
1859 {
1860  using Type = RowTrait_<MT>;
1861 };
1863 //*************************************************************************************************
1864 
1865 
1866 
1867 
1868 //=================================================================================================
1869 //
1870 // COLUMNTRAIT SPECIALIZATIONS
1871 //
1872 //=================================================================================================
1873 
1874 //*************************************************************************************************
1876 template< typename MT, bool SO, bool DF >
1877 struct ColumnTrait< StrictlyUpperMatrix<MT,SO,DF> >
1878 {
1879  using Type = ColumnTrait_<MT>;
1880 };
1882 //*************************************************************************************************
1883 
1884 } // namespace blaze
1885 
1886 #endif
Header file for mathematical functions.
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.
Header file for the row trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:118
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:117
typename RowTrait< MT >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:152
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:261
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
StrictlyUpperMatrix specialization for dense matrices.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:245
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
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
Base template for the RowTrait class.
Definition: RowTrait.h:117
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 IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Matrix adapter for strictly upper triangular matrices.
Definition: Forward.h:51
Base template for the ForEachTrait class.The ForEachTrait class template offers the possibility to se...
Definition: ForEachTrait.h:79
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Header file for the Columns type trait.
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Compile time check for square matrices.This type trait tests whether or not the given template parame...
Definition: IsSquare.h:88
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:336
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
StrictlyUpperMatrix specialization for sparse matrices.
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Matrix adapter for upper triangular matrices.
Definition: Forward.h:55
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Header file for the implementation of the base template of the StrictlyUpperMatrix.
Header file for the DerestrictTrait class template.
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
Matrix adapter for upper unitriangular matrices.
Definition: Forward.h:54
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:143
Base template for the MultTrait class.
Definition: MultTrait.h:143
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Header file for the column trait.
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:267
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
#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:153
Evaluation of the return type of the derestrict function.Via this type trait it is possible to evalua...
Definition: DerestrictTrait.h:73
Base template for the DivTrait class.
Definition: DivTrait.h:143
typename ColumnTrait< MT >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:152
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
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 class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:245
Header file for the for-each trait.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
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:76
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
Base template for the SubTrait class.
Definition: SubTrait.h:143
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the implementation of the base template of the UpperMatrix.
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:245
#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 implementation of the base template of the UniUpperMatrix.
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.