UniUpperMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_UNIUPPERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
54 #include <blaze/math/Forward.h>
57 #include <blaze/math/shims/IsOne.h>
88 #include <blaze/util/Assert.h>
89 #include <blaze/util/EnableIf.h>
91 #include <blaze/util/TrueType.h>
93 #include <blaze/util/Unused.h>
94 
95 
96 namespace blaze {
97 
98 //=================================================================================================
99 //
100 // UNIUPPERMATRIX OPERATORS
101 //
102 //=================================================================================================
103 
104 //*************************************************************************************************
107 template< typename MT, bool SO, bool DF >
108 inline void reset( UniUpperMatrix<MT,SO,DF>& m );
109 
110 template< typename MT, bool SO, bool DF >
111 inline void reset( UniUpperMatrix<MT,SO,DF>& m, size_t i );
112 
113 template< typename MT, bool SO, bool DF >
114 inline void clear( UniUpperMatrix<MT,SO,DF>& m );
115 
116 template< bool RF, typename MT, bool SO, bool DF >
117 inline bool isDefault( const UniUpperMatrix<MT,SO,DF>& m );
118 
119 template< typename MT, bool SO, bool DF >
120 inline bool isIntact( const UniUpperMatrix<MT,SO,DF>& m );
121 
122 template< typename MT, bool SO, bool DF >
123 inline void swap( UniUpperMatrix<MT,SO,DF>& a, UniUpperMatrix<MT,SO,DF>& b ) noexcept;
125 //*************************************************************************************************
126 
127 
128 //*************************************************************************************************
135 template< typename MT // Type of the adapted matrix
136  , bool SO // Storage order of the adapted matrix
137  , bool DF > // Density flag
139 {
140  m.reset();
141 }
142 //*************************************************************************************************
143 
144 
145 //*************************************************************************************************
158 template< typename MT // Type of the adapted matrix
159  , bool SO // Storage order of the adapted matrix
160  , bool DF > // Density flag
161 inline void reset( UniUpperMatrix<MT,SO,DF>& m, size_t i )
162 {
163  m.reset( i );
164 }
165 //*************************************************************************************************
166 
167 
168 //*************************************************************************************************
175 template< typename MT // Type of the adapted matrix
176  , bool SO // Storage order of the adapted matrix
177  , bool DF > // Density flag
179 {
180  m.clear();
181 }
182 //*************************************************************************************************
183 
184 
185 //*************************************************************************************************
195 template< bool RF // Relaxation flag
196  , typename MT // Type of the adapted matrix
197  , bool SO // Storage order of the adapted matrix
198  , bool DF > // Density flag
199 inline bool isDefault_backend( const UniUpperMatrix<MT,SO,DF>& m, TrueType )
200 {
201  return ( m.rows() == 0UL );
202 }
204 //*************************************************************************************************
205 
206 
207 //*************************************************************************************************
217 template< bool RF // Relaxation flag
218  , typename MT // Type of the adapted matrix
219  , bool SO // Storage order of the adapted matrix
220  , bool DF > // Density flag
221 inline bool isDefault_backend( const UniUpperMatrix<MT,SO,DF>& m, FalseType )
222 {
223  return isIdentity<RF>( m );
224 }
226 //*************************************************************************************************
227 
228 
229 //*************************************************************************************************
256 template< bool RF // Relaxation flag
257  , typename MT // Type of the adapted matrix
258  , bool SO // Storage order of the adapted matrix
259  , bool DF > // Density flag
260 inline bool isDefault( const UniUpperMatrix<MT,SO,DF>& m )
261 {
262  return isDefault_backend<RF>( m, typename IsResizable<MT>::Type() );
263 }
264 //*************************************************************************************************
265 
266 
267 //*************************************************************************************************
288 template< typename MT // Type of the adapted matrix
289  , bool SO // Storage order of the adapted matrix
290  , bool DF > // Density flag
291 inline bool isIntact( const UniUpperMatrix<MT,SO,DF>& m )
292 {
293  return m.isIntact();
294 }
295 //*************************************************************************************************
296 
297 
298 //*************************************************************************************************
306 template< typename MT // Type of the adapted matrix
307  , bool SO // Storage order of the adapted matrix
308  , bool DF > // Density flag
310 {
311  a.swap( b );
312 }
313 //*************************************************************************************************
314 
315 
316 //*************************************************************************************************
339 template< InversionFlag IF // Inversion algorithm
340  , typename MT // Type of the dense matrix
341  , bool SO > // Storage order of the dense matrix
342 inline void invert( UniUpperMatrix<MT,SO,true>& m )
343 {
345 
346  if( IF == asLower || IF == asUniLower ) {
347  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
348  return;
349  }
350 
351  constexpr InversionFlag flag( ( IF == byLU || IF == asGeneral || IF == asUpper || IF == asUniUpper)
352  ? ( asUniUpper )
353  : ( asDiagonal ) );
354 
355  invert<flag>( derestrict( m ) );
356 
357  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
358 }
360 //*************************************************************************************************
361 
362 
363 //*************************************************************************************************
382 template< typename MT1, bool SO1, typename MT2, typename MT3, typename MT4, bool SO2 >
383 inline void lu( const UniUpperMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
385 {
387 
392 
397 
398  using ET2 = ElementType_<MT2>;
399  using ET4 = ElementType_<MT4>;
400 
401  const size_t n( (~A).rows() );
402 
403  decltype(auto) L2( derestrict( ~L ) );
404 
405  (~U) = A;
406 
407  resize( ~L, n, n );
408  reset( L2 );
409 
410  resize( ~P, n, n );
411  reset( ~P );
412 
413  for( size_t i=0UL; i<n; ++i ) {
414  L2(i,i) = ET2(1);
415  (~P)(i,i) = ET4(1);
416  }
417 }
419 //*************************************************************************************************
420 
421 
422 //*************************************************************************************************
438 template< typename MT // Type of the adapted matrix
439  , bool SO // Storage order of the adapted matrix
440  , bool DF // Density flag
441  , typename VT > // Type of the right-hand side dense vector
442 inline bool tryAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
443  const DenseVector<VT,false>& rhs, size_t row, size_t column )
444 {
446 
447  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
448  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
449  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
450 
451  UNUSED_PARAMETER( lhs );
452 
453  if( column >= row + (~rhs).size() )
454  return true;
455 
456  const bool containsDiagonal( column >= row );
457  const size_t ibegin( ( !containsDiagonal )?( 0UL ):( column - row + 1UL ) );
458 
459  if( containsDiagonal && !isOne( (~rhs)[column-row] ) )
460  return false;
461 
462  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
463  if( !isDefault( (~rhs)[i] ) )
464  return false;
465  }
466 
467  return true;
468 }
470 //*************************************************************************************************
471 
472 
473 //*************************************************************************************************
489 template< typename MT // Type of the adapted matrix
490  , bool SO // Storage order of the adapted matrix
491  , bool DF // Density flag
492  , typename VT > // Type of the right-hand side dense vector
493 inline bool tryAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
494  const DenseVector<VT,true>& rhs, size_t row, size_t column )
495 {
497 
498  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
499  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
500  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
501 
502  UNUSED_PARAMETER( lhs );
503 
504  if( row < column )
505  return true;
506 
507  const bool containsDiagonal( row < column + (~rhs).size() );
508  const size_t iend( min( row - column, (~rhs).size() ) );
509 
510  for( size_t i=0UL; i<iend; ++i ) {
511  if( !isDefault( (~rhs)[i] ) )
512  return false;
513  }
514 
515  if( containsDiagonal && !isOne( (~rhs)[iend] ) )
516  return false;
517 
518  return true;
519 }
521 //*************************************************************************************************
522 
523 
524 //*************************************************************************************************
540 template< typename MT // Type of the adapted matrix
541  , bool SO // Storage order of the adapted matrix
542  , bool DF // Density flag
543  , typename VT > // Type of the right-hand side sparse vector
544 inline bool tryAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
545  const SparseVector<VT,false>& rhs, size_t row, size_t column )
546 {
548 
549  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
550  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
551  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
552 
553  UNUSED_PARAMETER( lhs );
554 
555  using RhsIterator = typename VT::ConstIterator;
556 
557  if( column >= row + (~rhs).size() )
558  return true;
559 
560  const bool containsDiagonal( column >= row );
561  const size_t index( ( containsDiagonal )?( column - row ):( 0UL ) );
562  const RhsIterator last( (~rhs).end() );
563  RhsIterator element( (~rhs).lowerBound( index ) );
564 
565  if( containsDiagonal ) {
566  if( element == last || element->index() != index || !isOne( element->value() ) )
567  return false;
568  ++element;
569  }
570 
571  for( ; element!=last; ++element ) {
572  if( !isDefault( element->value() ) )
573  return false;
574  }
575 
576  return true;
577 }
579 //*************************************************************************************************
580 
581 
582 //*************************************************************************************************
598 template< typename MT // Type of the adapted matrix
599  , bool SO // Storage order of the adapted matrix
600  , bool DF // Density flag
601  , typename VT > // Type of the right-hand side sparse vector
602 inline bool tryAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
603  const SparseVector<VT,true>& rhs, size_t row, size_t column )
604 {
606 
607  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
608  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
609  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
610 
611  UNUSED_PARAMETER( lhs );
612 
613  using RhsIterator = typename VT::ConstIterator;
614 
615  if( row < column )
616  return true;
617 
618  const bool containsDiagonal( row < column + (~rhs).size() );
619  const size_t index( row - column );
620  const RhsIterator last( (~rhs).lowerBound( index ) );
621 
622  if( containsDiagonal ) {
623  if( last == (~rhs).end() || last->index() != index || !isOne( last->value() ) )
624  return false;
625  }
626 
627  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
628  if( !isDefault( element->value() ) )
629  return false;
630  }
631 
632  return true;
633 }
635 //*************************************************************************************************
636 
637 
638 //*************************************************************************************************
654 template< typename MT1 // Type of the adapted matrix
655  , bool SO // Storage order of the adapted matrix
656  , bool DF // Density flag
657  , typename MT2 > // Type of the right-hand side dense matrix
658 inline bool tryAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
659  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
660 {
662 
663  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
664  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
665  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
666  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
667 
668  UNUSED_PARAMETER( lhs );
669 
670  const size_t M( (~rhs).rows() );
671  const size_t N( (~rhs).columns() );
672 
673  if( column + 1UL >= row + M )
674  return true;
675 
676  const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
677 
678  for( size_t i=ibegin; i<M; ++i )
679  {
680  const size_t jend( min( row + i - column, N ) );
681 
682  for( size_t j=0UL; j<jend; ++j ) {
683  if( !isDefault( (~rhs)(i,j) ) )
684  return false;
685  }
686 
687  const bool containsDiagonal( row + i < column + N );
688 
689  if( containsDiagonal && !isOne( (~rhs)(i,jend) ) )
690  return false;
691  }
692 
693  return true;
694 }
696 //*************************************************************************************************
697 
698 
699 //*************************************************************************************************
715 template< typename MT1 // Type of the adapted matrix
716  , bool SO // Storage order of the adapted matrix
717  , bool DF // Density flag
718  , typename MT2 > // Type of the right-hand side dense matrix
719 inline bool tryAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
720  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
721 {
723 
724  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
725  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
726  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
727  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
728 
729  UNUSED_PARAMETER( lhs );
730 
731  const size_t M( (~rhs).rows() );
732  const size_t N( (~rhs).columns() );
733 
734  if( column + 1UL >= row + M )
735  return true;
736 
737  const size_t jend( min( row + M - column, N ) );
738 
739  for( size_t j=0UL; j<jend; ++j )
740  {
741  const bool containsDiagonal( column + j >= row );
742 
743  if( containsDiagonal && !isOne( (~rhs)(column+j-row,j) ) )
744  return false;
745 
746  const size_t ibegin( ( containsDiagonal )?( column + j - row + 1UL ):( 0UL ) );
747 
748  for( size_t i=ibegin; i<M; ++i ) {
749  if( !isDefault( (~rhs)(i,j) ) )
750  return false;
751  }
752  }
753 
754  return true;
755 }
757 //*************************************************************************************************
758 
759 
760 //*************************************************************************************************
776 template< typename MT1 // Type of the adapted matrix
777  , bool SO // Storage order of the adapted matrix
778  , bool DF // Density flag
779  , typename MT2 > // Type of the right-hand side sparse matrix
780 inline bool tryAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
781  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
782 {
784 
785  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
786  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
787  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
788  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
789 
790  UNUSED_PARAMETER( lhs );
791 
792  using RhsIterator = typename MT2::ConstIterator;
793 
794  const size_t M( (~rhs).rows() );
795  const size_t N( (~rhs).columns() );
796 
797  if( column + 1UL >= row + M )
798  return true;
799 
800  const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
801 
802  for( size_t i=ibegin; i<M; ++i )
803  {
804  const bool containsDiagonal( row + i < column + N );
805 
806  const size_t index( row + i - column );
807  const RhsIterator last( (~rhs).lowerBound( i, min( index, N ) ) );
808 
809  if( containsDiagonal ) {
810  if( last == (~rhs).end(i) || ( last->index() != index ) || !isOne( last->value() ) )
811  return false;
812  }
813 
814  for( RhsIterator element=(~rhs).begin(i); element!=last; ++element ) {
815  if( !isDefault( element->value() ) )
816  return false;
817  }
818  }
819 
820  return true;
821 }
823 //*************************************************************************************************
824 
825 
826 //*************************************************************************************************
842 template< typename MT1 // Type of the adapted matrix
843  , bool SO // Storage order of the adapted matrix
844  , bool DF // Density flag
845  , typename MT2 > // Type of the right-hand side sparse matrix
846 inline bool tryAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
847  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
848 {
850 
851  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
852  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
853  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
854  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
855 
856  UNUSED_PARAMETER( lhs );
857 
858  using RhsIterator = typename MT2::ConstIterator;
859 
860  const size_t M( (~rhs).rows() );
861  const size_t N( (~rhs).columns() );
862 
863  if( column + 1UL >= row + M )
864  return true;
865 
866  const size_t jend( min( row + M - column, N ) );
867 
868  for( size_t j=0UL; j<jend; ++j )
869  {
870  const bool containsDiagonal( column + j >= row );
871  const size_t index( ( containsDiagonal )?( column + j - row ):( 0UL ) );
872 
873  const RhsIterator last( (~rhs).end(j) );
874  RhsIterator element( (~rhs).lowerBound( index, j ) );
875 
876  if( containsDiagonal ) {
877  if( element == last || ( element->index() != index ) || !isOne( element->value() ) )
878  return false;
879  ++element;
880  }
881 
882  for( ; element!=last; ++element ) {
883  if( !isDefault( element->value() ) )
884  return false;
885  }
886  }
887 
888  return true;
889 }
891 //*************************************************************************************************
892 
893 
894 //*************************************************************************************************
911 template< typename MT // Type of the adapted matrix
912  , bool SO // Storage order of the adapted matrix
913  , bool DF // Density flag
914  , typename VT > // Type of the right-hand side dense vector
915 inline bool tryAddAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
916  const DenseVector<VT,false>& rhs, size_t row, size_t column )
917 {
919 
920  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
921  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
922  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
923 
924  UNUSED_PARAMETER( lhs );
925 
926  const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
927 
928  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
929  if( !isDefault( (~rhs)[i] ) )
930  return false;
931  }
932 
933  return true;
934 }
936 //*************************************************************************************************
937 
938 
939 //*************************************************************************************************
956 template< typename MT // Type of the adapted matrix
957  , bool SO // Storage order of the adapted matrix
958  , bool DF // Density flag
959  , typename VT > // Type of the right-hand side dense vector
960 inline bool tryAddAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
961  const DenseVector<VT,true>& rhs, size_t row, size_t column )
962 {
964 
965  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
966  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
967  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
968 
969  UNUSED_PARAMETER( lhs );
970 
971  if( row < column )
972  return true;
973 
974  const size_t iend( min( row - column + 1UL, (~rhs).size() ) );
975 
976  for( size_t i=0UL; i<iend; ++i ) {
977  if( !isDefault( (~rhs)[i] ) )
978  return false;
979  }
980 
981  return true;
982 }
984 //*************************************************************************************************
985 
986 
987 //*************************************************************************************************
1004 template< typename MT // Type of the adapted matrix
1005  , bool SO // Storage order of the adapted matrix
1006  , bool DF // Density flag
1007  , typename VT > // Type of the right-hand side sparse vector
1008 inline bool tryAddAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1009  const SparseVector<VT,false>& rhs, size_t row, size_t column )
1010 {
1012 
1013  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1014  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1015  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
1016 
1017  UNUSED_PARAMETER( lhs );
1018 
1019  using RhsIterator = typename VT::ConstIterator;
1020 
1021  const RhsIterator last( (~rhs).end() );
1022  RhsIterator element( (~rhs).lowerBound( ( column <= row )?( 0UL ):( column - row ) ) );
1023 
1024  for( ; element!=last; ++element ) {
1025  if( !isDefault( element->value() ) )
1026  return false;
1027  }
1028 
1029  return true;
1030 }
1032 //*************************************************************************************************
1033 
1034 
1035 //*************************************************************************************************
1052 template< typename MT // Type of the adapted matrix
1053  , bool SO // Storage order of the adapted matrix
1054  , bool DF // Density flag
1055  , typename VT > // Type of the right-hand side sparse vector
1056 inline bool tryAddAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1057  const SparseVector<VT,true>& rhs, size_t row, size_t column )
1058 {
1060 
1061  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1062  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1063  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
1064 
1065  UNUSED_PARAMETER( lhs );
1066 
1067  using RhsIterator = typename VT::ConstIterator;
1068 
1069  if( row < column )
1070  return true;
1071 
1072  const RhsIterator last( (~rhs).lowerBound( row - column + 1UL ) );
1073 
1074  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
1075  if( !isDefault( element->value() ) )
1076  return false;
1077  }
1078 
1079  return true;
1080 }
1082 //*************************************************************************************************
1083 
1084 
1085 //*************************************************************************************************
1102 template< typename MT1 // Type of the adapted matrix
1103  , bool SO // Storage order of the adapted matrix
1104  , bool DF // Density flag
1105  , typename MT2 > // Type of the right-hand side dense matrix
1106 inline bool tryAddAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
1107  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
1108 {
1110 
1111  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1112  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1113  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1114  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1115 
1116  UNUSED_PARAMETER( lhs );
1117 
1118  const size_t M( (~rhs).rows() );
1119  const size_t N( (~rhs).columns() );
1120 
1121  if( column + 1UL >= row + M )
1122  return true;
1123 
1124  const size_t ibegin( ( column <= row )?( 0UL ):( column - row ) );
1125 
1126  for( size_t i=ibegin; i<M; ++i )
1127  {
1128  const size_t jend( min( row + i - column + 1UL, N ) );
1129 
1130  for( size_t j=0UL; j<jend; ++j ) {
1131  if( !isDefault( (~rhs)(i,j) ) )
1132  return false;
1133  }
1134  }
1135 
1136  return true;
1137 }
1139 //*************************************************************************************************
1140 
1141 
1142 //*************************************************************************************************
1159 template< typename MT1 // Type of the adapted matrix
1160  , bool SO // Storage order of the adapted matrix
1161  , bool DF // Density flag
1162  , typename MT2 > // Type of the right-hand side dense matrix
1163 inline bool tryAddAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
1164  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
1165 {
1167 
1168  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1169  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1170  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1171  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1172 
1173  UNUSED_PARAMETER( lhs );
1174 
1175  const size_t M( (~rhs).rows() );
1176  const size_t N( (~rhs).columns() );
1177 
1178  if( column + 1UL >= row + M )
1179  return true;
1180 
1181  const size_t jend( min( row + M - column, N ) );
1182 
1183  for( size_t j=0UL; j<jend; ++j )
1184  {
1185  const bool containsDiagonal( column + j >= row );
1186  const size_t ibegin( ( containsDiagonal )?( column + j - row ):( 0UL ) );
1187 
1188  for( size_t i=ibegin; i<M; ++i ) {
1189  if( !isDefault( (~rhs)(i,j) ) )
1190  return false;
1191  }
1192  }
1193 
1194  return true;
1195 }
1197 //*************************************************************************************************
1198 
1199 
1200 //*************************************************************************************************
1217 template< typename MT1 // Type of the adapted matrix
1218  , bool SO // Storage order of the adapted matrix
1219  , bool DF // Density flag
1220  , typename MT2 > // Type of the right-hand side sparse matrix
1221 inline bool tryAddAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
1222  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
1223 {
1225 
1226  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1227  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1228  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1229  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1230 
1231  UNUSED_PARAMETER( lhs );
1232 
1233  using RhsIterator = typename MT2::ConstIterator;
1234 
1235  const size_t M( (~rhs).rows() );
1236  const size_t N( (~rhs).columns() );
1237 
1238  if( column + 1UL >= row + M )
1239  return true;
1240 
1241  const size_t ibegin( ( column < row )?( 0UL ):( column - row ) );
1242 
1243  for( size_t i=ibegin; i<M; ++i )
1244  {
1245  const size_t index( row + i - column + 1UL );
1246  const RhsIterator last( (~rhs).lowerBound( i, min( index, N ) ) );
1247 
1248  for( RhsIterator element=(~rhs).begin(i); element!=last; ++element ) {
1249  if( !isDefault( element->value() ) )
1250  return false;
1251  }
1252  }
1253 
1254  return true;
1255 }
1257 //*************************************************************************************************
1258 
1259 
1260 //*************************************************************************************************
1277 template< typename MT1 // Type of the adapted matrix
1278  , bool SO // Storage order of the adapted matrix
1279  , bool DF // Density flag
1280  , typename MT2 > // Type of the right-hand side sparse matrix
1281 inline bool tryAddAssign( const UniUpperMatrix<MT1,SO,DF>& lhs,
1282  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
1283 {
1285 
1286  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1287  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1288  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1289  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1290 
1291  UNUSED_PARAMETER( lhs );
1292 
1293  using RhsIterator = typename MT2::ConstIterator;
1294 
1295  const size_t M( (~rhs).rows() );
1296  const size_t N( (~rhs).columns() );
1297 
1298  if( column + 1UL >= row + M )
1299  return true;
1300 
1301  const size_t jend( min( row + M - column, N ) );
1302 
1303  for( size_t j=0UL; j<jend; ++j )
1304  {
1305  const bool containsDiagonal( column + j >= row );
1306  const size_t index( ( containsDiagonal )?( column + j - row ):( 0UL ) );
1307 
1308  const RhsIterator last( (~rhs).end(j) );
1309  RhsIterator element( (~rhs).lowerBound( index, j ) );
1310 
1311  for( ; element!=last; ++element ) {
1312  if( !isDefault( element->value() ) )
1313  return false;
1314  }
1315  }
1316 
1317  return true;
1318 }
1320 //*************************************************************************************************
1321 
1322 
1323 //*************************************************************************************************
1340 template< typename MT // Type of the adapted matrix
1341  , bool SO // Storage order of the adapted matrix
1342  , bool DF // Density flag
1343  , typename VT // Type of the right-hand side vector
1344  , bool TF > // Transpose flag of the right-hand side vector
1345 inline bool trySubAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1346  const Vector<VT,TF>& rhs, size_t row, size_t column )
1347 {
1348  return tryAddAssign( lhs, ~rhs, row, column );
1349 }
1351 //*************************************************************************************************
1352 
1353 
1354 //*************************************************************************************************
1371 template< typename MT1 // Type of the adapted matrix
1372  , bool SO1 // Storage order of the adapted matrix
1373  , bool DF // Density flag
1374  , typename MT2 // Type of the right-hand side matrix
1375  , bool SO2 > // Storage order of the right-hand side matrix
1376 inline bool trySubAssign( const UniUpperMatrix<MT1,SO1,DF>& lhs,
1377  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1378 {
1379  return tryAddAssign( lhs, ~rhs, row, column );
1380 }
1382 //*************************************************************************************************
1383 
1384 
1385 //*************************************************************************************************
1402 template< typename MT // Type of the adapted matrix
1403  , bool SO // Storage order of the adapted matrix
1404  , bool DF // Density flag
1405  , typename VT > // Type of the right-hand side vector
1406 inline bool tryMultAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1407  const Vector<VT,false>& rhs, size_t row, size_t column )
1408 {
1410 
1411  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1412  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1413  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
1414 
1415  UNUSED_PARAMETER( lhs );
1416 
1417  return ( column < row || (~rhs).size() <= column - row || isOne( (~rhs)[column-row] ) );
1418 }
1420 //*************************************************************************************************
1421 
1422 
1423 //*************************************************************************************************
1440 template< typename MT // Type of the adapted matrix
1441  , bool SO // Storage order of the adapted matrix
1442  , bool DF // Density flag
1443  , typename VT > // Type of the right-hand side vector
1444 inline bool tryMultAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1445  const Vector<VT,true>& rhs, size_t row, size_t column )
1446 {
1448 
1449  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1450  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1451  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
1452 
1453  UNUSED_PARAMETER( lhs );
1454 
1455  return ( row < column || (~rhs).size() <= row - column || isOne( (~rhs)[row-column] ) );
1456 }
1458 //*************************************************************************************************
1459 
1460 
1461 //*************************************************************************************************
1478 template< typename MT1 // Type of the adapted matrix
1479  , bool SO1 // Storage order of the adapted matrix
1480  , bool DF // Density flag
1481  , typename MT2 // Type of the right-hand side matrix
1482  , bool SO2 > // Storage order of the right-hand side matrix
1483 inline bool trySchurAssign( const UniUpperMatrix<MT1,SO1,DF>& lhs,
1484  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1485 {
1487 
1488  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1489  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1490  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1491  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1492 
1493  UNUSED_PARAMETER( lhs );
1494 
1495  const size_t M( (~rhs).rows() );
1496  const size_t N( (~rhs).columns() );
1497 
1498  if( ( row + 1UL >= column + N ) || ( column + 1UL >= row + M ) )
1499  return true;
1500 
1501  size_t i( row < column ? column - row : 0UL );
1502  size_t j( column < row ? row - column : 0UL );
1503 
1504  for( ; i<M && j<N; ++i, ++j )
1505  {
1506  if( !isOne( (~rhs)(i,j) ) )
1507  return false;
1508  }
1509 
1510  return true;
1511 }
1513 //*************************************************************************************************
1514 
1515 
1516 //*************************************************************************************************
1532 template< typename MT // Type of the adapted matrix
1533  , bool SO // Storage order of the adapted matrix
1534  , bool DF // Density flag
1535  , typename VT // Type of the right-hand side vector
1536  , bool TF > // Transpose flag of the right-hand side vector
1537 inline bool tryDivAssign( const UniUpperMatrix<MT,SO,DF>& lhs,
1538  const Vector<VT,TF>& rhs, size_t row, size_t column )
1539 {
1540  return tryMultAssign( lhs, ~rhs, row, column );
1541 }
1543 //*************************************************************************************************
1544 
1545 
1546 //*************************************************************************************************
1560 template< typename MT // Type of the adapted matrix
1561  , bool SO // Storage order of the adapted matrix
1562  , bool DF > // Density flag
1563 inline MT& derestrict( UniUpperMatrix<MT,SO,DF>& m )
1564 {
1565  return m.matrix_;
1566 }
1568 //*************************************************************************************************
1569 
1570 
1571 
1572 
1573 //=================================================================================================
1574 //
1575 // ROWS SPECIALIZATIONS
1576 //
1577 //=================================================================================================
1578 
1579 //*************************************************************************************************
1581 template< typename MT, bool SO, bool DF >
1582 struct Rows< UniUpperMatrix<MT,SO,DF> >
1583  : public Rows<MT>
1584 {};
1586 //*************************************************************************************************
1587 
1588 
1589 
1590 
1591 //=================================================================================================
1592 //
1593 // COLUMNS SPECIALIZATIONS
1594 //
1595 //=================================================================================================
1596 
1597 //*************************************************************************************************
1599 template< typename MT, bool SO, bool DF >
1600 struct Columns< UniUpperMatrix<MT,SO,DF> >
1601  : public Columns<MT>
1602 {};
1604 //*************************************************************************************************
1605 
1606 
1607 
1608 
1609 //=================================================================================================
1610 //
1611 // ISSQUARE SPECIALIZATIONS
1612 //
1613 //=================================================================================================
1614 
1615 //*************************************************************************************************
1617 template< typename MT, bool SO, bool DF >
1618 struct IsSquare< UniUpperMatrix<MT,SO,DF> >
1619  : public TrueType
1620 {};
1622 //*************************************************************************************************
1623 
1624 
1625 
1626 
1627 //=================================================================================================
1628 //
1629 // ISUNIUPPER SPECIALIZATIONS
1630 //
1631 //=================================================================================================
1632 
1633 //*************************************************************************************************
1635 template< typename MT, bool SO, bool DF >
1636 struct IsUniUpper< UniUpperMatrix<MT,SO,DF> >
1637  : public TrueType
1638 {};
1640 //*************************************************************************************************
1641 
1642 
1643 
1644 
1645 //=================================================================================================
1646 //
1647 // ISADAPTOR SPECIALIZATIONS
1648 //
1649 //=================================================================================================
1650 
1651 //*************************************************************************************************
1653 template< typename MT, bool SO, bool DF >
1654 struct IsAdaptor< UniUpperMatrix<MT,SO,DF> >
1655  : public TrueType
1656 {};
1658 //*************************************************************************************************
1659 
1660 
1661 
1662 
1663 //=================================================================================================
1664 //
1665 // ISRESTRICTED SPECIALIZATIONS
1666 //
1667 //=================================================================================================
1668 
1669 //*************************************************************************************************
1671 template< typename MT, bool SO, bool DF >
1672 struct IsRestricted< UniUpperMatrix<MT,SO,DF> >
1673  : public TrueType
1674 {};
1676 //*************************************************************************************************
1677 
1678 
1679 
1680 
1681 //=================================================================================================
1682 //
1683 // HASCONSTDATAACCESS SPECIALIZATIONS
1684 //
1685 //=================================================================================================
1686 
1687 //*************************************************************************************************
1689 template< typename MT, bool SO >
1690 struct HasConstDataAccess< UniUpperMatrix<MT,SO,true> >
1691  : public TrueType
1692 {};
1694 //*************************************************************************************************
1695 
1696 
1697 
1698 
1699 //=================================================================================================
1700 //
1701 // ISALIGNED SPECIALIZATIONS
1702 //
1703 //=================================================================================================
1704 
1705 //*************************************************************************************************
1707 template< typename MT, bool SO, bool DF >
1708 struct IsAligned< UniUpperMatrix<MT,SO,DF> >
1709  : public BoolConstant< IsAligned<MT>::value >
1710 {};
1712 //*************************************************************************************************
1713 
1714 
1715 
1716 
1717 //=================================================================================================
1718 //
1719 // ISPADDED SPECIALIZATIONS
1720 //
1721 //=================================================================================================
1722 
1723 //*************************************************************************************************
1725 template< typename MT, bool SO, bool DF >
1726 struct IsPadded< UniUpperMatrix<MT,SO,DF> >
1727  : public BoolConstant< IsPadded<MT>::value >
1728 {};
1730 //*************************************************************************************************
1731 
1732 
1733 
1734 
1735 //=================================================================================================
1736 //
1737 // ISRESIZABLE SPECIALIZATIONS
1738 //
1739 //=================================================================================================
1740 
1741 //*************************************************************************************************
1743 template< typename MT, bool SO, bool DF >
1744 struct IsResizable< UniUpperMatrix<MT,SO,DF> >
1745  : public BoolConstant< IsResizable<MT>::value >
1746 {};
1748 //*************************************************************************************************
1749 
1750 
1751 
1752 
1753 //=================================================================================================
1754 //
1755 // ISSHRINKABLE SPECIALIZATIONS
1756 //
1757 //=================================================================================================
1758 
1759 //*************************************************************************************************
1761 template< typename MT, bool SO, bool DF >
1762 struct IsShrinkable< UniUpperMatrix<MT,SO,DF> >
1763  : public BoolConstant< IsShrinkable<MT>::value >
1764 {};
1766 //*************************************************************************************************
1767 
1768 
1769 
1770 
1771 //=================================================================================================
1772 //
1773 // REMOVEADAPTOR SPECIALIZATIONS
1774 //
1775 //=================================================================================================
1776 
1777 //*************************************************************************************************
1779 template< typename MT, bool SO, bool DF >
1780 struct RemoveAdaptor< UniUpperMatrix<MT,SO,DF> >
1781 {
1782  using Type = MT;
1783 };
1785 //*************************************************************************************************
1786 
1787 
1788 
1789 
1790 //=================================================================================================
1791 //
1792 // ADDTRAIT SPECIALIZATIONS
1793 //
1794 //=================================================================================================
1795 
1796 //*************************************************************************************************
1798 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1799 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1800 {
1802 };
1803 
1804 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1805 struct AddTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
1806 {
1807  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1808 };
1809 
1810 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1811 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1812 {
1814 };
1815 
1816 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1817 struct AddTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
1818 {
1819  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1820 };
1821 
1822 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1823 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1824 {
1825  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1826 };
1827 
1828 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1829 struct AddTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
1830 {
1831  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1832 };
1833 
1834 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1835 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1836 {
1838 };
1839 
1840 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1841 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, UniUpperMatrix<MT,SO2,DF> >
1842 {
1843  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1844 };
1845 
1846 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1847 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1848 {
1850 };
1851 
1852 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1853 struct AddTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
1854 {
1855  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1856 };
1857 
1858 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1859 struct AddTrait< UniUpperMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
1860 {
1862 };
1863 
1864 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1865 struct AddTrait< IdentityMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
1866 {
1867  using Type = UpperMatrix< AddTrait_< IdentityMatrix<T,SO1>, MT > >;
1868 };
1869 
1870 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1871 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1872 {
1873  using Type = AddTrait_<MT1,MT2>;
1874 };
1875 
1876 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1877 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
1878 {
1879  using Type = AddTrait_<MT1,MT2>;
1880 };
1881 
1882 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1883 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1884 {
1885  using Type = AddTrait_<MT1,MT2>;
1886 };
1887 
1888 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1889 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1890 {
1891  using Type = AddTrait_<MT1,MT2>;
1892 };
1893 
1894 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1895 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1896 {
1897  using Type = AddTrait_<MT1,MT2>;
1898 };
1899 
1900 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1901 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1902 {
1903  using Type = AddTrait_<MT1,MT2>;
1904 };
1905 
1906 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1907 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1908 {
1909  using Type = AddTrait_<MT1,MT2>;
1910 };
1911 
1912 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1913 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1914 {
1915  using Type = AddTrait_<MT1,MT2>;
1916 };
1917 
1918 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1919 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
1920 {
1921  using Type = AddTrait_<MT1,MT2>;
1922 };
1923 
1924 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1925 struct AddTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1926 {
1927  using Type = AddTrait_<MT1,MT2>;
1928 };
1929 
1930 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1931 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
1932 {
1933  using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1934 };
1935 
1936 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1937 struct AddTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1938 {
1939  using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1940 };
1941 
1942 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1943 struct AddTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
1944 {
1945  using Type = UpperMatrix< AddTrait_<MT1,MT2> >;
1946 };
1948 //*************************************************************************************************
1949 
1950 
1951 
1952 
1953 //=================================================================================================
1954 //
1955 // SUBTRAIT SPECIALIZATIONS
1956 //
1957 //=================================================================================================
1958 
1959 //*************************************************************************************************
1961 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1962 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1963 {
1965 };
1966 
1967 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1968 struct SubTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
1969 {
1970  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1971 };
1972 
1973 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1974 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1975 {
1977 };
1978 
1979 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1980 struct SubTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
1981 {
1982  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1983 };
1984 
1985 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1986 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1987 {
1988  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1989 };
1990 
1991 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1992 struct SubTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
1993 {
1994  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1995 };
1996 
1997 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1998 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1999 {
2001 };
2002 
2003 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2004 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, UniUpperMatrix<MT,SO2,DF> >
2005 {
2006  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2007 };
2008 
2009 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2010 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2011 {
2013 };
2014 
2015 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2016 struct SubTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2017 {
2018  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
2019 };
2020 
2021 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2022 struct SubTrait< UniUpperMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2023 {
2025 };
2026 
2027 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2028 struct SubTrait< IdentityMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2029 {
2031 };
2032 
2033 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2034 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2035 {
2036  using Type = SubTrait_<MT1,MT2>;
2037 };
2038 
2039 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2040 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
2041 {
2042  using Type = SubTrait_<MT1,MT2>;
2043 };
2044 
2045 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2046 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2047 {
2048  using Type = SubTrait_<MT1,MT2>;
2049 };
2050 
2051 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2052 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2053 {
2054  using Type = SubTrait_<MT1,MT2>;
2055 };
2056 
2057 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2058 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2059 {
2060  using Type = SubTrait_<MT1,MT2>;
2061 };
2062 
2063 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2064 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2065 {
2066  using Type = SubTrait_<MT1,MT2>;
2067 };
2068 
2069 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2070 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2071 {
2072  using Type = SubTrait_<MT1,MT2>;
2073 };
2074 
2075 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2076 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2077 {
2078  using Type = SubTrait_<MT1,MT2>;
2079 };
2080 
2081 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2082 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
2083 {
2084  using Type = SubTrait_<MT1,MT2>;
2085 };
2086 
2087 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2088 struct SubTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2089 {
2090  using Type = SubTrait_<MT1,MT2>;
2091 };
2092 
2093 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2094 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
2095 {
2096  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
2097 };
2098 
2099 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2100 struct SubTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2101 {
2102  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
2103 };
2104 
2105 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2106 struct SubTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2107 {
2108  using Type = UpperMatrix< SubTrait_<MT1,MT2> >;
2109 };
2111 //*************************************************************************************************
2112 
2113 
2114 
2115 
2116 //=================================================================================================
2117 //
2118 // SCHURTRAIT SPECIALIZATIONS
2119 //
2120 //=================================================================================================
2121 
2122 //*************************************************************************************************
2124 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2125 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2126 {
2128 };
2129 
2130 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2131 struct SchurTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
2132 {
2134 };
2135 
2136 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2137 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2138 {
2140 };
2141 
2142 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2143 struct SchurTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
2144 {
2146 };
2147 
2148 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2149 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2150 {
2152 };
2153 
2154 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2155 struct SchurTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2156 {
2158 };
2159 
2160 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2161 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2162 {
2164 };
2165 
2166 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2167 struct SchurTrait< CustomMatrix<T,AF,PF,SO1>, UniUpperMatrix<MT,SO2,DF> >
2168 {
2170 };
2171 
2172 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2173 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2174 {
2176 };
2177 
2178 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2179 struct SchurTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2180 {
2182 };
2183 
2184 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2185 struct SchurTrait< UniUpperMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2186 {
2187  using Type = IdentityMatrix< MultTrait_< ElementType_<MT>, T >, SO2 >;
2188 };
2189 
2190 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2191 struct SchurTrait< IdentityMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2192 {
2194 };
2195 
2196 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2197 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2198 {
2199  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2200 };
2201 
2202 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2203 struct SchurTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
2204 {
2205  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2206 };
2207 
2208 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2209 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2210 {
2211  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2212 };
2213 
2214 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2215 struct SchurTrait< HermitianMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2216 {
2217  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2218 };
2219 
2220 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2221 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2222 {
2223  using Type = DiagonalMatrix< SchurTrait_<MT1,MT2> >;
2224 };
2225 
2226 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2227 struct SchurTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2228 {
2229  using Type = DiagonalMatrix< SchurTrait_<MT1,MT2> >;
2230 };
2231 
2232 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2233 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2234 {
2236 };
2237 
2238 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2239 struct SchurTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2240 {
2242 };
2243 
2244 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2245 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
2246 {
2247  using Type = DiagonalMatrix< SchurTrait_<MT1,MT2> >;
2248 };
2249 
2250 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2251 struct SchurTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2252 {
2253  using Type = DiagonalMatrix< SchurTrait_<MT1,MT2> >;
2254 };
2255 
2256 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2257 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
2258 {
2259  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2260 };
2261 
2262 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2263 struct SchurTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2264 {
2265  using Type = UpperMatrix< SchurTrait_<MT1,MT2> >;
2266 };
2267 
2268 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2269 struct SchurTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2270 {
2271  using Type = UniUpperMatrix< SchurTrait_<MT1,MT2> >;
2272 };
2274 //*************************************************************************************************
2275 
2276 
2277 
2278 
2279 //=================================================================================================
2280 //
2281 // MULTTRAIT SPECIALIZATIONS
2282 //
2283 //=================================================================================================
2284 
2285 //*************************************************************************************************
2287 template< typename MT, bool SO, bool DF, typename T >
2288 struct MultTrait< UniUpperMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
2289 {
2290  using Type = UpperMatrix< MultTrait_<MT,T> >;
2291 };
2292 
2293 template< typename T, typename MT, bool SO, bool DF >
2294 struct MultTrait< T, UniUpperMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
2295 {
2296  using Type = UpperMatrix< MultTrait_<T,MT> >;
2297 };
2298 
2299 template< typename MT, bool SO, bool DF, typename T, size_t N >
2300 struct MultTrait< UniUpperMatrix<MT,SO,DF>, StaticVector<T,N,false> >
2301 {
2303 };
2304 
2305 template< typename T, size_t N, typename MT, bool SO, bool DF >
2306 struct MultTrait< StaticVector<T,N,true>, UniUpperMatrix<MT,SO,DF> >
2307 {
2308  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
2309 };
2310 
2311 template< typename MT, bool SO, bool DF, typename T, size_t N >
2312 struct MultTrait< UniUpperMatrix<MT,SO,DF>, HybridVector<T,N,false> >
2313 {
2315 };
2316 
2317 template< typename T, size_t N, typename MT, bool SO, bool DF >
2318 struct MultTrait< HybridVector<T,N,true>, UniUpperMatrix<MT,SO,DF> >
2319 {
2320  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
2321 };
2322 
2323 template< typename MT, bool SO, bool DF, typename T >
2324 struct MultTrait< UniUpperMatrix<MT,SO,DF>, DynamicVector<T,false> >
2325 {
2327 };
2328 
2329 template< typename T, typename MT, bool SO, bool DF >
2330 struct MultTrait< DynamicVector<T,true>, UniUpperMatrix<MT,SO,DF> >
2331 {
2332  using Type = MultTrait_< DynamicVector<T,true>, MT >;
2333 };
2334 
2335 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
2336 struct MultTrait< UniUpperMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
2337 {
2339 };
2340 
2341 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
2342 struct MultTrait< CustomVector<T,AF,PF,true>, UniUpperMatrix<MT,SO,DF> >
2343 {
2344  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
2345 };
2346 
2347 template< typename MT, bool SO, bool DF, typename T >
2348 struct MultTrait< UniUpperMatrix<MT,SO,DF>, CompressedVector<T,false> >
2349 {
2351 };
2352 
2353 template< typename T, typename MT, bool SO, bool DF >
2354 struct MultTrait< CompressedVector<T,true>, UniUpperMatrix<MT,SO,DF> >
2355 {
2356  using Type = MultTrait_< CompressedVector<T,true>, MT >;
2357 };
2358 
2359 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2360 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2361 {
2363 };
2364 
2365 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2366 struct MultTrait< StaticMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
2367 {
2368  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
2369 };
2370 
2371 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2372 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2373 {
2375 };
2376 
2377 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2378 struct MultTrait< HybridMatrix<T,M,N,SO1>, UniUpperMatrix<MT,SO2,DF> >
2379 {
2380  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
2381 };
2382 
2383 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2384 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2385 {
2386  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
2387 };
2388 
2389 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2390 struct MultTrait< DynamicMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2391 {
2392  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
2393 };
2394 
2395 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2396 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2397 {
2399 };
2400 
2401 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2402 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, UniUpperMatrix<MT,SO2,DF> >
2403 {
2404  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2405 };
2406 
2407 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2408 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2409 {
2411 };
2412 
2413 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2414 struct MultTrait< CompressedMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2415 {
2416  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
2417 };
2418 
2419 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2420 struct MultTrait< UniUpperMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2421 {
2423 };
2424 
2425 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2426 struct MultTrait< IdentityMatrix<T,SO1>, UniUpperMatrix<MT,SO2,DF> >
2427 {
2429 };
2430 
2431 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2432 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2433 {
2434  using Type = MultTrait_<MT1,MT2>;
2435 };
2436 
2437 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2438 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniUpperMatrix<MT2,SO2,DF2> >
2439 {
2440  using Type = MultTrait_<MT1,MT2>;
2441 };
2442 
2443 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2444 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2445 {
2446  using Type = MultTrait_<MT1,MT2>;
2447 };
2448 
2449 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2450 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2451 {
2452  using Type = MultTrait_<MT1,MT2>;
2453 };
2454 
2455 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2456 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2457 {
2458  using Type = MultTrait_<MT1,MT2>;
2459 };
2460 
2461 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2462 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2463 {
2464  using Type = MultTrait_<MT1,MT2>;
2465 };
2466 
2467 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2468 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2469 {
2470  using Type = MultTrait_<MT1,MT2>;
2471 };
2472 
2473 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2474 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2475 {
2476  using Type = MultTrait_<MT1,MT2>;
2477 };
2478 
2479 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2480 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, StrictlyLowerMatrix<MT2,SO2,DF2> >
2481 {
2482  using Type = MultTrait_<MT1,MT2>;
2483 };
2484 
2485 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2486 struct MultTrait< StrictlyLowerMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2487 {
2488  using Type = MultTrait_<MT1,MT2>;
2489 };
2490 
2491 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2492 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2> >
2493 {
2494  using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
2495 };
2496 
2497 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2498 struct MultTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2499 {
2500  using Type = UpperMatrix< MultTrait_<MT1,MT2> >;
2501 };
2502 
2503 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2504 struct MultTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2505 {
2506  using Type = UniUpperMatrix< MultTrait_<MT1,MT2> >;
2507 };
2509 //*************************************************************************************************
2510 
2511 
2512 
2513 
2514 //=================================================================================================
2515 //
2516 // DIVTRAIT SPECIALIZATIONS
2517 //
2518 //=================================================================================================
2519 
2520 //*************************************************************************************************
2522 template< typename MT, bool SO, bool DF, typename T >
2523 struct DivTrait< UniUpperMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
2524 {
2525  using Type = UpperMatrix< DivTrait_<MT,T> >;
2526 };
2528 //*************************************************************************************************
2529 
2530 
2531 
2532 
2533 //=================================================================================================
2534 //
2535 // UNARYMAPTRAIT SPECIALIZATIONS
2536 //
2537 //=================================================================================================
2538 
2539 //*************************************************************************************************
2541 template< typename MT, bool SO, bool DF >
2542 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Abs >
2543 {
2545 };
2546 
2547 template< typename MT, bool SO, bool DF >
2548 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Floor >
2549 {
2551 };
2552 
2553 template< typename MT, bool SO, bool DF >
2554 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Ceil >
2555 {
2557 };
2558 
2559 template< typename MT, bool SO, bool DF >
2560 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Trunc >
2561 {
2563 };
2564 
2565 template< typename MT, bool SO, bool DF >
2566 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Round >
2567 {
2569 };
2570 
2571 template< typename MT, bool SO, bool DF >
2572 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Conj >
2573 {
2575 };
2576 
2577 template< typename MT, bool SO, bool DF >
2578 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Real >
2579 {
2581 };
2582 
2583 template< typename MT, bool SO, bool DF >
2584 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Sqrt >
2585 {
2587 };
2588 
2589 template< typename MT, bool SO, bool DF >
2590 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Cbrt >
2591 {
2593 };
2594 
2595 template< typename MT, bool SO, bool DF, typename ET >
2596 struct UnaryMapTrait< UniUpperMatrix<MT,SO,DF>, Pow<ET> >
2597 {
2599 };
2601 //*************************************************************************************************
2602 
2603 
2604 
2605 
2606 //=================================================================================================
2607 //
2608 // BINARYMAPTRAIT SPECIALIZATIONS
2609 //
2610 //=================================================================================================
2611 
2612 //*************************************************************************************************
2614 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2615 struct BinaryMapTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2>, Min >
2616 {
2618 };
2619 
2620 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2621 struct BinaryMapTrait< UniUpperMatrix<MT1,SO1,DF1>, UpperMatrix<MT2,SO2,DF2>, Max >
2622 {
2624 };
2625 
2626 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2627 struct BinaryMapTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2>, Min >
2628 {
2630 };
2631 
2632 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2633 struct BinaryMapTrait< UpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2>, Max >
2634 {
2636 };
2637 
2638 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2639 struct BinaryMapTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2>, Min >
2640 {
2642 };
2643 
2644 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2645 struct BinaryMapTrait< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2>, Max >
2646 {
2648 };
2650 //*************************************************************************************************
2651 
2652 
2653 
2654 
2655 //=================================================================================================
2656 //
2657 // DECLSYMTRAIT SPECIALIZATIONS
2658 //
2659 //=================================================================================================
2660 
2661 //*************************************************************************************************
2663 template< typename MT, bool SO, bool DF >
2664 struct DeclSymTrait< UniUpperMatrix<MT,SO,DF> >
2665 {
2666  using Type = IdentityMatrix< ElementType_<MT>, SO >;
2667 };
2669 //*************************************************************************************************
2670 
2671 
2672 
2673 
2674 //=================================================================================================
2675 //
2676 // DECLHERMTRAIT SPECIALIZATIONS
2677 //
2678 //=================================================================================================
2679 
2680 //*************************************************************************************************
2682 template< typename MT, bool SO, bool DF >
2683 struct DeclHermTrait< UniUpperMatrix<MT,SO,DF> >
2684 {
2685  using Type = IdentityMatrix< ElementType_<MT>, SO >;
2686 };
2688 //*************************************************************************************************
2689 
2690 
2691 
2692 
2693 //=================================================================================================
2694 //
2695 // DECLLOWTRAIT SPECIALIZATIONS
2696 //
2697 //=================================================================================================
2698 
2699 //*************************************************************************************************
2701 template< typename MT, bool SO, bool DF >
2702 struct DeclLowTrait< UniUpperMatrix<MT,SO,DF> >
2703 {
2704  using Type = IdentityMatrix< ElementType_<MT>, SO >;
2705 };
2707 //*************************************************************************************************
2708 
2709 
2710 
2711 
2712 //=================================================================================================
2713 //
2714 // DECLUPPTRAIT SPECIALIZATIONS
2715 //
2716 //=================================================================================================
2717 
2718 //*************************************************************************************************
2720 template< typename MT, bool SO, bool DF >
2721 struct DeclUppTrait< UniUpperMatrix<MT,SO,DF> >
2722 {
2723  using Type = UniUpperMatrix<MT,SO,DF>;
2724 };
2726 //*************************************************************************************************
2727 
2728 
2729 
2730 
2731 //=================================================================================================
2732 //
2733 // DECLDIAGTRAIT SPECIALIZATIONS
2734 //
2735 //=================================================================================================
2736 
2737 //*************************************************************************************************
2739 template< typename MT, bool SO, bool DF >
2740 struct DeclDiagTrait< UniUpperMatrix<MT,SO,DF> >
2741 {
2742  using Type = IdentityMatrix< ElementType_<MT>, SO >;
2743 };
2745 //*************************************************************************************************
2746 
2747 
2748 
2749 
2750 //=================================================================================================
2751 //
2752 // HIGHTYPE SPECIALIZATIONS
2753 //
2754 //=================================================================================================
2755 
2756 //*************************************************************************************************
2758 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2759 struct HighType< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2760 {
2762 };
2764 //*************************************************************************************************
2765 
2766 
2767 
2768 
2769 //=================================================================================================
2770 //
2771 // LOWTYPE SPECIALIZATIONS
2772 //
2773 //=================================================================================================
2774 
2775 //*************************************************************************************************
2777 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2778 struct LowType< UniUpperMatrix<MT1,SO1,DF1>, UniUpperMatrix<MT2,SO2,DF2> >
2779 {
2781 };
2783 //*************************************************************************************************
2784 
2785 
2786 
2787 
2788 //=================================================================================================
2789 //
2790 // SUBMATRIXTRAIT SPECIALIZATIONS
2791 //
2792 //=================================================================================================
2793 
2794 //*************************************************************************************************
2796 template< typename MT, bool SO, bool DF >
2797 struct SubmatrixTrait< UniUpperMatrix<MT,SO,DF> >
2798 {
2799  using Type = SubmatrixTrait_<MT>;
2800 };
2802 //*************************************************************************************************
2803 
2804 
2805 
2806 
2807 //=================================================================================================
2808 //
2809 // ROWTRAIT SPECIALIZATIONS
2810 //
2811 //=================================================================================================
2812 
2813 //*************************************************************************************************
2815 template< typename MT, bool SO, bool DF >
2816 struct RowTrait< UniUpperMatrix<MT,SO,DF> >
2817 {
2818  using Type = RowTrait_<MT>;
2819 };
2821 //*************************************************************************************************
2822 
2823 
2824 
2825 
2826 //=================================================================================================
2827 //
2828 // COLUMNTRAIT SPECIALIZATIONS
2829 //
2830 //=================================================================================================
2831 
2832 //*************************************************************************************************
2834 template< typename MT, bool SO, bool DF >
2835 struct ColumnTrait< UniUpperMatrix<MT,SO,DF> >
2836 {
2837  using Type = ColumnTrait_<MT>;
2838 };
2840 //*************************************************************************************************
2841 
2842 } // namespace blaze
2843 
2844 #endif
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Header file for the decldiag trait.
Header file for the Schur product trait.
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the IsUniUpper type trait.
Header file for the subtraction trait.
Flag for the inversion of a diagonal matrix.
Definition: InversionFlag.h:115
Flag for the inversion of a general matrix (same as byLU).
Definition: InversionFlag.h:108
Header file for the row trait.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:128
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:127
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
typename RowTrait< MT >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:162
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:265
Base template for the DeclUppTrait class.
Definition: DeclUppTrait.h:133
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Header file for the dense matrix inversion flags.
Base template for the SchurTrait class.
Definition: SchurTrait.h:124
UniUpperMatrix specialization for sparse matrices.
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:198
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:560
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UNITRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper unitriangular matrix ty...
Definition: UniTriangular.h:81
typename MultTrait< T1, T2 >::Type MultTrait_
Auxiliary alias declaration for the MultTrait class template.The MultTrait_ alias declaration provide...
Definition: MultTrait.h:250
Column< MT > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:124
Constraint on the data type.
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1686
Constraint on the data type.
Compile time check for data types with restricted data access.This type trait tests whether the given...
Definition: IsRestricted.h:82
Header file for the IsSquare type trait.
Row< MT > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:124
Compile time check for the alignment of data types.This type trait tests whether the given data type ...
Definition: IsAligned.h:87
void invert(const HermitianProxy< MT > &proxy)
In-place inversion of the represented element.
Definition: HermitianProxy.h:772
Base template for the RowTrait class.
Definition: RowTrait.h:127
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Flag for the inversion of a upper triangular matrix.
Definition: InversionFlag.h:113
Constraint on the data type.
Efficient implementation of an identity matrix.The IdentityMatrix class template is the representati...
Definition: Forward.h:49
Header file for the LowType type trait.
Flag for the inversion of a lower triangular matrix.
Definition: InversionFlag.h:111
Base template for the HighType type trait.
Definition: HighType.h:133
Header file for the multiplication trait.
Header file for the unary map trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Matrix adapter for strictly upper triangular matrices.
Definition: BaseTemplate.h:558
Header file for the IsShrinkable type trait.
Header file for all forward declarations of the math module.
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
Header file for the decllow trait.
void lu(const DenseMatrix< MT1, SO1 > &A, DenseMatrix< MT2, SO1 > &L, DenseMatrix< MT3, SO1 > &U, Matrix< MT4, SO2 > &P)
LU decomposition of the given dense matrix.
Definition: LU.h:219
Header file for the Columns type trait.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
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:340
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:134
#define BLAZE_CONSTRAINT_MUST_NOT_BE_UPPER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a upper triangular matrix type...
Definition: Upper.h:81
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:548
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:264
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Matrix adapter for upper triangular matrices.
Definition: BaseTemplate.h:553
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:580
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Header file for the isOne shim.
Compile time check for shrinkable data types.This type trait tests whether the given data type is a s...
Definition: IsShrinkable.h:75
Constraint on the data type.
Header file for the IsNumeric type trait.
Base template for the LowType type trait.
Definition: LowType.h:133
Header file for the HasConstDataAccess type trait.
Compile time check for resizable data types.This type trait tests whether the given data type is a re...
Definition: IsResizable.h:75
Header file for the declupp trait.
Matrix adapter for upper unitriangular matrices.
Definition: BaseTemplate.h:576
#define BLAZE_CONSTRAINT_MUST_NOT_BE_SYMMETRIC_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a symmetric matrix type, a compilation error is created.
Definition: Symmetric.h:79
Header file for the binary map trait.
Header file for run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:139
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:134
Base template for the MultTrait class.
Definition: MultTrait.h:139
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_LOWER_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower triangular matrix type...
Definition: Lower.h:81
Header file for the declsym trait.
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:662
Header file for the column trait.
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:270
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:101
#define BLAZE_CONSTRAINT_MUST_BE_BLAS_COMPATIBLE_TYPE(T)
Constraint on the data type.In case the given data type T is not a BLAS compatible data type (i...
Definition: BLASCompatible.h:61
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_NOT_REQUIRE_EVALUATION(T)
Constraint on the data type.In case the given data type T requires an intermediate evaluation within ...
Definition: RequiresEvaluation.h:81
typename SubmatrixTrait< MT >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:163
Base template for the DivTrait class.
Definition: DivTrait.h:139
typename ColumnTrait< MT >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:162
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:324
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:133
Removal of top level adaptor types.In case the given type is an adaptor type (SymmetricMatrix, LowerMatrix, UpperMatrix, ...), the RemoveAdaptor type trait removes the adaptor and extracts the contained general matrix type. Else the given type is returned as is. Note that cv-qualifiers are preserved.
Definition: RemoveAdaptor.h:76
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:177
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:250
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
UniUpperMatrix specialization for dense matrices.
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:75
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:252
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:75
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
#define BLAZE_CONSTRAINT_MUST_NOT_BE_HERMITIAN_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is an Hermitian matrix type, a compilation error is created.
Definition: Hermitian.h:79
Base template for the SubTrait class.
Definition: SubTrait.h:139
Matrix adapter for diagonal matrices.
Definition: BaseTemplate.h:560
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:133
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:119
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:117
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:250
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the 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.