StrictlyLowerMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_STRICTLYLOWERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
49 #include <blaze/math/Forward.h>
50 #include <blaze/math/Functions.h>
72 #include <blaze/util/Assert.h>
73 #include <blaze/util/EnableIf.h>
75 #include <blaze/util/Unused.h>
77 
78 
79 namespace blaze {
80 
81 //=================================================================================================
82 //
83 // STRICTLYLOWERMATRIX OPERATORS
84 //
85 //=================================================================================================
86 
87 //*************************************************************************************************
90 template< typename MT, bool SO, bool DF >
91 inline void reset( StrictlyLowerMatrix<MT,SO,DF>& m );
92 
93 template< typename MT, bool SO, bool DF >
94 inline void reset( StrictlyLowerMatrix<MT,SO,DF>& m, size_t i );
95 
96 template< typename MT, bool SO, bool DF >
97 inline void clear( StrictlyLowerMatrix<MT,SO,DF>& m );
98 
99 template< typename MT, bool SO, bool DF >
100 inline bool isDefault( const StrictlyLowerMatrix<MT,SO,DF>& m );
101 
102 template< typename MT, bool SO, bool DF >
103 inline bool isIntact( const StrictlyLowerMatrix<MT,SO,DF>& m );
104 
105 template< typename MT, bool SO, bool DF >
106 inline void swap( StrictlyLowerMatrix<MT,SO,DF>& a, StrictlyLowerMatrix<MT,SO,DF>& b ) /* throw() */;
108 //*************************************************************************************************
109 
110 
111 //*************************************************************************************************
118 template< typename MT // Type of the adapted matrix
119  , bool SO // Storage order of the adapted matrix
120  , bool DF > // Density flag
122 {
123  m.reset();
124 }
125 //*************************************************************************************************
126 
127 
128 //*************************************************************************************************
141 template< typename MT // Type of the adapted matrix
142  , bool SO // Storage order of the adapted matrix
143  , bool DF > // Density flag
144 inline void reset( StrictlyLowerMatrix<MT,SO,DF>& m, size_t i )
145 {
146  m.reset( i );
147 }
148 //*************************************************************************************************
149 
150 
151 //*************************************************************************************************
158 template< typename MT // Type of the adapted matrix
159  , bool SO // Storage order of the adapted matrix
160  , bool DF > // Density flag
162 {
163  m.clear();
164 }
165 //*************************************************************************************************
166 
167 
168 //*************************************************************************************************
179 template< typename MT // Type of the adapted matrix
180  , bool SO // Storage order of the adapted matrix
181  , bool DF > // Density flag
182 inline bool isDefault_backend( const StrictlyLowerMatrix<MT,SO,DF>& m, TrueType )
183 {
184  return ( m.rows() == 0UL );
185 }
187 //*************************************************************************************************
188 
189 
190 //*************************************************************************************************
201 template< typename MT // Type of the adapted matrix
202  , bool SO // Storage order of the adapted matrix
203  , bool DF > // Density flag
204 inline bool isDefault_backend( const StrictlyLowerMatrix<MT,SO,DF>& m, FalseType )
205 {
206  return isIdentity( m );
207 }
209 //*************************************************************************************************
210 
211 
212 //*************************************************************************************************
231 template< typename MT // Type of the adapted matrix
232  , bool SO // Storage order of the adapted matrix
233  , bool DF > // Density flag
235 {
236  return isDefault_backend( m, typename IsResizable<MT>::Type() );
237 }
238 //*************************************************************************************************
239 
240 
241 //*************************************************************************************************
262 template< typename MT // Type of the adapted matrix
263  , bool SO // Storage order of the adapted matrix
264  , bool DF > // Density flag
266 {
267  return m.isIntact();
268 }
269 //*************************************************************************************************
270 
271 
272 //*************************************************************************************************
281 template< typename MT // Type of the adapted matrix
282  , bool SO // Storage order of the adapted matrix
283  , bool DF > // Density flag
285 {
286  a.swap( b );
287 }
288 //*************************************************************************************************
289 
290 
291 //*************************************************************************************************
308 template< typename MT // Type of the adapted matrix
309  , bool SO // Storage order of the adapted matrix
310  , bool DF // Density flag
311  , typename VT > // Type of the right-hand side dense vector
312 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
313  const DenseVector<VT,false>& rhs, size_t row, size_t column )
314 {
316 
317  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
318  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
319  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
320 
321  UNUSED_PARAMETER( lhs );
322 
323  if( column < row )
324  return true;
325 
326  const size_t iend( min( column - row + 1UL, (~rhs).size() ) );
327 
328  for( size_t i=0UL; i<iend; ++i ) {
329  if( !isDefault( (~rhs)[i] ) )
330  return false;
331  }
332 
333  return true;
334 }
336 //*************************************************************************************************
337 
338 
339 //*************************************************************************************************
356 template< typename MT // Type of the adapted matrix
357  , bool SO // Storage order of the adapted matrix
358  , bool DF // Density flag
359  , typename VT > // Type of the right-hand side dense vector
360 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
361  const DenseVector<VT,true>& rhs, size_t row, size_t column )
362 {
364 
365  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
366  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
367  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
368 
369  UNUSED_PARAMETER( lhs );
370 
371  const size_t ibegin( ( row <= column )?( 0UL ):( row - column ) );
372 
373  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
374  if( !isDefault( (~rhs)[i] ) )
375  return false;
376  }
377 
378  return true;
379 }
381 //*************************************************************************************************
382 
383 
384 //*************************************************************************************************
401 template< typename MT // Type of the adapted matrix
402  , bool SO // Storage order of the adapted matrix
403  , bool DF // Density flag
404  , typename VT > // Type of the right-hand side sparse vector
405 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
406  const SparseVector<VT,false>& rhs, size_t row, size_t column )
407 {
409 
410  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
411  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
412  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
413 
414  UNUSED_PARAMETER( lhs );
415 
416  typedef typename VT::ConstIterator RhsIterator;
417 
418  if( column < row )
419  return true;
420 
421  const RhsIterator last( (~rhs).lowerBound( column - row + 1UL ) );
422 
423  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
424  if( !isDefault( element->value() ) )
425  return false;
426  }
427 
428  return true;
429 }
431 //*************************************************************************************************
432 
433 
434 //*************************************************************************************************
451 template< typename MT // Type of the adapted matrix
452  , bool SO // Storage order of the adapted matrix
453  , bool DF // Density flag
454  , typename VT > // Type of the right-hand side sparse vector
455 inline bool tryAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
456  const SparseVector<VT,true>& rhs, size_t row, size_t column )
457 {
459 
460  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
461  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
462  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
463 
464  UNUSED_PARAMETER( lhs );
465 
466  typedef typename VT::ConstIterator RhsIterator;
467 
468  const RhsIterator last( (~rhs).end() );
469  RhsIterator element( (~rhs).lowerBound( ( row <= column )?( 0UL ):( row - column ) ) );
470 
471  for( ; element!=last; ++element ) {
472  if( !isDefault( element->value() ) )
473  return false;
474  }
475 
476  return true;
477 }
479 //*************************************************************************************************
480 
481 
482 //*************************************************************************************************
499 template< typename MT1 // Type of the adapted matrix
500  , bool SO // Storage order of the adapted matrix
501  , bool DF // Density flag
502  , typename MT2 > // Type of the right-hand side dense matrix
503 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
504  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
505 {
507 
508  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
509  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
510  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
511  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
512 
513  UNUSED_PARAMETER( lhs );
514 
515  const size_t M( (~rhs).rows() );
516  const size_t N( (~rhs).columns() );
517 
518  if( row + 1UL >= column + N )
519  return true;
520 
521  const size_t iend( min( column + N - row, M ) );
522 
523  for( size_t i=0UL; i<iend; ++i )
524  {
525  const bool containsDiagonal( row + i >= column );
526  const size_t jbegin( ( containsDiagonal )?( row + i - column ):( 0UL ) );
527 
528  for( size_t j=jbegin; j<N; ++j ) {
529  if( !isDefault( (~rhs)(i,j) ) )
530  return false;
531  }
532  }
533 
534  return true;
535 }
537 //*************************************************************************************************
538 
539 
540 //*************************************************************************************************
557 template< typename MT1 // Type of the adapted matrix
558  , bool SO // Storage order of the adapted matrix
559  , bool DF // Density flag
560  , typename MT2 > // Type of the right-hand side dense matrix
561 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
562  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
563 {
565 
566  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
567  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
568  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
569  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
570 
571  UNUSED_PARAMETER( lhs );
572 
573  const size_t M( (~rhs).rows() );
574  const size_t N( (~rhs).columns() );
575 
576  if( row + 1UL >= column + N )
577  return true;
578 
579  const size_t jbegin( ( row <= column )?( 0UL ):( row - column ) );
580 
581  for( size_t j=jbegin; j<N; ++j )
582  {
583  const size_t iend( min( column + j - row + 1UL, M ) );
584 
585  for( size_t i=0UL; i<iend; ++i ) {
586  if( !isDefault( (~rhs)(i,j) ) )
587  return false;
588  }
589  }
590 
591  return true;
592 }
594 //*************************************************************************************************
595 
596 
597 //*************************************************************************************************
614 template< typename MT1 // Type of the adapted matrix
615  , bool SO // Storage order of the adapted matrix
616  , bool DF // Density flag
617  , typename MT2 > // Type of the right-hand side sparse matrix
618 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
619  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
620 {
622 
623  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
624  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
625  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
626  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
627 
628  UNUSED_PARAMETER( lhs );
629 
630  typedef typename MT2::ConstIterator RhsIterator;
631 
632  const size_t M( (~rhs).rows() );
633  const size_t N( (~rhs).columns() );
634 
635  if( row + 1UL >= column + N )
636  return true;
637 
638  const size_t iend( min( column + N - row, M ) );
639 
640  for( size_t i=0UL; i<iend; ++i )
641  {
642  const bool containsDiagonal( row + i >= column );
643  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
644 
645  const RhsIterator last( (~rhs).end(i) );
646  RhsIterator element( (~rhs).lowerBound( i, index ) );
647 
648  for( ; element!=last; ++element ) {
649  if( !isDefault( element->value() ) )
650  return false;
651  }
652  }
653 
654  return true;
655 }
657 //*************************************************************************************************
658 
659 
660 //*************************************************************************************************
677 template< typename MT1 // Type of the adapted matrix
678  , bool SO // Storage order of the adapted matrix
679  , bool DF // Density flag
680  , typename MT2 > // Type of the right-hand side sparse matrix
681 inline bool tryAssign( const StrictlyLowerMatrix<MT1,SO,DF>& lhs,
682  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
683 {
685 
686  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
687  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
688  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
689  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
690 
691  UNUSED_PARAMETER( lhs );
692 
693  typedef typename MT2::ConstIterator RhsIterator;
694 
695  const size_t M( (~rhs).rows() );
696  const size_t N( (~rhs).columns() );
697 
698  if( row + 1UL >= column + N )
699  return true;
700 
701  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
702 
703  for( size_t j=jbegin; j<N; ++j )
704  {
705  const size_t index( column + j - row + 1UL );
706  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
707 
708  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
709  if( !isDefault( element->value() ) )
710  return false;
711  }
712  }
713 
714  return true;
715 }
717 //*************************************************************************************************
718 
719 
720 //*************************************************************************************************
737 template< typename MT // Type of the adapted matrix
738  , bool SO // Storage order of the adapted matrix
739  , bool DF // Density flag
740  , typename VT // Type of the right-hand side vector
741  , bool TF > // Transpose flag of the right-hand side vector
742 inline bool tryAddAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
743  const Vector<VT,TF>& rhs, size_t row, size_t column )
744 {
745  return tryAssign( lhs, ~rhs, row, column );
746 }
748 //*************************************************************************************************
749 
750 
751 //*************************************************************************************************
768 template< typename MT1 // Type of the adapted matrix
769  , bool SO1 // Storage order of the adapted matrix
770  , bool DF // Density flag
771  , typename MT2 // Type of the right-hand side matrix
772  , bool SO2 > // Storage order of the right-hand side matrix
773 inline bool tryAddAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
774  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
775 {
776  return tryAssign( lhs, ~rhs, row, column );
777 }
779 //*************************************************************************************************
780 
781 
782 //*************************************************************************************************
799 template< typename MT // Type of the adapted matrix
800  , bool SO // Storage order of the adapted matrix
801  , bool DF // Density flag
802  , typename VT // Type of the right-hand side vector
803  , bool TF > // Transpose flag of the right-hand side vector
804 inline bool trySubAssign( const StrictlyLowerMatrix<MT,SO,DF>& lhs,
805  const Vector<VT,TF>& rhs, size_t row, size_t column )
806 {
807  return tryAssign( lhs, ~rhs, row, column );
808 }
810 //*************************************************************************************************
811 
812 
813 //*************************************************************************************************
830 template< typename MT1 // Type of the adapted matrix
831  , bool SO1 // Storage order of the adapted matrix
832  , bool DF // Density flag
833  , typename MT2 // Type of the right-hand side matrix
834  , bool SO2 > // Storage order of the right-hand side matrix
835 inline bool trySubAssign( const StrictlyLowerMatrix<MT1,SO1,DF>& lhs,
836  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
837 {
838  return tryAssign( lhs, ~rhs, row, column );
839 }
841 //*************************************************************************************************
842 
843 
844 //*************************************************************************************************
858 template< typename MT // Type of the adapted matrix
859  , bool SO // Storage order of the adapted matrix
860  , bool DF > // Density flag
861 inline MT& derestrict( StrictlyLowerMatrix<MT,SO,DF>& m )
862 {
863  return m.matrix_;
864 }
866 //*************************************************************************************************
867 
868 
869 
870 
871 //=================================================================================================
872 //
873 // ROWS SPECIALIZATIONS
874 //
875 //=================================================================================================
876 
877 //*************************************************************************************************
879 template< typename MT, bool SO, bool DF >
880 struct Rows< StrictlyLowerMatrix<MT,SO,DF> > : public Rows<MT>
881 {};
883 //*************************************************************************************************
884 
885 
886 
887 
888 //=================================================================================================
889 //
890 // COLUMNS SPECIALIZATIONS
891 //
892 //=================================================================================================
893 
894 //*************************************************************************************************
896 template< typename MT, bool SO, bool DF >
897 struct Columns< StrictlyLowerMatrix<MT,SO,DF> > : public Columns<MT>
898 {};
900 //*************************************************************************************************
901 
902 
903 
904 
905 //=================================================================================================
906 //
907 // ISSQUARE SPECIALIZATIONS
908 //
909 //=================================================================================================
910 
911 //*************************************************************************************************
913 template< typename MT, bool SO, bool DF >
914 struct IsSquare< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue<true>
915 {};
917 //*************************************************************************************************
918 
919 
920 
921 
922 //=================================================================================================
923 //
924 // ISSTRICTLYLOWER SPECIALIZATIONS
925 //
926 //=================================================================================================
927 
928 //*************************************************************************************************
930 template< typename MT, bool SO, bool DF >
931 struct IsStrictlyLower< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue<true>
932 {};
934 //*************************************************************************************************
935 
936 
937 
938 
939 //=================================================================================================
940 //
941 // ISADAPTOR SPECIALIZATIONS
942 //
943 //=================================================================================================
944 
945 //*************************************************************************************************
947 template< typename MT, bool SO, bool DF >
948 struct IsAdaptor< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue<true>
949 {};
951 //*************************************************************************************************
952 
953 
954 
955 
956 //=================================================================================================
957 //
958 // ISRESTRICTED SPECIALIZATIONS
959 //
960 //=================================================================================================
961 
962 //*************************************************************************************************
964 template< typename MT, bool SO, bool DF >
965 struct IsRestricted< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue<true>
966 {};
968 //*************************************************************************************************
969 
970 
971 
972 
973 //=================================================================================================
974 //
975 // HASCONSTDATAACCESS SPECIALIZATIONS
976 //
977 //=================================================================================================
978 
979 //*************************************************************************************************
981 template< typename MT, bool SO >
982 struct HasConstDataAccess< StrictlyLowerMatrix<MT,SO,true> > : public IsTrue<true>
983 {};
985 //*************************************************************************************************
986 
987 
988 
989 
990 //=================================================================================================
991 //
992 // ISALIGNED SPECIALIZATIONS
993 //
994 //=================================================================================================
995 
996 //*************************************************************************************************
998 template< typename MT, bool SO, bool DF >
999 struct IsAligned< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue< IsAligned<MT>::value >
1000 {};
1002 //*************************************************************************************************
1003 
1004 
1005 
1006 
1007 //=================================================================================================
1008 //
1009 // ISPADDED SPECIALIZATIONS
1010 //
1011 //=================================================================================================
1012 
1013 //*************************************************************************************************
1015 template< typename MT, bool SO, bool DF >
1016 struct IsPadded< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue< IsPadded<MT>::value >
1017 {};
1019 //*************************************************************************************************
1020 
1021 
1022 
1023 
1024 //=================================================================================================
1025 //
1026 // ISRESIZABLE SPECIALIZATIONS
1027 //
1028 //=================================================================================================
1029 
1030 //*************************************************************************************************
1032 template< typename MT, bool SO, bool DF >
1033 struct IsResizable< StrictlyLowerMatrix<MT,SO,DF> > : public IsTrue< IsResizable<MT>::value >
1034 {};
1036 //*************************************************************************************************
1037 
1038 
1039 
1040 
1041 //=================================================================================================
1042 //
1043 // REMOVEADAPTOR SPECIALIZATIONS
1044 //
1045 //=================================================================================================
1046 
1047 //*************************************************************************************************
1049 template< typename MT, bool SO, bool DF >
1050 struct RemoveAdaptor< StrictlyLowerMatrix<MT,SO,DF> >
1051 {
1052  typedef MT Type;
1053 };
1055 //*************************************************************************************************
1056 
1057 
1058 
1059 
1060 //=================================================================================================
1061 //
1062 // DERESTRICTTRAIT SPECIALIZATIONS
1063 //
1064 //=================================================================================================
1065 
1066 //*************************************************************************************************
1068 template< typename MT, bool SO, bool DF >
1069 struct DerestrictTrait< StrictlyLowerMatrix<MT,SO,DF> >
1070 {
1071  typedef MT& Type;
1072 };
1074 //*************************************************************************************************
1075 
1076 
1077 
1078 
1079 //=================================================================================================
1080 //
1081 // ADDTRAIT SPECIALIZATIONS
1082 //
1083 //=================================================================================================
1084 
1085 //*************************************************************************************************
1087 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1088 struct AddTrait< StrictlyLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1089 {
1090  typedef typename AddTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1091 };
1092 
1093 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1094 struct AddTrait< StaticMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1095 {
1096  typedef typename AddTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1097 };
1098 
1099 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1100 struct AddTrait< StrictlyLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1101 {
1102  typedef typename AddTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1103 };
1104 
1105 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1106 struct AddTrait< HybridMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1107 {
1108  typedef typename AddTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1109 };
1110 
1111 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1112 struct AddTrait< StrictlyLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1113 {
1114  typedef typename AddTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1115 };
1116 
1117 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1118 struct AddTrait< DynamicMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1119 {
1120  typedef typename AddTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1121 };
1122 
1123 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1124 struct AddTrait< StrictlyLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1125 {
1126  typedef typename AddTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1127 };
1128 
1129 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1130 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1131 {
1132  typedef typename AddTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1133 };
1134 
1135 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1136 struct AddTrait< StrictlyLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1137 {
1138  typedef typename AddTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1139 };
1140 
1141 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1142 struct AddTrait< CompressedMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1143 {
1144  typedef typename AddTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1145 };
1146 
1147 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1148 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1149 {
1150  typedef typename AddTrait<MT1,MT2>::Type Type;
1151 };
1152 
1153 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1154 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1155 {
1156  typedef typename AddTrait<MT1,MT2>::Type Type;
1157 };
1158 
1159 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1160 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1161 {
1162  typedef typename AddTrait<MT1,MT2>::Type Type;
1163 };
1164 
1165 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1166 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1167 {
1168  typedef typename AddTrait<MT1,MT2>::Type Type;
1169 };
1170 
1171 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1172 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1173 {
1174  typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1175 };
1176 
1177 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1178 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1179 {
1180  typedef LowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1181 };
1182 
1183 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1184 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1185 {
1186  typedef UniLowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1187 };
1188 
1189 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1190 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1191 {
1192  typedef UniLowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1193 };
1194 
1195 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1196 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1197 {
1198  typedef StrictlyLowerMatrix< typename AddTrait<MT1,MT2>::Type > Type;
1199 };
1201 //*************************************************************************************************
1202 
1203 
1204 
1205 
1206 //=================================================================================================
1207 //
1208 // SUBTRAIT SPECIALIZATIONS
1209 //
1210 //=================================================================================================
1211 
1212 //*************************************************************************************************
1214 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1215 struct SubTrait< StrictlyLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1216 {
1217  typedef typename SubTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1218 };
1219 
1220 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1221 struct SubTrait< StaticMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1222 {
1223  typedef typename SubTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1224 };
1225 
1226 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1227 struct SubTrait< StrictlyLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1228 {
1229  typedef typename SubTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1230 };
1231 
1232 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1233 struct SubTrait< HybridMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1234 {
1235  typedef typename SubTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1236 };
1237 
1238 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1239 struct SubTrait< StrictlyLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1240 {
1241  typedef typename SubTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1242 };
1243 
1244 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1245 struct SubTrait< DynamicMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1246 {
1247  typedef typename SubTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1248 };
1249 
1250 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1251 struct SubTrait< StrictlyLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1252 {
1253  typedef typename SubTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1254 };
1255 
1256 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1257 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1258 {
1259  typedef typename SubTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1260 };
1261 
1262 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1263 struct SubTrait< StrictlyLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1264 {
1265  typedef typename SubTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1266 };
1267 
1268 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1269 struct SubTrait< CompressedMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1270 {
1271  typedef typename SubTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1272 };
1273 
1274 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1275 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1276 {
1277  typedef typename SubTrait<MT1,MT2>::Type Type;
1278 };
1279 
1280 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1281 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1282 {
1283  typedef typename SubTrait<MT1,MT2>::Type Type;
1284 };
1285 
1286 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1287 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1288 {
1289  typedef typename SubTrait<MT1,MT2>::Type Type;
1290 };
1291 
1292 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1293 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1294 {
1295  typedef typename SubTrait<MT1,MT2>::Type Type;
1296 };
1297 
1298 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1299 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1300 {
1301  typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1302 };
1303 
1304 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1305 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1306 {
1307  typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1308 };
1309 
1310 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1311 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1312 {
1313  typedef LowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1314 };
1315 
1316 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1317 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1318 {
1319  typedef UniLowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1320 };
1321 
1322 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1323 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1324 {
1325  typedef StrictlyLowerMatrix< typename SubTrait<MT1,MT2>::Type > Type;
1326 };
1328 //*************************************************************************************************
1329 
1330 
1331 
1332 
1333 //=================================================================================================
1334 //
1335 // MULTTRAIT SPECIALIZATIONS
1336 //
1337 //=================================================================================================
1338 
1339 //*************************************************************************************************
1341 template< typename MT, bool SO, bool DF, typename T >
1342 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
1343 {
1344  typedef StrictlyLowerMatrix< typename MultTrait<MT,T>::Type > Type;
1345 };
1346 
1347 template< typename T, typename MT, bool SO, bool DF >
1348 struct MultTrait< T, StrictlyLowerMatrix<MT,SO,DF>, typename EnableIf< IsNumeric<T> >::Type >
1349 {
1350  typedef StrictlyLowerMatrix< typename MultTrait<T,MT>::Type > Type;
1351 };
1352 
1353 template< typename MT, bool SO, bool DF, typename T, size_t N >
1354 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1355 {
1356  typedef typename MultTrait< MT, StaticVector<T,N,false> >::Type Type;
1357 };
1358 
1359 template< typename T, size_t N, typename MT, bool SO, bool DF >
1360 struct MultTrait< StaticVector<T,N,true>, StrictlyLowerMatrix<MT,SO,DF> >
1361 {
1362  typedef typename MultTrait< StaticVector<T,N,true>, MT >::Type Type;
1363 };
1364 
1365 template< typename MT, bool SO, bool DF, typename T, size_t N >
1366 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1367 {
1368  typedef typename MultTrait< MT, HybridVector<T,N,false> >::Type Type;
1369 };
1370 
1371 template< typename T, size_t N, typename MT, bool SO, bool DF >
1372 struct MultTrait< HybridVector<T,N,true>, StrictlyLowerMatrix<MT,SO,DF> >
1373 {
1374  typedef typename MultTrait< HybridVector<T,N,true>, MT >::Type Type;
1375 };
1376 
1377 template< typename MT, bool SO, bool DF, typename T >
1378 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
1379 {
1380  typedef typename MultTrait< MT, DynamicVector<T,false> >::Type Type;
1381 };
1382 
1383 template< typename T, typename MT, bool SO, bool DF >
1384 struct MultTrait< DynamicVector<T,true>, StrictlyLowerMatrix<MT,SO,DF> >
1385 {
1386  typedef typename MultTrait< DynamicVector<T,true>, MT >::Type Type;
1387 };
1388 
1389 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
1390 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
1391 {
1392  typedef typename MultTrait< MT, CustomVector<T,AF,PF,false> >::Type Type;
1393 };
1394 
1395 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
1396 struct MultTrait< CustomVector<T,AF,PF,true>, StrictlyLowerMatrix<MT,SO,DF> >
1397 {
1398  typedef typename MultTrait< CustomVector<T,AF,PF,true>, MT >::Type Type;
1399 };
1400 
1401 template< typename MT, bool SO, bool DF, typename T >
1402 struct MultTrait< StrictlyLowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
1403 {
1404  typedef typename MultTrait< MT, CompressedVector<T,false> >::Type Type;
1405 };
1406 
1407 template< typename T, typename MT, bool SO, bool DF >
1408 struct MultTrait< CompressedVector<T,true>, StrictlyLowerMatrix<MT,SO,DF> >
1409 {
1410  typedef typename MultTrait< CompressedVector<T,true>, MT >::Type Type;
1411 };
1412 
1413 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1414 struct MultTrait< StrictlyLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1415 {
1416  typedef typename MultTrait< MT, StaticMatrix<T,M,N,SO2> >::Type Type;
1417 };
1418 
1419 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1420 struct MultTrait< StaticMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1421 {
1422  typedef typename MultTrait< StaticMatrix<T,M,N,SO1>, MT >::Type Type;
1423 };
1424 
1425 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1426 struct MultTrait< StrictlyLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1427 {
1428  typedef typename MultTrait< MT, HybridMatrix<T,M,N,SO2> >::Type Type;
1429 };
1430 
1431 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1432 struct MultTrait< HybridMatrix<T,M,N,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1433 {
1434  typedef typename MultTrait< HybridMatrix<T,M,N,SO1>, MT >::Type Type;
1435 };
1436 
1437 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1438 struct MultTrait< StrictlyLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1439 {
1440  typedef typename MultTrait< MT, DynamicMatrix<T,SO2> >::Type Type;
1441 };
1442 
1443 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1444 struct MultTrait< DynamicMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1445 {
1446  typedef typename MultTrait< DynamicMatrix<T,SO1>, MT >::Type Type;
1447 };
1448 
1449 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1450 struct MultTrait< StrictlyLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1451 {
1452  typedef typename MultTrait< MT, CustomMatrix<T,AF,PF,SO2> >::Type Type;
1453 };
1454 
1455 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1456 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1457 {
1458  typedef typename MultTrait< CustomMatrix<T,AF,PF,SO1>, MT >::Type Type;
1459 };
1460 
1461 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1462 struct MultTrait< StrictlyLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1463 {
1464  typedef typename MultTrait< MT, CompressedMatrix<T,SO2> >::Type Type;
1465 };
1466 
1467 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1468 struct MultTrait< CompressedMatrix<T,SO1>, StrictlyLowerMatrix<MT,SO2,DF> >
1469 {
1470  typedef typename MultTrait< CompressedMatrix<T,SO1>, MT >::Type Type;
1471 };
1472 
1473 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1474 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1475 {
1476  typedef typename MultTrait<MT1,MT2>::Type Type;
1477 };
1478 
1479 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1480 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1481 {
1482  typedef typename MultTrait<MT1,MT2>::Type Type;
1483 };
1484 
1485 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1486 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1487 {
1488  typedef typename MultTrait<MT1,MT2>::Type Type;
1489 };
1490 
1491 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1492 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1493 {
1494  typedef typename MultTrait<MT1,MT2>::Type Type;
1495 };
1496 
1497 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1498 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1499 {
1500  typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1501 };
1502 
1503 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1504 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1505 {
1506  typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1507 };
1508 
1509 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1510 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1511 {
1512  typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1513 };
1514 
1515 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1516 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1517 {
1518  typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1519 };
1520 
1521 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1522 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1523 {
1524  typedef StrictlyLowerMatrix< typename MultTrait<MT1,MT2>::Type > Type;
1525 };
1527 //*************************************************************************************************
1528 
1529 
1530 
1531 
1532 //=================================================================================================
1533 //
1534 // DIVTRAIT SPECIALIZATIONS
1535 //
1536 //=================================================================================================
1537 
1538 //*************************************************************************************************
1540 template< typename MT, bool SO, bool DF, typename T >
1541 struct DivTrait< StrictlyLowerMatrix<MT,SO,DF>, T, typename EnableIf< IsNumeric<T> >::Type >
1542 {
1543  typedef StrictlyLowerMatrix< typename DivTrait<MT,T>::Type > Type;
1544 };
1546 //*************************************************************************************************
1547 
1548 
1549 
1550 
1551 //=================================================================================================
1552 //
1553 // MATHTRAIT SPECIALIZATIONS
1554 //
1555 //=================================================================================================
1556 
1557 //*************************************************************************************************
1559 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1560 struct MathTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1561 {
1562  typedef StrictlyLowerMatrix< typename MathTrait<MT1,MT2>::HighType > HighType;
1563  typedef StrictlyLowerMatrix< typename MathTrait<MT1,MT2>::LowType > LowType;
1564 };
1566 //*************************************************************************************************
1567 
1568 
1569 
1570 
1571 //=================================================================================================
1572 //
1573 // SUBMATRIXTRAIT SPECIALIZATIONS
1574 //
1575 //=================================================================================================
1576 
1577 //*************************************************************************************************
1579 template< typename MT, bool SO, bool DF >
1580 struct SubmatrixTrait< StrictlyLowerMatrix<MT,SO,DF> >
1581 {
1582  typedef typename SubmatrixTrait<MT>::Type Type;
1583 };
1585 //*************************************************************************************************
1586 
1587 
1588 
1589 
1590 //=================================================================================================
1591 //
1592 // ROWTRAIT SPECIALIZATIONS
1593 //
1594 //=================================================================================================
1595 
1596 //*************************************************************************************************
1598 template< typename MT, bool SO, bool DF >
1599 struct RowTrait< StrictlyLowerMatrix<MT,SO,DF> >
1600 {
1601  typedef typename RowTrait<MT>::Type Type;
1602 };
1604 //*************************************************************************************************
1605 
1606 
1607 
1608 
1609 //=================================================================================================
1610 //
1611 // COLUMNTRAIT SPECIALIZATIONS
1612 //
1613 //=================================================================================================
1614 
1615 //*************************************************************************************************
1617 template< typename MT, bool SO, bool DF >
1618 struct ColumnTrait< StrictlyLowerMatrix<MT,SO,DF> >
1619 {
1620  typedef typename ColumnTrait<MT>::Type Type;
1621 };
1623 //*************************************************************************************************
1624 
1625 } // namespace blaze
1626 
1627 #endif
Header file for mathematical functions.
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
Header file for the row trait.
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:250
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:507
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename ColumnExprTrait< MT >::Type >::Type column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:107
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:547
Header file for the IsSquare type trait.
Header file for the multiplication 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.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
Header file for the Columns type trait.
StrictlyLowerMatrix specialization for sparse matrices.
Header file for the IsAligned type trait.
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:187
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Header file for the DerestrictTrait class template.
Header file for the IsNumeric type trait.
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
DisableIf< Or< IsComputation< MT >, IsTransExpr< MT > >, typename RowExprTrait< MT >::Type >::Type row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:107
Header file for run time assertion macros.
Header file for the addition trait.
StrictlyLowerMatrix specialization for dense matrices.
Header file for the division trait.
Header file for the submatrix trait.
Matrix adapter for strictly lower triangular matrices.
Definition: Forward.h:50
Header file for the column trait.
Header file for the isDefault shim.
#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:118
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b)
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:256
Header file for the mathematical trait.
boost::false_type FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: FalseType.h:61
Header file for the IsTrue value trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:237
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.
#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
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1605
Header file for the implementation of the base template of the UniLowerMatrix.