UniLowerMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_H_
36 #define _BLAZE_MATH_ADAPTORS_UNILOWERMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
56 #include <blaze/math/Forward.h>
57 #include <blaze/math/Functions.h>
60 #include <blaze/math/shims/IsOne.h>
83 #include <blaze/util/Assert.h>
84 #include <blaze/util/EnableIf.h>
86 #include <blaze/util/TrueType.h>
88 #include <blaze/util/Unused.h>
89 
90 
91 namespace blaze {
92 
93 //=================================================================================================
94 //
95 // UNILOWERMATRIX OPERATORS
96 //
97 //=================================================================================================
98 
99 //*************************************************************************************************
102 template< typename MT, bool SO, bool DF >
103 inline void reset( UniLowerMatrix<MT,SO,DF>& m );
104 
105 template< typename MT, bool SO, bool DF >
106 inline void reset( UniLowerMatrix<MT,SO,DF>& m, size_t i );
107 
108 template< typename MT, bool SO, bool DF >
109 inline void clear( UniLowerMatrix<MT,SO,DF>& m );
110 
111 template< bool RF, typename MT, bool SO, bool DF >
112 inline bool isDefault( const UniLowerMatrix<MT,SO,DF>& m );
113 
114 template< typename MT, bool SO, bool DF >
115 inline bool isIntact( const UniLowerMatrix<MT,SO,DF>& m );
116 
117 template< typename MT, bool SO, bool DF >
118 inline void swap( UniLowerMatrix<MT,SO,DF>& a, UniLowerMatrix<MT,SO,DF>& b ) noexcept;
120 //*************************************************************************************************
121 
122 
123 //*************************************************************************************************
130 template< typename MT // Type of the adapted matrix
131  , bool SO // Storage order of the adapted matrix
132  , bool DF > // Density flag
134 {
135  m.reset();
136 }
137 //*************************************************************************************************
138 
139 
140 //*************************************************************************************************
153 template< typename MT // Type of the adapted matrix
154  , bool SO // Storage order of the adapted matrix
155  , bool DF > // Density flag
156 inline void reset( UniLowerMatrix<MT,SO,DF>& m, size_t i )
157 {
158  m.reset( i );
159 }
160 //*************************************************************************************************
161 
162 
163 //*************************************************************************************************
170 template< typename MT // Type of the adapted matrix
171  , bool SO // Storage order of the adapted matrix
172  , bool DF > // Density flag
174 {
175  m.clear();
176 }
177 //*************************************************************************************************
178 
179 
180 //*************************************************************************************************
190 template< bool RF // Relaxation flag
191  , typename MT // Type of the adapted matrix
192  , bool SO // Storage order of the adapted matrix
193  , bool DF > // Density flag
194 inline bool isDefault_backend( const UniLowerMatrix<MT,SO,DF>& m, TrueType )
195 {
196  return ( m.rows() == 0UL );
197 }
199 //*************************************************************************************************
200 
201 
202 //*************************************************************************************************
212 template< bool RF // Relaxation flag
213  , typename MT // Type of the adapted matrix
214  , bool SO // Storage order of the adapted matrix
215  , bool DF > // Density flag
216 inline bool isDefault_backend( const UniLowerMatrix<MT,SO,DF>& m, FalseType )
217 {
218  return isIdentity<RF>( m );
219 }
221 //*************************************************************************************************
222 
223 
224 //*************************************************************************************************
250 template< bool RF // Relaxation flag
251  , typename MT // Type of the adapted matrix
252  , bool SO // Storage order of the adapted matrix
253  , bool DF > // Density flag
254 inline bool isDefault( const UniLowerMatrix<MT,SO,DF>& m )
255 {
256  return isDefault_backend<RF>( m, typename IsResizable<MT>::Type() );
257 }
258 //*************************************************************************************************
259 
260 
261 //*************************************************************************************************
282 template< typename MT // Type of the adapted matrix
283  , bool SO // Storage order of the adapted matrix
284  , bool DF > // Density flag
285 inline bool isIntact( const UniLowerMatrix<MT,SO,DF>& m )
286 {
287  return m.isIntact();
288 }
289 //*************************************************************************************************
290 
291 
292 //*************************************************************************************************
300 template< typename MT // Type of the adapted matrix
301  , bool SO // Storage order of the adapted matrix
302  , bool DF > // Density flag
304 {
305  a.swap( b );
306 }
307 //*************************************************************************************************
308 
309 
310 //*************************************************************************************************
333 template< InversionFlag IF // Inversion algorithm
334  , typename MT // Type of the dense matrix
335  , bool SO > // Storage order of the dense matrix
336 inline void invert( UniLowerMatrix<MT,SO,true>& m )
337 {
339 
340  if( IF == asUpper || IF == asUniUpper ) {
341  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
342  return;
343  }
344 
345  constexpr InversionFlag flag( ( IF == byLU || IF == asGeneral || IF == asLower || IF == asUniLower )
346  ? ( asUniLower )
347  : ( asDiagonal ) );
348 
349  invert<flag>( derestrict( m ) );
350 
351  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
352 }
354 //*************************************************************************************************
355 
356 
357 //*************************************************************************************************
376 template< typename MT1, bool SO1, typename MT2, typename MT3, typename MT4, bool SO2 >
377 inline void lu( const UniLowerMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
379 {
381 
386 
391 
392  typedef ElementType_<MT3> ET3;
393  typedef ElementType_<MT4> ET4;
394 
395  const size_t n( (~A).rows() );
396 
397  DerestrictTrait_<MT3> U2( derestrict( ~U ) );
398 
399  (~L) = A;
400 
401  resize( ~U, n, n );
402  reset( U2 );
403 
404  resize( ~P, n, n );
405  reset( ~P );
406 
407  for( size_t i=0UL; i<n; ++i ) {
408  U2(i,i) = ET3(1);
409  (~P)(i,i) = ET4(1);
410  }
411 }
413 //*************************************************************************************************
414 
415 
416 //*************************************************************************************************
432 template< typename MT // Type of the adapted matrix
433  , bool SO // Storage order of the adapted matrix
434  , bool DF // Density flag
435  , typename VT > // Type of the right-hand side dense vector
436 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
437  const DenseVector<VT,false>& rhs, size_t row, size_t column )
438 {
440 
441  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
442  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
443  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
444 
445  UNUSED_PARAMETER( lhs );
446 
447  if( column < row )
448  return true;
449 
450  const bool containsDiagonal( column < row + (~rhs).size() );
451  const size_t iend( min( column - row, (~rhs).size() ) );
452 
453  for( size_t i=0UL; i<iend; ++i ) {
454  if( !isDefault( (~rhs)[i] ) )
455  return false;
456  }
457 
458  if( containsDiagonal && !isOne( (~rhs)[iend] ) )
459  return false;
460 
461  return true;
462 }
464 //*************************************************************************************************
465 
466 
467 //*************************************************************************************************
483 template< typename MT // Type of the adapted matrix
484  , bool SO // Storage order of the adapted matrix
485  , bool DF // Density flag
486  , typename VT > // Type of the right-hand side dense vector
487 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
488  const DenseVector<VT,true>& rhs, size_t row, size_t column )
489 {
491 
492  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
493  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
494  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
495 
496  UNUSED_PARAMETER( lhs );
497 
498  if( row >= column + (~rhs).size() )
499  return true;
500 
501  const bool containsDiagonal( row >= column );
502  const size_t ibegin( ( !containsDiagonal )?( 0UL ):( row - column + 1UL ) );
503 
504  if( containsDiagonal && !isOne( (~rhs)[row-column] ) )
505  return false;
506 
507  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
508  if( !isDefault( (~rhs)[i] ) )
509  return false;
510  }
511 
512  return true;
513 }
515 //*************************************************************************************************
516 
517 
518 //*************************************************************************************************
534 template< typename MT // Type of the adapted matrix
535  , bool SO // Storage order of the adapted matrix
536  , bool DF // Density flag
537  , typename VT > // Type of the right-hand side sparse vector
538 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
539  const SparseVector<VT,false>& rhs, size_t row, size_t column )
540 {
542 
543  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
544  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
545  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
546 
547  UNUSED_PARAMETER( lhs );
548 
549  typedef typename VT::ConstIterator RhsIterator;
550 
551  if( column < row )
552  return true;
553 
554  const bool containsDiagonal( column < row + (~rhs).size() );
555  const size_t index( column - row );
556  const RhsIterator last( (~rhs).lowerBound( index ) );
557 
558  if( containsDiagonal ) {
559  if( last == (~rhs).end() || last->index() != index || !isOne( last->value() ) )
560  return false;
561  }
562 
563  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
564  if( !isDefault( element->value() ) )
565  return false;
566  }
567 
568  return true;
569 }
571 //*************************************************************************************************
572 
573 
574 //*************************************************************************************************
590 template< typename MT // Type of the adapted matrix
591  , bool SO // Storage order of the adapted matrix
592  , bool DF // Density flag
593  , typename VT > // Type of the right-hand side sparse vector
594 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
595  const SparseVector<VT,true>& rhs, size_t row, size_t column )
596 {
598 
599  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
600  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
601  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
602 
603  UNUSED_PARAMETER( lhs );
604 
605  typedef typename VT::ConstIterator RhsIterator;
606 
607  if( row >= column + (~rhs).size() )
608  return true;
609 
610  const bool containsDiagonal( row >= column );
611  const size_t index( ( containsDiagonal )?( row - column ):( 0UL ) );
612  const RhsIterator last( (~rhs).end() );
613  RhsIterator element( (~rhs).lowerBound( index ) );
614 
615  if( containsDiagonal ) {
616  if( element == last || element->index() != index || !isOne( element->value() ) )
617  return false;
618  ++element;
619  }
620 
621  for( ; element!=last; ++element ) {
622  if( !isDefault( element->value() ) )
623  return false;
624  }
625 
626  return true;
627 }
629 //*************************************************************************************************
630 
631 
632 //*************************************************************************************************
648 template< typename MT1 // Type of the adapted matrix
649  , bool SO // Storage order of the adapted matrix
650  , bool DF // Density flag
651  , typename MT2 > // Type of the right-hand side dense matrix
652 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
653  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
654 {
656 
657  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
658  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
659  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
660  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
661 
662  UNUSED_PARAMETER( lhs );
663 
664  const size_t M( (~rhs).rows() );
665  const size_t N( (~rhs).columns() );
666 
667  if( row + 1UL >= column + N )
668  return true;
669 
670  const size_t iend( min( column + N - row, M ) );
671 
672  for( size_t i=0UL; i<iend; ++i )
673  {
674  const bool containsDiagonal( row + i >= column );
675 
676  if( containsDiagonal && !isOne( (~rhs)(i,row+i-column) ) )
677  return false;
678 
679  const size_t jbegin( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
680 
681  for( size_t j=jbegin; j<N; ++j ) {
682  if( !isDefault( (~rhs)(i,j) ) )
683  return false;
684  }
685  }
686 
687  return true;
688 }
690 //*************************************************************************************************
691 
692 
693 //*************************************************************************************************
709 template< typename MT1 // Type of the adapted matrix
710  , bool SO // Storage order of the adapted matrix
711  , bool DF // Density flag
712  , typename MT2 > // Type of the right-hand side dense matrix
713 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
714  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
715 {
717 
718  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
719  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
720  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
721  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
722 
723  UNUSED_PARAMETER( lhs );
724 
725  const size_t M( (~rhs).rows() );
726  const size_t N( (~rhs).columns() );
727 
728  if( row + 1UL >= column + N )
729  return true;
730 
731  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
732 
733  for( size_t j=jbegin; j<N; ++j )
734  {
735  const size_t iend( min( column + j - row, M ) );
736 
737  for( size_t i=0UL; i<iend; ++i ) {
738  if( !isDefault( (~rhs)(i,j) ) )
739  return false;
740  }
741 
742  const bool containsDiagonal( column + j < row + M );
743 
744  if( containsDiagonal && !isOne( (~rhs)(iend,j) ) )
745  return false;
746  }
747 
748  return true;
749 }
751 //*************************************************************************************************
752 
753 
754 //*************************************************************************************************
770 template< typename MT1 // Type of the adapted matrix
771  , bool SO // Storage order of the adapted matrix
772  , bool DF // Density flag
773  , typename MT2 > // Type of the right-hand side sparse matrix
774 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
775  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
776 {
778 
779  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
780  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
781  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
782  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
783 
784  UNUSED_PARAMETER( lhs );
785 
786  typedef typename MT2::ConstIterator RhsIterator;
787 
788  const size_t M( (~rhs).rows() );
789  const size_t N( (~rhs).columns() );
790 
791  if( row + 1UL >= column + N )
792  return true;
793 
794  const size_t iend( min( column + N - row, M ) );
795 
796  for( size_t i=0UL; i<iend; ++i )
797  {
798  const bool containsDiagonal( row + i >= column );
799  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
800 
801  const RhsIterator last( (~rhs).end(i) );
802  RhsIterator element( (~rhs).lowerBound( i, index ) );
803 
804  if( containsDiagonal ) {
805  if( element == last || ( element->index() != index ) || !isOne( element->value() ) )
806  return false;
807  ++element;
808  }
809 
810  for( ; element!=last; ++element ) {
811  if( !isDefault( element->value() ) )
812  return false;
813  }
814  }
815 
816  return true;
817 }
819 //*************************************************************************************************
820 
821 
822 //*************************************************************************************************
838 template< typename MT1 // Type of the adapted matrix
839  , bool SO // Storage order of the adapted matrix
840  , bool DF // Density flag
841  , typename MT2 > // Type of the right-hand side sparse matrix
842 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
843  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
844 {
846 
847  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
848  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
849  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
850  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
851 
852  UNUSED_PARAMETER( lhs );
853 
854  typedef typename MT2::ConstIterator RhsIterator;
855 
856  const size_t M( (~rhs).rows() );
857  const size_t N( (~rhs).columns() );
858 
859  if( row + 1UL >= column + N )
860  return true;
861 
862  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
863 
864  for( size_t j=jbegin; j<N; ++j )
865  {
866  const bool containsDiagonal( column + j < row + M );
867 
868  const size_t index( column + j - row );
869  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
870 
871  if( containsDiagonal ) {
872  if( last == (~rhs).end(j) || ( last->index() != index ) || !isOne( last->value() ) )
873  return false;
874  }
875 
876  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
877  if( !isDefault( element->value() ) )
878  return false;
879  }
880  }
881 
882  return true;
883 }
885 //*************************************************************************************************
886 
887 
888 //*************************************************************************************************
905 template< typename MT // Type of the adapted matrix
906  , bool SO // Storage order of the adapted matrix
907  , bool DF // Density flag
908  , typename VT > // Type of the right-hand side dense vector
909 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
910  const DenseVector<VT,false>& rhs, size_t row, size_t column )
911 {
913 
914  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
915  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
916  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
917 
918  UNUSED_PARAMETER( lhs );
919 
920  if( column < row )
921  return true;
922 
923  const size_t iend( min( column - row + 1UL, (~rhs).size() ) );
924 
925  for( size_t i=0UL; i<iend; ++i ) {
926  if( !isDefault( (~rhs)[i] ) )
927  return false;
928  }
929 
930  return true;
931 }
933 //*************************************************************************************************
934 
935 
936 //*************************************************************************************************
953 template< typename MT // Type of the adapted matrix
954  , bool SO // Storage order of the adapted matrix
955  , bool DF // Density flag
956  , typename VT > // Type of the right-hand side dense vector
957 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
958  const DenseVector<VT,true>& rhs, size_t row, size_t column )
959 {
961 
962  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
963  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
964  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
965 
966  UNUSED_PARAMETER( lhs );
967 
968  const size_t ibegin( ( row <= column )?( 0UL ):( row - column ) );
969 
970  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
971  if( !isDefault( (~rhs)[i] ) )
972  return false;
973  }
974 
975  return true;
976 }
978 //*************************************************************************************************
979 
980 
981 //*************************************************************************************************
998 template< typename MT // Type of the adapted matrix
999  , bool SO // Storage order of the adapted matrix
1000  , bool DF // Density flag
1001  , typename VT > // Type of the right-hand side sparse vector
1002 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1003  const SparseVector<VT,false>& rhs, size_t row, size_t column )
1004 {
1006 
1007  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1008  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1009  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
1010 
1011  UNUSED_PARAMETER( lhs );
1012 
1013  typedef typename VT::ConstIterator RhsIterator;
1014 
1015  if( column < row )
1016  return true;
1017 
1018  const RhsIterator last( (~rhs).lowerBound( column - row + 1UL ) );
1019 
1020  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
1021  if( !isDefault( element->value() ) )
1022  return false;
1023  }
1024 
1025  return true;
1026 }
1028 //*************************************************************************************************
1029 
1030 
1031 //*************************************************************************************************
1048 template< typename MT // Type of the adapted matrix
1049  , bool SO // Storage order of the adapted matrix
1050  , bool DF // Density flag
1051  , typename VT > // Type of the right-hand side sparse vector
1052 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1053  const SparseVector<VT,true>& rhs, size_t row, size_t column )
1054 {
1056 
1057  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1058  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1059  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
1060 
1061  UNUSED_PARAMETER( lhs );
1062 
1063  typedef typename VT::ConstIterator RhsIterator;
1064 
1065  const RhsIterator last( (~rhs).end() );
1066  RhsIterator element( (~rhs).lowerBound( ( row <= column )?( 0UL ):( row - column ) ) );
1067 
1068  for( ; element!=last; ++element ) {
1069  if( !isDefault( element->value() ) )
1070  return false;
1071  }
1072 
1073  return true;
1074 }
1076 //*************************************************************************************************
1077 
1078 
1079 //*************************************************************************************************
1096 template< typename MT1 // Type of the adapted matrix
1097  , bool SO // Storage order of the adapted matrix
1098  , bool DF // Density flag
1099  , typename MT2 > // Type of the right-hand side dense matrix
1100 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1101  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
1102 {
1104 
1105  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1106  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1107  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1108  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1109 
1110  UNUSED_PARAMETER( lhs );
1111 
1112  const size_t M( (~rhs).rows() );
1113  const size_t N( (~rhs).columns() );
1114 
1115  if( row + 1UL >= column + N )
1116  return true;
1117 
1118  const size_t iend( min( column + N - row, M ) );
1119 
1120  for( size_t i=0UL; i<iend; ++i )
1121  {
1122  const bool containsDiagonal( row + i >= column );
1123  const size_t jbegin( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1124 
1125  for( size_t j=jbegin; j<N; ++j ) {
1126  if( !isDefault( (~rhs)(i,j) ) )
1127  return false;
1128  }
1129  }
1130 
1131  return true;
1132 }
1134 //*************************************************************************************************
1135 
1136 
1137 //*************************************************************************************************
1154 template< typename MT1 // Type of the adapted matrix
1155  , bool SO // Storage order of the adapted matrix
1156  , bool DF // Density flag
1157  , typename MT2 > // Type of the right-hand side dense matrix
1158 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1159  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
1160 {
1162 
1163  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1164  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1165  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1166  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1167 
1168  UNUSED_PARAMETER( lhs );
1169 
1170  const size_t M( (~rhs).rows() );
1171  const size_t N( (~rhs).columns() );
1172 
1173  if( row + 1UL >= column + N )
1174  return true;
1175 
1176  const size_t jbegin( ( row <= column )?( 0UL ):( row - column ) );
1177 
1178  for( size_t j=jbegin; j<N; ++j )
1179  {
1180  const size_t iend( min( column + j - row + 1UL, M ) );
1181 
1182  for( size_t i=0UL; i<iend; ++i ) {
1183  if( !isDefault( (~rhs)(i,j) ) )
1184  return false;
1185  }
1186  }
1187 
1188  return true;
1189 }
1191 //*************************************************************************************************
1192 
1193 
1194 //*************************************************************************************************
1211 template< typename MT1 // Type of the adapted matrix
1212  , bool SO // Storage order of the adapted matrix
1213  , bool DF // Density flag
1214  , typename MT2 > // Type of the right-hand side sparse matrix
1215 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1216  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
1217 {
1219 
1220  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1221  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1222  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1223  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1224 
1225  UNUSED_PARAMETER( lhs );
1226 
1227  typedef typename MT2::ConstIterator RhsIterator;
1228 
1229  const size_t M( (~rhs).rows() );
1230  const size_t N( (~rhs).columns() );
1231 
1232  if( row + 1UL >= column + N )
1233  return true;
1234 
1235  const size_t iend( min( column + N - row, M ) );
1236 
1237  for( size_t i=0UL; i<iend; ++i )
1238  {
1239  const bool containsDiagonal( row + i >= column );
1240  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1241 
1242  const RhsIterator last( (~rhs).end(i) );
1243  RhsIterator element( (~rhs).lowerBound( i, index ) );
1244 
1245  for( ; element!=last; ++element ) {
1246  if( !isDefault( element->value() ) )
1247  return false;
1248  }
1249  }
1250 
1251  return true;
1252 }
1254 //*************************************************************************************************
1255 
1256 
1257 //*************************************************************************************************
1274 template< typename MT1 // Type of the adapted matrix
1275  , bool SO // Storage order of the adapted matrix
1276  , bool DF // Density flag
1277  , typename MT2 > // Type of the right-hand side sparse matrix
1278 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1279  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
1280 {
1282 
1283  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1284  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1285  BLAZE_INTERNAL_ASSERT( (~rhs).rows() <= lhs.rows() - row, "Invalid number of rows" );
1286  BLAZE_INTERNAL_ASSERT( (~rhs).columns() <= lhs.columns() - column, "Invalid number of columns" );
1287 
1288  UNUSED_PARAMETER( lhs );
1289 
1290  typedef typename MT2::ConstIterator RhsIterator;
1291 
1292  const size_t M( (~rhs).rows() );
1293  const size_t N( (~rhs).columns() );
1294 
1295  if( row + 1UL >= column + N )
1296  return true;
1297 
1298  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
1299 
1300  for( size_t j=jbegin; j<N; ++j )
1301  {
1302  const size_t index( column + j - row + 1UL );
1303  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
1304 
1305  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
1306  if( !isDefault( element->value() ) )
1307  return false;
1308  }
1309  }
1310 
1311  return true;
1312 }
1314 //*************************************************************************************************
1315 
1316 
1317 //*************************************************************************************************
1334 template< typename MT // Type of the adapted matrix
1335  , bool SO // Storage order of the adapted matrix
1336  , bool DF // Density flag
1337  , typename VT // Type of the right-hand side vector
1338  , bool TF > // Transpose flag of the right-hand side vector
1339 inline bool trySubAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1340  const Vector<VT,TF>& rhs, size_t row, size_t column )
1341 {
1342  return tryAddAssign( lhs, ~rhs, row, column );
1343 }
1345 //*************************************************************************************************
1346 
1347 
1348 //*************************************************************************************************
1365 template< typename MT1 // Type of the adapted matrix
1366  , bool SO1 // Storage order of the adapted matrix
1367  , bool DF // Density flag
1368  , typename MT2 // Type of the right-hand side matrix
1369  , bool SO2 > // Storage order of the right-hand side matrix
1370 inline bool trySubAssign( const UniLowerMatrix<MT1,SO1,DF>& lhs,
1371  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1372 {
1373  return tryAddAssign( lhs, ~rhs, row, column );
1374 }
1376 //*************************************************************************************************
1377 
1378 
1379 //*************************************************************************************************
1396 template< typename MT // Type of the adapted matrix
1397  , bool SO // Storage order of the adapted matrix
1398  , bool DF // Density flag
1399  , typename VT > // Type of the right-hand side vector
1400 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1401  const Vector<VT,false>& rhs, size_t row, size_t column )
1402 {
1404 
1405  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1406  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1407  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.rows() - row, "Invalid number of rows" );
1408 
1409  UNUSED_PARAMETER( lhs );
1410 
1411  return ( column < row || (~rhs).size() <= column - row || isOne( (~rhs)[column-row] ) );
1412 }
1414 //*************************************************************************************************
1415 
1416 
1417 //*************************************************************************************************
1434 template< typename MT // Type of the adapted matrix
1435  , bool SO // Storage order of the adapted matrix
1436  , bool DF // Density flag
1437  , typename VT > // Type of the right-hand side vector
1438 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1439  const Vector<VT,true>& rhs, size_t row, size_t column )
1440 {
1442 
1443  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1444  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1445  BLAZE_INTERNAL_ASSERT( (~rhs).size() <= lhs.columns() - column, "Invalid number of columns" );
1446 
1447  UNUSED_PARAMETER( lhs );
1448 
1449  return ( row < column || (~rhs).size() <= row - column || isOne( (~rhs)[row-column] ) );
1450 }
1452 //*************************************************************************************************
1453 
1454 
1455 //*************************************************************************************************
1471 template< typename MT // Type of the adapted matrix
1472  , bool SO // Storage order of the adapted matrix
1473  , bool DF // Density flag
1474  , typename VT // Type of the right-hand side vector
1475  , bool TF > // Transpose flag of the right-hand side vector
1476 inline bool tryDivAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1477  const Vector<VT,TF>& rhs, size_t row, size_t column )
1478 {
1479  return tryMultAssign( lhs, ~rhs, row, column );
1480 }
1482 //*************************************************************************************************
1483 
1484 
1485 //*************************************************************************************************
1499 template< typename MT // Type of the adapted matrix
1500  , bool SO // Storage order of the adapted matrix
1501  , bool DF > // Density flag
1502 inline MT& derestrict( UniLowerMatrix<MT,SO,DF>& m )
1503 {
1504  return m.matrix_;
1505 }
1507 //*************************************************************************************************
1508 
1509 
1510 
1511 
1512 //=================================================================================================
1513 //
1514 // ROWS SPECIALIZATIONS
1515 //
1516 //=================================================================================================
1517 
1518 //*************************************************************************************************
1520 template< typename MT, bool SO, bool DF >
1521 struct Rows< UniLowerMatrix<MT,SO,DF> > : public Rows<MT>
1522 {};
1524 //*************************************************************************************************
1525 
1526 
1527 
1528 
1529 //=================================================================================================
1530 //
1531 // COLUMNS SPECIALIZATIONS
1532 //
1533 //=================================================================================================
1534 
1535 //*************************************************************************************************
1537 template< typename MT, bool SO, bool DF >
1538 struct Columns< UniLowerMatrix<MT,SO,DF> > : public Columns<MT>
1539 {};
1541 //*************************************************************************************************
1542 
1543 
1544 
1545 
1546 //=================================================================================================
1547 //
1548 // ISSQUARE SPECIALIZATIONS
1549 //
1550 //=================================================================================================
1551 
1552 //*************************************************************************************************
1554 template< typename MT, bool SO, bool DF >
1555 struct IsSquare< UniLowerMatrix<MT,SO,DF> > : public TrueType
1556 {};
1558 //*************************************************************************************************
1559 
1560 
1561 
1562 
1563 //=================================================================================================
1564 //
1565 // ISUNILOWER SPECIALIZATIONS
1566 //
1567 //=================================================================================================
1568 
1569 //*************************************************************************************************
1571 template< typename MT, bool SO, bool DF >
1572 struct IsUniLower< UniLowerMatrix<MT,SO,DF> > : public TrueType
1573 {};
1575 //*************************************************************************************************
1576 
1577 
1578 
1579 
1580 //=================================================================================================
1581 //
1582 // ISADAPTOR SPECIALIZATIONS
1583 //
1584 //=================================================================================================
1585 
1586 //*************************************************************************************************
1588 template< typename MT, bool SO, bool DF >
1589 struct IsAdaptor< UniLowerMatrix<MT,SO,DF> > : public TrueType
1590 {};
1592 //*************************************************************************************************
1593 
1594 
1595 
1596 
1597 //=================================================================================================
1598 //
1599 // ISRESTRICTED SPECIALIZATIONS
1600 //
1601 //=================================================================================================
1602 
1603 //*************************************************************************************************
1605 template< typename MT, bool SO, bool DF >
1606 struct IsRestricted< UniLowerMatrix<MT,SO,DF> > : public TrueType
1607 {};
1609 //*************************************************************************************************
1610 
1611 
1612 
1613 
1614 //=================================================================================================
1615 //
1616 // HASCONSTDATAACCESS SPECIALIZATIONS
1617 //
1618 //=================================================================================================
1619 
1620 //*************************************************************************************************
1622 template< typename MT, bool SO >
1623 struct HasConstDataAccess< UniLowerMatrix<MT,SO,true> > : public TrueType
1624 {};
1626 //*************************************************************************************************
1627 
1628 
1629 
1630 
1631 //=================================================================================================
1632 //
1633 // ISALIGNED SPECIALIZATIONS
1634 //
1635 //=================================================================================================
1636 
1637 //*************************************************************************************************
1639 template< typename MT, bool SO, bool DF >
1640 struct IsAligned< UniLowerMatrix<MT,SO,DF> > : public BoolConstant< IsAligned<MT>::value >
1641 {};
1643 //*************************************************************************************************
1644 
1645 
1646 
1647 
1648 //=================================================================================================
1649 //
1650 // ISPADDED SPECIALIZATIONS
1651 //
1652 //=================================================================================================
1653 
1654 //*************************************************************************************************
1656 template< typename MT, bool SO, bool DF >
1657 struct IsPadded< UniLowerMatrix<MT,SO,DF> > : public BoolConstant< IsPadded<MT>::value >
1658 {};
1660 //*************************************************************************************************
1661 
1662 
1663 
1664 
1665 //=================================================================================================
1666 //
1667 // ISRESIZABLE SPECIALIZATIONS
1668 //
1669 //=================================================================================================
1670 
1671 //*************************************************************************************************
1673 template< typename MT, bool SO, bool DF >
1674 struct IsResizable< UniLowerMatrix<MT,SO,DF> > : public BoolConstant< IsResizable<MT>::value >
1675 {};
1677 //*************************************************************************************************
1678 
1679 
1680 
1681 
1682 //=================================================================================================
1683 //
1684 // REMOVEADAPTOR SPECIALIZATIONS
1685 //
1686 //=================================================================================================
1687 
1688 //*************************************************************************************************
1690 template< typename MT, bool SO, bool DF >
1691 struct RemoveAdaptor< UniLowerMatrix<MT,SO,DF> >
1692 {
1693  using Type = MT;
1694 };
1696 //*************************************************************************************************
1697 
1698 
1699 
1700 
1701 //=================================================================================================
1702 //
1703 // DERESTRICTTRAIT SPECIALIZATIONS
1704 //
1705 //=================================================================================================
1706 
1707 //*************************************************************************************************
1709 template< typename MT, bool SO, bool DF >
1710 struct DerestrictTrait< UniLowerMatrix<MT,SO,DF> >
1711 {
1712  using Type = MT&;
1713 };
1715 //*************************************************************************************************
1716 
1717 
1718 
1719 
1720 //=================================================================================================
1721 //
1722 // ADDTRAIT SPECIALIZATIONS
1723 //
1724 //=================================================================================================
1725 
1726 //*************************************************************************************************
1728 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1729 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1730 {
1732 };
1733 
1734 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1735 struct AddTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
1736 {
1737  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1738 };
1739 
1740 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1741 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1742 {
1744 };
1745 
1746 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1747 struct AddTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
1748 {
1749  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1750 };
1751 
1752 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1753 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1754 {
1755  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
1756 };
1757 
1758 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1759 struct AddTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
1760 {
1761  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
1762 };
1763 
1764 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1765 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1766 {
1768 };
1769 
1770 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1771 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
1772 {
1773  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1774 };
1775 
1776 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1777 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1778 {
1780 };
1781 
1782 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1783 struct AddTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
1784 {
1785  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
1786 };
1787 
1788 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1789 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1790 {
1791  using Type = AddTrait_<MT1,MT2>;
1792 };
1793 
1794 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1795 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
1796 {
1797  using Type = AddTrait_<MT1,MT2>;
1798 };
1799 
1800 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1801 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1802 {
1803  using Type = AddTrait_<MT1,MT2>;
1804 };
1805 
1806 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1807 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1808 {
1809  using Type = AddTrait_<MT1,MT2>;
1810 };
1811 
1812 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1813 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1814 {
1815  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1816 };
1817 
1818 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1819 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1820 {
1821  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1822 };
1823 
1824 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1825 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1826 {
1827  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
1828 };
1830 //*************************************************************************************************
1831 
1832 
1833 
1834 
1835 //=================================================================================================
1836 //
1837 // SUBTRAIT SPECIALIZATIONS
1838 //
1839 //=================================================================================================
1840 
1841 //*************************************************************************************************
1843 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1844 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
1845 {
1847 };
1848 
1849 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1850 struct SubTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
1851 {
1852  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
1853 };
1854 
1855 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
1856 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
1857 {
1859 };
1860 
1861 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
1862 struct SubTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
1863 {
1864  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
1865 };
1866 
1867 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1868 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
1869 {
1870  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
1871 };
1872 
1873 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1874 struct SubTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
1875 {
1876  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
1877 };
1878 
1879 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
1880 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
1881 {
1883 };
1884 
1885 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
1886 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
1887 {
1888  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
1889 };
1890 
1891 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
1892 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
1893 {
1895 };
1896 
1897 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
1898 struct SubTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
1899 {
1900  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
1901 };
1902 
1903 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
1904 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
1905 {
1906  using Type = SubTrait_<MT1,MT2>;
1907 };
1908 
1909 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
1910 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
1911 {
1912  using Type = SubTrait_<MT1,MT2>;
1913 };
1914 
1915 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1916 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
1917 {
1918  using Type = SubTrait_<MT1,MT2>;
1919 };
1920 
1921 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1922 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1923 {
1924  using Type = SubTrait_<MT1,MT2>;
1925 };
1926 
1927 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1928 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
1929 {
1930  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1931 };
1932 
1933 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1934 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1935 {
1936  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1937 };
1938 
1939 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
1940 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
1941 {
1942  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
1943 };
1945 //*************************************************************************************************
1946 
1947 
1948 
1949 
1950 //=================================================================================================
1951 //
1952 // MULTTRAIT SPECIALIZATIONS
1953 //
1954 //=================================================================================================
1955 
1956 //*************************************************************************************************
1958 template< typename MT, bool SO, bool DF, typename T >
1959 struct MultTrait< UniLowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
1960 {
1961  using Type = LowerMatrix< MultTrait_<MT,T> >;
1962 };
1963 
1964 template< typename T, typename MT, bool SO, bool DF >
1965 struct MultTrait< T, UniLowerMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
1966 {
1967  using Type = LowerMatrix< MultTrait_<T,MT> >;
1968 };
1969 
1970 template< typename MT, bool SO, bool DF, typename T, size_t N >
1971 struct MultTrait< UniLowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
1972 {
1974 };
1975 
1976 template< typename T, size_t N, typename MT, bool SO, bool DF >
1977 struct MultTrait< StaticVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
1978 {
1979  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
1980 };
1981 
1982 template< typename MT, bool SO, bool DF, typename T, size_t N >
1983 struct MultTrait< UniLowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
1984 {
1986 };
1987 
1988 template< typename T, size_t N, typename MT, bool SO, bool DF >
1989 struct MultTrait< HybridVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
1990 {
1991  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
1992 };
1993 
1994 template< typename MT, bool SO, bool DF, typename T >
1995 struct MultTrait< UniLowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
1996 {
1998 };
1999 
2000 template< typename T, typename MT, bool SO, bool DF >
2001 struct MultTrait< DynamicVector<T,true>, UniLowerMatrix<MT,SO,DF> >
2002 {
2003  using Type = MultTrait_< DynamicVector<T,true>, MT >;
2004 };
2005 
2006 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
2007 struct MultTrait< UniLowerMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
2008 {
2010 };
2011 
2012 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
2013 struct MultTrait< CustomVector<T,AF,PF,true>, UniLowerMatrix<MT,SO,DF> >
2014 {
2015  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
2016 };
2017 
2018 template< typename MT, bool SO, bool DF, typename T >
2019 struct MultTrait< UniLowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
2020 {
2022 };
2023 
2024 template< typename T, typename MT, bool SO, bool DF >
2025 struct MultTrait< CompressedVector<T,true>, UniLowerMatrix<MT,SO,DF> >
2026 {
2027  using Type = MultTrait_< CompressedVector<T,true>, MT >;
2028 };
2029 
2030 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2031 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2032 {
2034 };
2035 
2036 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2037 struct MultTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2038 {
2039  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
2040 };
2041 
2042 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2043 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2044 {
2046 };
2047 
2048 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2049 struct MultTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2050 {
2051  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
2052 };
2053 
2054 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2055 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2056 {
2057  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
2058 };
2059 
2060 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2061 struct MultTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2062 {
2063  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
2064 };
2065 
2066 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2067 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2068 {
2070 };
2071 
2072 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2073 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
2074 {
2075  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2076 };
2077 
2078 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2079 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2080 {
2082 };
2083 
2084 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2085 struct MultTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2086 {
2087  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
2088 };
2089 
2090 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2091 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2092 {
2093  using Type = MultTrait_<MT1,MT2>;
2094 };
2095 
2096 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2097 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
2098 {
2099  using Type = MultTrait_<MT1,MT2>;
2100 };
2101 
2102 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2103 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2104 {
2105  using Type = MultTrait_<MT1,MT2>;
2106 };
2107 
2108 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2109 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2110 {
2111  using Type = MultTrait_<MT1,MT2>;
2112 };
2113 
2114 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2115 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2116 {
2117  using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
2118 };
2119 
2120 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2121 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2122 {
2123  using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
2124 };
2125 
2126 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2127 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2128 {
2129  using Type = UniLowerMatrix< MultTrait_<MT1,MT2> >;
2130 };
2132 //*************************************************************************************************
2133 
2134 
2135 
2136 
2137 //=================================================================================================
2138 //
2139 // DIVTRAIT SPECIALIZATIONS
2140 //
2141 //=================================================================================================
2142 
2143 //*************************************************************************************************
2145 template< typename MT, bool SO, bool DF, typename T >
2146 struct DivTrait< UniLowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
2147 {
2148  using Type = LowerMatrix< DivTrait_<MT,T> >;
2149 };
2151 //*************************************************************************************************
2152 
2153 
2154 
2155 
2156 //=================================================================================================
2157 //
2158 // FOREACHTRAIT SPECIALIZATIONS
2159 //
2160 //=================================================================================================
2161 
2162 //*************************************************************************************************
2164 template< typename MT, bool SO, bool DF, typename ET >
2165 struct ForEachTrait< UniLowerMatrix<MT,SO,DF>, Pow<ET> >
2166 {
2168 };
2170 //*************************************************************************************************
2171 
2172 
2173 
2174 
2175 //=================================================================================================
2176 //
2177 // HIGHTYPE SPECIALIZATIONS
2178 //
2179 //=================================================================================================
2180 
2181 //*************************************************************************************************
2183 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2184 struct HighType< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2185 {
2187 };
2189 //*************************************************************************************************
2190 
2191 
2192 
2193 
2194 //=================================================================================================
2195 //
2196 // LOWTYPE SPECIALIZATIONS
2197 //
2198 //=================================================================================================
2199 
2200 //*************************************************************************************************
2202 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2203 struct LowType< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2204 {
2206 };
2208 //*************************************************************************************************
2209 
2210 
2211 
2212 
2213 //=================================================================================================
2214 //
2215 // SUBMATRIXTRAIT SPECIALIZATIONS
2216 //
2217 //=================================================================================================
2218 
2219 //*************************************************************************************************
2221 template< typename MT, bool SO, bool DF >
2222 struct SubmatrixTrait< UniLowerMatrix<MT,SO,DF> >
2223 {
2224  using Type = SubmatrixTrait_<MT>;
2225 };
2227 //*************************************************************************************************
2228 
2229 
2230 
2231 
2232 //=================================================================================================
2233 //
2234 // ROWTRAIT SPECIALIZATIONS
2235 //
2236 //=================================================================================================
2237 
2238 //*************************************************************************************************
2240 template< typename MT, bool SO, bool DF >
2241 struct RowTrait< UniLowerMatrix<MT,SO,DF> >
2242 {
2243  using Type = RowTrait_<MT>;
2244 };
2246 //*************************************************************************************************
2247 
2248 
2249 
2250 
2251 //=================================================================================================
2252 //
2253 // COLUMNTRAIT SPECIALIZATIONS
2254 //
2255 //=================================================================================================
2256 
2257 //*************************************************************************************************
2259 template< typename MT, bool SO, bool DF >
2260 struct ColumnTrait< UniLowerMatrix<MT,SO,DF> >
2261 {
2262  using Type = ColumnTrait_<MT>;
2263 };
2265 //*************************************************************************************************
2266 
2267 } // namespace blaze
2268 
2269 #endif
Header file for the implementation of the base template of the UniLowerMatrix.
Header file for auxiliary alias declarations.
Header file for mathematical functions.
typename DerestrictTrait< T >::Type DerestrictTrait_
Auxiliary alias declaration for the DerestrictTrait type trait.The DerestrictTrait_ alias declaration...
Definition: DerestrictTrait.h:110
Compile time check for low-level access to constant data.This type trait tests whether the given data...
Definition: HasConstDataAccess.h:75
Header file for the Rows type trait.
Header file for the UNUSED_PARAMETER function template.
Header file for the subtraction trait.
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.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:118
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:117
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:152
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:261
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Matrix adapter for lower triangular matrices.
Definition: Forward.h:48
Header file for the dense matrix inversion flags.
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:194
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1755
#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:245
Constraint on the data type.
Header file for the IsUniLower type trait.
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:71
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:119
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1679
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.
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:741
Base template for the RowTrait class.
Definition: RowTrait.h:117
Flag for the inversion of a upper triangular matrix.
Definition: InversionFlag.h:113
Constraint on the data type.
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.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Base template for the ForEachTrait class.The ForEachTrait class template offers the possibility to se...
Definition: ForEachTrait.h:79
UniLowerMatrix specialization for dense matrices.
Header file for all forward declarations of the math module.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2939
Compile time check for data types with padding.This type trait tests whether the given data type empl...
Definition: IsPadded.h:76
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.
Header file for the implementation of a fixed-size matrix.
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:336
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, RowExprTrait_< MT > > row(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific row of the given matrix.
Definition: Row.h:128
#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
UniLowerMatrix specialization for sparse matrices.
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:544
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:260
Header file for the RemoveAdaptor type trait.
Constraint on the data type.
Compile time check for adaptors.This type trait tests whether the given template parameter is an adap...
Definition: IsAdaptor.h:88
DisableIf_< Or< IsComputation< MT >, IsTransExpr< MT >, IsDeclExpr< MT > >, ColumnExprTrait_< MT > > column(Matrix< MT, SO > &matrix, size_t index)
Creating a view on a specific column of the given matrix.
Definition: Column.h:128
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
Header file for the isOne shim.
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for the DerestrictTrait class template.
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
#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 run time assertion macros.
Base template for the AddTrait class.
Definition: AddTrait.h:143
Base template for the MultTrait class.
Definition: MultTrait.h:143
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
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
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:635
Header file for the column trait.
Header file for the isDefault shim.
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:267
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:94
#define BLAZE_CONSTRAINT_MUST_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:153
Evaluation of the return type of the derestrict function.Via this type trait it is possible to evalua...
Definition: DerestrictTrait.h:73
Base template for the DivTrait class.
Definition: DivTrait.h:143
typename ColumnTrait< MT >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:152
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:320
Removal of top level adaptor types.In case the given type is an adaptor type (SymmetricMatrix, LowerMatrix, UpperMatrix, ...), the RemoveAdaptor type trait removes the adaptor and extracts the contained general matrix type. Else the given type is returned as is. Note that cv-qualifiers are preserved.
Definition: RemoveAdaptor.h:76
Base class for N-dimensional vectors.The Vector class is a base class for all arbitrarily sized (N-di...
Definition: Forward.h:164
Header file for the implementation of the base template of the LowerMatrix.
typename SubTrait< T1, T2 >::Type SubTrait_
Auxiliary alias declaration for the SubTrait class template.The SubTrait_ alias declaration provides ...
Definition: SubTrait.h:245
Header file for the for-each trait.
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:120
Header file for the IntegralConstant class template.
Compile time evaluation of the number of columns of a matrix.The Columns type trait evaluates the num...
Definition: Columns.h:76
Matrix adapter for lower unitriangular matrices.
Definition: Forward.h:53
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:249
Compile time evaluation of the number of rows of a matrix.The Rows type trait evaluates the number of...
Definition: Rows.h:76
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:573
#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:143
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:245
InversionFlag
Inversion flag.The InversionFlag type enumeration represents the different types of matrix inversion ...
Definition: InversionFlag.h:101
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101
Header file for the HighType type trait.
Header file for the TrueType type/value trait base class.