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>
54 #include <blaze/math/Forward.h>
57 #include <blaze/math/shims/IsOne.h>
91 #include <blaze/util/Assert.h>
92 #include <blaze/util/EnableIf.h>
93 #include <blaze/util/TrueType.h>
95 #include <blaze/util/Unused.h>
96 
97 
98 namespace blaze {
99 
100 //=================================================================================================
101 //
102 // UNILOWERMATRIX OPERATORS
103 //
104 //=================================================================================================
105 
106 //*************************************************************************************************
109 template< typename MT, bool SO, bool DF >
110 inline void reset( UniLowerMatrix<MT,SO,DF>& m );
111 
112 template< typename MT, bool SO, bool DF >
113 inline void reset( UniLowerMatrix<MT,SO,DF>& m, size_t i );
114 
115 template< typename MT, bool SO, bool DF >
116 inline void clear( UniLowerMatrix<MT,SO,DF>& m );
117 
118 template< bool RF, typename MT, bool SO, bool DF >
119 inline bool isDefault( const UniLowerMatrix<MT,SO,DF>& m );
120 
121 template< typename MT, bool SO, bool DF >
122 inline bool isIntact( const UniLowerMatrix<MT,SO,DF>& m );
123 
124 template< typename MT, bool SO, bool DF >
125 inline void swap( UniLowerMatrix<MT,SO,DF>& a, UniLowerMatrix<MT,SO,DF>& b ) noexcept;
127 //*************************************************************************************************
128 
129 
130 //*************************************************************************************************
137 template< typename MT // Type of the adapted matrix
138  , bool SO // Storage order of the adapted matrix
139  , bool DF > // Density flag
141 {
142  m.reset();
143 }
144 //*************************************************************************************************
145 
146 
147 //*************************************************************************************************
160 template< typename MT // Type of the adapted matrix
161  , bool SO // Storage order of the adapted matrix
162  , bool DF > // Density flag
163 inline void reset( UniLowerMatrix<MT,SO,DF>& m, size_t i )
164 {
165  m.reset( i );
166 }
167 //*************************************************************************************************
168 
169 
170 //*************************************************************************************************
177 template< typename MT // Type of the adapted matrix
178  , bool SO // Storage order of the adapted matrix
179  , bool DF > // Density flag
181 {
182  m.clear();
183 }
184 //*************************************************************************************************
185 
186 
187 //*************************************************************************************************
197 template< bool RF // Relaxation flag
198  , typename MT // Type of the adapted matrix
199  , bool SO // Storage order of the adapted matrix
200  , bool DF > // Density flag
201 inline bool isDefault_backend( const UniLowerMatrix<MT,SO,DF>& m, TrueType )
202 {
203  return ( m.rows() == 0UL );
204 }
206 //*************************************************************************************************
207 
208 
209 //*************************************************************************************************
219 template< bool RF // Relaxation flag
220  , typename MT // Type of the adapted matrix
221  , bool SO // Storage order of the adapted matrix
222  , bool DF > // Density flag
223 inline bool isDefault_backend( const UniLowerMatrix<MT,SO,DF>& m, FalseType )
224 {
225  return isIdentity<RF>( m );
226 }
228 //*************************************************************************************************
229 
230 
231 //*************************************************************************************************
257 template< bool RF // Relaxation flag
258  , typename MT // Type of the adapted matrix
259  , bool SO // Storage order of the adapted matrix
260  , bool DF > // Density flag
261 inline bool isDefault( const UniLowerMatrix<MT,SO,DF>& m )
262 {
263  return isDefault_backend<RF>( m, typename IsResizable<MT>::Type() );
264 }
265 //*************************************************************************************************
266 
267 
268 //*************************************************************************************************
289 template< typename MT // Type of the adapted matrix
290  , bool SO // Storage order of the adapted matrix
291  , bool DF > // Density flag
292 inline bool isIntact( const UniLowerMatrix<MT,SO,DF>& m )
293 {
294  return m.isIntact();
295 }
296 //*************************************************************************************************
297 
298 
299 //*************************************************************************************************
307 template< typename MT // Type of the adapted matrix
308  , bool SO // Storage order of the adapted matrix
309  , bool DF > // Density flag
311 {
312  a.swap( b );
313 }
314 //*************************************************************************************************
315 
316 
317 //*************************************************************************************************
340 template< InversionFlag IF // Inversion algorithm
341  , typename MT // Type of the dense matrix
342  , bool SO > // Storage order of the dense matrix
343 inline void invert( UniLowerMatrix<MT,SO,true>& m )
344 {
346 
347  if( IF == asUpper || IF == asUniUpper ) {
348  BLAZE_INTERNAL_ASSERT( isIdentity( m ), "Violation of preconditions detected" );
349  return;
350  }
351 
352  constexpr InversionFlag flag( ( IF == byLU || IF == asGeneral || IF == asLower || IF == asUniLower )
353  ? ( asUniLower )
354  : ( asDiagonal ) );
355 
356  invert<flag>( derestrict( m ) );
357 
358  BLAZE_INTERNAL_ASSERT( isIntact( m ), "Broken invariant detected" );
359 }
361 //*************************************************************************************************
362 
363 
364 //*************************************************************************************************
383 template< typename MT1, bool SO1, typename MT2, typename MT3, typename MT4, bool SO2 >
384 inline void lu( const UniLowerMatrix<MT1,SO1,true>& A, DenseMatrix<MT2,SO1>& L,
386 {
388 
393 
398 
399  using ET3 = ElementType_<MT3>;
400  using ET4 = ElementType_<MT4>;
401 
402  const size_t n( (~A).rows() );
403 
404  decltype(auto) U2( derestrict( ~U ) );
405 
406  (~L) = A;
407 
408  resize( ~U, n, n );
409  reset( U2 );
410 
411  resize( ~P, n, n );
412  reset( ~P );
413 
414  for( size_t i=0UL; i<n; ++i ) {
415  U2(i,i) = ET3(1);
416  (~P)(i,i) = ET4(1);
417  }
418 }
420 //*************************************************************************************************
421 
422 
423 //*************************************************************************************************
439 template< typename MT // Type of the adapted matrix
440  , bool SO // Storage order of the adapted matrix
441  , bool DF // Density flag
442  , typename ET > // Type of the element
443 inline bool trySet( const UniLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
444 {
445  BLAZE_INTERNAL_ASSERT( i < (~mat).rows(), "Invalid row access index" );
446  BLAZE_INTERNAL_ASSERT( j < (~mat).columns(), "Invalid column access index" );
447 
448  UNUSED_PARAMETER( mat );
449 
450  if( i > j )
451  return true;
452  else if( i == j )
453  return isOne( value );
454  else
455  return isDefault( value );
456 }
458 //*************************************************************************************************
459 
460 
461 //*************************************************************************************************
477 template< typename MT // Type of the adapted matrix
478  , bool SO // Storage order of the adapted matrix
479  , bool DF // Density flag
480  , typename ET > // Type of the element
481 inline bool tryAdd( const UniLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
482 {
483  BLAZE_INTERNAL_ASSERT( i < (~mat).rows(), "Invalid row access index" );
484  BLAZE_INTERNAL_ASSERT( j < (~mat).columns(), "Invalid column access index" );
485 
486  UNUSED_PARAMETER( mat );
487 
488  if( i > j )
489  return true;
490  else
491  return isDefault( value );
492 }
494 //*************************************************************************************************
495 
496 
497 //*************************************************************************************************
513 template< typename MT // Type of the adapted matrix
514  , bool SO // Storage order of the adapted matrix
515  , bool DF // Density flag
516  , typename ET > // Type of the element
517 inline bool trySub( const UniLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
518 {
519  return tryAdd( mat, i, j, value );
520 }
522 //*************************************************************************************************
523 
524 
525 //*************************************************************************************************
541 template< typename MT // Type of the adapted matrix
542  , bool SO // Storage order of the adapted matrix
543  , bool DF // Density flag
544  , typename ET > // Type of the element
545 inline bool tryMult( const UniLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
546 {
547  BLAZE_INTERNAL_ASSERT( i < (~mat).rows(), "Invalid row access index" );
548  BLAZE_INTERNAL_ASSERT( j < (~mat).columns(), "Invalid column access index" );
549 
550  UNUSED_PARAMETER( mat );
551 
552  return ( i != j || IsOne( value ) );
553 }
555 //*************************************************************************************************
556 
557 
558 //*************************************************************************************************
576 template< typename MT // Type of the adapted matrix
577  , bool SO // Storage order of the adapted matrix
578  , bool DF // Density flag
579  , typename ET > // Type of the element
581  tryMult( const UniLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
582 {
583  BLAZE_INTERNAL_ASSERT( row <= (~mat).rows(), "Invalid row access index" );
584  BLAZE_INTERNAL_ASSERT( column <= (~mat).columns(), "Invalid column access index" );
585  BLAZE_INTERNAL_ASSERT( row + m <= (~mat).rows(), "Invalid number of rows" );
586  BLAZE_INTERNAL_ASSERT( column + n <= (~mat).columns(), "Invalid number of columns" );
587 
588  UNUSED_PARAMETER( mat );
589 
590  return ( row >= column + n ) || ( column >= row + m ) || isOne( value );
591 }
593 //*************************************************************************************************
594 
595 
596 //*************************************************************************************************
612 template< typename MT // Type of the adapted matrix
613  , bool SO // Storage order of the adapted matrix
614  , bool DF // Density flag
615  , typename ET > // Type of the element
616 inline bool tryDiv( const UniLowerMatrix<MT,SO,DF>& mat, size_t i, size_t j, const ET& value )
617 {
618  return tryMult( mat, i, j, value );
619 }
621 //*************************************************************************************************
622 
623 
624 //*************************************************************************************************
642 template< typename MT // Type of the adapted matrix
643  , bool SO // Storage order of the adapted matrix
644  , bool DF // Density flag
645  , typename ET > // Type of the element
647  tryDiv( const UniLowerMatrix<MT,SO,DF>& mat, size_t row, size_t column, size_t m, size_t n, const ET& value )
648 {
649  BLAZE_INTERNAL_ASSERT( row <= (~mat).rows(), "Invalid row access index" );
650  BLAZE_INTERNAL_ASSERT( column <= (~mat).columns(), "Invalid column access index" );
651  BLAZE_INTERNAL_ASSERT( row + m <= (~mat).rows(), "Invalid number of rows" );
652  BLAZE_INTERNAL_ASSERT( column + n <= (~mat).columns(), "Invalid number of columns" );
653 
654  UNUSED_PARAMETER( mat );
655 
656  return ( row >= column + n ) || ( column >= row + m ) || isOne( value );
657 }
659 //*************************************************************************************************
660 
661 
662 //*************************************************************************************************
678 template< typename MT // Type of the adapted matrix
679  , bool SO // Storage order of the adapted matrix
680  , bool DF // Density flag
681  , typename VT > // Type of the right-hand side dense vector
682 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
683  const DenseVector<VT,false>& rhs, size_t row, size_t column )
684 {
686 
687  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
688  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
689  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
690 
691  UNUSED_PARAMETER( lhs );
692 
693  if( column < row )
694  return true;
695 
696  const bool containsDiagonal( column < row + (~rhs).size() );
697  const size_t iend( min( column - row, (~rhs).size() ) );
698 
699  for( size_t i=0UL; i<iend; ++i ) {
700  if( !isDefault( (~rhs)[i] ) )
701  return false;
702  }
703 
704  if( containsDiagonal && !isOne( (~rhs)[iend] ) )
705  return false;
706 
707  return true;
708 }
710 //*************************************************************************************************
711 
712 
713 //*************************************************************************************************
729 template< typename MT // Type of the adapted matrix
730  , bool SO // Storage order of the adapted matrix
731  , bool DF // Density flag
732  , typename VT > // Type of the right-hand side dense vector
733 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
734  const DenseVector<VT,true>& rhs, size_t row, size_t column )
735 {
737 
738  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
739  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
740  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
741 
742  UNUSED_PARAMETER( lhs );
743 
744  if( row >= column + (~rhs).size() )
745  return true;
746 
747  const bool containsDiagonal( row >= column );
748  const size_t ibegin( ( !containsDiagonal )?( 0UL ):( row - column + 1UL ) );
749 
750  if( containsDiagonal && !isOne( (~rhs)[row-column] ) )
751  return false;
752 
753  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
754  if( !isDefault( (~rhs)[i] ) )
755  return false;
756  }
757 
758  return true;
759 }
761 //*************************************************************************************************
762 
763 
764 //*************************************************************************************************
782 template< typename MT // Type of the adapted matrix
783  , bool SO // Storage order of the adapted matrix
784  , bool DF // Density flag
785  , typename VT // Type of the right-hand side dense vector
786  , bool TF > // Transpose flag of the right-hand side dense vector
787 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const DenseVector<VT,TF>& rhs,
788  ptrdiff_t band, size_t row, size_t column )
789 {
791 
792  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
793  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
794  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
795  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
796 
797  UNUSED_PARAMETER( lhs, row, column );
798 
799  if( band == 0L ) {
800  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
801  if( !isOne( (~rhs)[i] ) )
802  return false;
803  }
804  }
805  else if( band > 0L ) {
806  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
807  if( !isDefault( (~rhs)[i] ) )
808  return false;
809  }
810  }
811 
812  return true;
813 }
815 //*************************************************************************************************
816 
817 
818 //*************************************************************************************************
834 template< typename MT // Type of the adapted matrix
835  , bool SO // Storage order of the adapted matrix
836  , bool DF // Density flag
837  , typename VT > // Type of the right-hand side sparse vector
838 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
839  const SparseVector<VT,false>& rhs, size_t row, size_t column )
840 {
842 
843  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
844  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
845  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
846 
847  UNUSED_PARAMETER( lhs );
848 
849  using RhsIterator = typename VT::ConstIterator;
850 
851  if( column < row )
852  return true;
853 
854  const bool containsDiagonal( column < row + (~rhs).size() );
855  const size_t index( column - row );
856  const RhsIterator last( (~rhs).lowerBound( index ) );
857 
858  if( containsDiagonal ) {
859  if( last == (~rhs).end() || last->index() != index || !isOne( last->value() ) )
860  return false;
861  }
862 
863  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
864  if( !isDefault( element->value() ) )
865  return false;
866  }
867 
868  return true;
869 }
871 //*************************************************************************************************
872 
873 
874 //*************************************************************************************************
890 template< typename MT // Type of the adapted matrix
891  , bool SO // Storage order of the adapted matrix
892  , bool DF // Density flag
893  , typename VT > // Type of the right-hand side sparse vector
894 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
895  const SparseVector<VT,true>& rhs, size_t row, size_t column )
896 {
898 
899  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
900  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
901  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
902 
903  UNUSED_PARAMETER( lhs );
904 
905  using RhsIterator = typename VT::ConstIterator;
906 
907  if( row >= column + (~rhs).size() )
908  return true;
909 
910  const bool containsDiagonal( row >= column );
911  const size_t index( ( containsDiagonal )?( row - column ):( 0UL ) );
912  const RhsIterator last( (~rhs).end() );
913  RhsIterator element( (~rhs).lowerBound( index ) );
914 
915  if( containsDiagonal ) {
916  if( element == last || element->index() != index || !isOne( element->value() ) )
917  return false;
918  ++element;
919  }
920 
921  for( ; element!=last; ++element ) {
922  if( !isDefault( element->value() ) )
923  return false;
924  }
925 
926  return true;
927 }
929 //*************************************************************************************************
930 
931 
932 //*************************************************************************************************
950 template< typename MT // Type of the adapted matrix
951  , bool SO // Storage order of the adapted matrix
952  , bool DF // Density flag
953  , typename VT // Type of the right-hand side sparse vector
954  , bool TF > // Transpose flag of the right-hand side sparse vector
955 inline bool tryAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const SparseVector<VT,TF>& rhs,
956  ptrdiff_t band, size_t row, size_t column )
957 {
959 
960  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
961  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
962  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
963  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
964 
965  UNUSED_PARAMETER( lhs, row, column );
966 
967  if( band == 0L ) {
968  if( (~rhs).nonZeros() != (~rhs).size() )
969  return false;
970  for( const auto& element : ~rhs ) {
971  if( !isOne( element.value() ) )
972  return false;
973  }
974  }
975  else if( band > 0L ) {
976  for( const auto& element : ~rhs ) {
977  if( !isDefault( element.value() ) )
978  return false;
979  }
980  }
981 
982  return true;
983 }
985 //*************************************************************************************************
986 
987 
988 //*************************************************************************************************
1004 template< typename MT1 // Type of the adapted matrix
1005  , bool SO // Storage order of the adapted matrix
1006  , bool DF // Density flag
1007  , typename MT2 > // Type of the right-hand side dense matrix
1008 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1009  const DenseMatrix<MT2,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( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1016  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1017 
1018  UNUSED_PARAMETER( lhs );
1019 
1020  const size_t M( (~rhs).rows() );
1021  const size_t N( (~rhs).columns() );
1022 
1023  if( row >= column + N )
1024  return true;
1025 
1026  const size_t iend( min( column + N - row, M ) );
1027 
1028  for( size_t i=0UL; i<iend; ++i )
1029  {
1030  const bool containsDiagonal( row + i >= column );
1031 
1032  if( containsDiagonal && !isOne( (~rhs)(i,row+i-column) ) )
1033  return false;
1034 
1035  const size_t jbegin( ( containsDiagonal )?( row + i - column + 1UL ):( 0UL ) );
1036 
1037  for( size_t j=jbegin; j<N; ++j ) {
1038  if( !isDefault( (~rhs)(i,j) ) )
1039  return false;
1040  }
1041  }
1042 
1043  return true;
1044 }
1046 //*************************************************************************************************
1047 
1048 
1049 //*************************************************************************************************
1065 template< typename MT1 // Type of the adapted matrix
1066  , bool SO // Storage order of the adapted matrix
1067  , bool DF // Density flag
1068  , typename MT2 > // Type of the right-hand side dense matrix
1069 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1070  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
1071 {
1073 
1074  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1075  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1076  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1077  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1078 
1079  UNUSED_PARAMETER( lhs );
1080 
1081  const size_t M( (~rhs).rows() );
1082  const size_t N( (~rhs).columns() );
1083 
1084  if( row >= column + N )
1085  return true;
1086 
1087  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
1088 
1089  for( size_t j=jbegin; j<N; ++j )
1090  {
1091  const size_t iend( min( column + j - row, M ) );
1092 
1093  for( size_t i=0UL; i<iend; ++i ) {
1094  if( !isDefault( (~rhs)(i,j) ) )
1095  return false;
1096  }
1097 
1098  const bool containsDiagonal( column + j < row + M );
1099 
1100  if( containsDiagonal && !isOne( (~rhs)(iend,j) ) )
1101  return false;
1102  }
1103 
1104  return true;
1105 }
1107 //*************************************************************************************************
1108 
1109 
1110 //*************************************************************************************************
1126 template< typename MT1 // Type of the adapted matrix
1127  , bool SO // Storage order of the adapted matrix
1128  , bool DF // Density flag
1129  , typename MT2 > // Type of the right-hand side sparse matrix
1130 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1131  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
1132 {
1134 
1135  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1136  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1137  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1138  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1139 
1140  UNUSED_PARAMETER( lhs );
1141 
1142  using RhsIterator = typename MT2::ConstIterator;
1143 
1144  const size_t M( (~rhs).rows() );
1145  const size_t N( (~rhs).columns() );
1146 
1147  if( row >= column + N )
1148  return true;
1149 
1150  const size_t iend( min( column + N - row, M ) );
1151 
1152  for( size_t i=0UL; i<iend; ++i )
1153  {
1154  const bool containsDiagonal( row + i >= column );
1155  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1156 
1157  const RhsIterator last( (~rhs).end(i) );
1158  RhsIterator element( (~rhs).lowerBound( i, index ) );
1159 
1160  if( containsDiagonal ) {
1161  if( element == last || ( element->index() != index ) || !isOne( element->value() ) )
1162  return false;
1163  ++element;
1164  }
1165 
1166  for( ; element!=last; ++element ) {
1167  if( !isDefault( element->value() ) )
1168  return false;
1169  }
1170  }
1171 
1172  return true;
1173 }
1175 //*************************************************************************************************
1176 
1177 
1178 //*************************************************************************************************
1194 template< typename MT1 // Type of the adapted matrix
1195  , bool SO // Storage order of the adapted matrix
1196  , bool DF // Density flag
1197  , typename MT2 > // Type of the right-hand side sparse matrix
1198 inline bool tryAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1199  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
1200 {
1202 
1203  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1204  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1205  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1206  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1207 
1208  UNUSED_PARAMETER( lhs );
1209 
1210  using RhsIterator = typename MT2::ConstIterator;
1211 
1212  const size_t M( (~rhs).rows() );
1213  const size_t N( (~rhs).columns() );
1214 
1215  if( row >= column + N )
1216  return true;
1217 
1218  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
1219 
1220  for( size_t j=jbegin; j<N; ++j )
1221  {
1222  const bool containsDiagonal( column + j < row + M );
1223 
1224  const size_t index( column + j - row );
1225  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
1226 
1227  if( containsDiagonal ) {
1228  if( last == (~rhs).end(j) || ( last->index() != index ) || !isOne( last->value() ) )
1229  return false;
1230  }
1231 
1232  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
1233  if( !isDefault( element->value() ) )
1234  return false;
1235  }
1236  }
1237 
1238  return true;
1239 }
1241 //*************************************************************************************************
1242 
1243 
1244 //*************************************************************************************************
1261 template< typename MT // Type of the adapted matrix
1262  , bool SO // Storage order of the adapted matrix
1263  , bool DF // Density flag
1264  , typename VT > // Type of the right-hand side dense vector
1265 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1266  const DenseVector<VT,false>& rhs, size_t row, size_t column )
1267 {
1269 
1270  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1271  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1272  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1273 
1274  UNUSED_PARAMETER( lhs );
1275 
1276  if( column < row )
1277  return true;
1278 
1279  const size_t iend( min( column - row + 1UL, (~rhs).size() ) );
1280 
1281  for( size_t i=0UL; i<iend; ++i ) {
1282  if( !isDefault( (~rhs)[i] ) )
1283  return false;
1284  }
1285 
1286  return true;
1287 }
1289 //*************************************************************************************************
1290 
1291 
1292 //*************************************************************************************************
1309 template< typename MT // Type of the adapted matrix
1310  , bool SO // Storage order of the adapted matrix
1311  , bool DF // Density flag
1312  , typename VT > // Type of the right-hand side dense vector
1313 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1314  const DenseVector<VT,true>& rhs, size_t row, size_t column )
1315 {
1317 
1318  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1319  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1320  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1321 
1322  UNUSED_PARAMETER( lhs );
1323 
1324  const size_t ibegin( ( row <= column )?( 0UL ):( row - column ) );
1325 
1326  for( size_t i=ibegin; i<(~rhs).size(); ++i ) {
1327  if( !isDefault( (~rhs)[i] ) )
1328  return false;
1329  }
1330 
1331  return true;
1332 }
1334 //*************************************************************************************************
1335 
1336 
1337 //*************************************************************************************************
1354 template< typename MT // Type of the adapted matrix
1355  , bool SO // Storage order of the adapted matrix
1356  , bool DF // Density flag
1357  , typename VT // Type of the right-hand side dense vector
1358  , bool TF > // Transpose flag of the right-hand side dense vector
1359 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const DenseVector<VT,TF>& rhs,
1360  ptrdiff_t band, size_t row, size_t column )
1361 {
1363 
1364  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1365  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1366  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1367  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1368 
1369  UNUSED_PARAMETER( lhs, row, column );
1370 
1371  if( band >= 0L ) {
1372  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
1373  if( !isDefault( (~rhs)[i] ) )
1374  return false;
1375  }
1376  }
1377 
1378  return true;
1379 }
1381 //*************************************************************************************************
1382 
1383 
1384 //*************************************************************************************************
1401 template< typename MT // Type of the adapted matrix
1402  , bool SO // Storage order of the adapted matrix
1403  , bool DF // Density flag
1404  , typename VT > // Type of the right-hand side sparse vector
1405 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1406  const SparseVector<VT,false>& rhs, size_t row, size_t column )
1407 {
1409 
1410  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1411  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1412  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1413 
1414  UNUSED_PARAMETER( lhs );
1415 
1416  using RhsIterator = typename VT::ConstIterator;
1417 
1418  if( column < row )
1419  return true;
1420 
1421  const RhsIterator last( (~rhs).lowerBound( column - row + 1UL ) );
1422 
1423  for( RhsIterator element=(~rhs).begin(); element!=last; ++element ) {
1424  if( !isDefault( element->value() ) )
1425  return false;
1426  }
1427 
1428  return true;
1429 }
1431 //*************************************************************************************************
1432 
1433 
1434 //*************************************************************************************************
1451 template< typename MT // Type of the adapted matrix
1452  , bool SO // Storage order of the adapted matrix
1453  , bool DF // Density flag
1454  , typename VT > // Type of the right-hand side sparse vector
1455 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1456  const SparseVector<VT,true>& rhs, size_t row, size_t column )
1457 {
1459 
1460  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1461  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1462  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1463 
1464  UNUSED_PARAMETER( lhs );
1465 
1466  using RhsIterator = typename VT::ConstIterator;
1467 
1468  const RhsIterator last( (~rhs).end() );
1469  RhsIterator element( (~rhs).lowerBound( ( row <= column )?( 0UL ):( row - column ) ) );
1470 
1471  for( ; element!=last; ++element ) {
1472  if( !isDefault( element->value() ) )
1473  return false;
1474  }
1475 
1476  return true;
1477 }
1479 //*************************************************************************************************
1480 
1481 
1482 //*************************************************************************************************
1499 template< typename MT // Type of the adapted matrix
1500  , bool SO // Storage order of the adapted matrix
1501  , bool DF // Density flag
1502  , typename VT // Type of the right-hand side sparse vector
1503  , bool TF > // Transpose flag of the right-hand side sparse vector
1504 inline bool tryAddAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const SparseVector<VT,TF>& rhs,
1505  ptrdiff_t band, size_t row, size_t column )
1506 {
1508 
1509  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1510  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1511  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1512  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1513 
1514  UNUSED_PARAMETER( lhs, row, column );
1515 
1516  if( band >= 0L ) {
1517  for( const auto& element : ~rhs ) {
1518  if( !isDefault( element.value() ) )
1519  return false;
1520  }
1521  }
1522 
1523  return true;
1524 }
1526 //*************************************************************************************************
1527 
1528 
1529 //*************************************************************************************************
1546 template< typename MT1 // Type of the adapted matrix
1547  , bool SO // Storage order of the adapted matrix
1548  , bool DF // Density flag
1549  , typename MT2 > // Type of the right-hand side dense matrix
1550 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1551  const DenseMatrix<MT2,false>& rhs, size_t row, size_t column )
1552 {
1554 
1555  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1556  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1557  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1558  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1559 
1560  UNUSED_PARAMETER( lhs );
1561 
1562  const size_t M( (~rhs).rows() );
1563  const size_t N( (~rhs).columns() );
1564 
1565  if( row >= column + N )
1566  return true;
1567 
1568  const size_t iend( min( column + N - row, M ) );
1569 
1570  for( size_t i=0UL; i<iend; ++i )
1571  {
1572  const bool containsDiagonal( row + i >= column );
1573  const size_t jbegin( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1574 
1575  for( size_t j=jbegin; j<N; ++j ) {
1576  if( !isDefault( (~rhs)(i,j) ) )
1577  return false;
1578  }
1579  }
1580 
1581  return true;
1582 }
1584 //*************************************************************************************************
1585 
1586 
1587 //*************************************************************************************************
1604 template< typename MT1 // Type of the adapted matrix
1605  , bool SO // Storage order of the adapted matrix
1606  , bool DF // Density flag
1607  , typename MT2 > // Type of the right-hand side dense matrix
1608 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1609  const DenseMatrix<MT2,true>& rhs, size_t row, size_t column )
1610 {
1612 
1613  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1614  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1615  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1616  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1617 
1618  UNUSED_PARAMETER( lhs );
1619 
1620  const size_t M( (~rhs).rows() );
1621  const size_t N( (~rhs).columns() );
1622 
1623  if( row >= column + N )
1624  return true;
1625 
1626  const size_t jbegin( ( row <= column )?( 0UL ):( row - column ) );
1627 
1628  for( size_t j=jbegin; j<N; ++j )
1629  {
1630  const size_t iend( min( column + j - row + 1UL, M ) );
1631 
1632  for( size_t i=0UL; i<iend; ++i ) {
1633  if( !isDefault( (~rhs)(i,j) ) )
1634  return false;
1635  }
1636  }
1637 
1638  return true;
1639 }
1641 //*************************************************************************************************
1642 
1643 
1644 //*************************************************************************************************
1661 template< typename MT1 // Type of the adapted matrix
1662  , bool SO // Storage order of the adapted matrix
1663  , bool DF // Density flag
1664  , typename MT2 > // Type of the right-hand side sparse matrix
1665 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1666  const SparseMatrix<MT2,false>& rhs, size_t row, size_t column )
1667 {
1669 
1670  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1671  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1672  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1673  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1674 
1675  UNUSED_PARAMETER( lhs );
1676 
1677  using RhsIterator = typename MT2::ConstIterator;
1678 
1679  const size_t M( (~rhs).rows() );
1680  const size_t N( (~rhs).columns() );
1681 
1682  if( row >= column + N )
1683  return true;
1684 
1685  const size_t iend( min( column + N - row, M ) );
1686 
1687  for( size_t i=0UL; i<iend; ++i )
1688  {
1689  const bool containsDiagonal( row + i >= column );
1690  const size_t index( ( containsDiagonal )?( row + i - column ):( 0UL ) );
1691 
1692  const RhsIterator last( (~rhs).end(i) );
1693  RhsIterator element( (~rhs).lowerBound( i, index ) );
1694 
1695  for( ; element!=last; ++element ) {
1696  if( !isDefault( element->value() ) )
1697  return false;
1698  }
1699  }
1700 
1701  return true;
1702 }
1704 //*************************************************************************************************
1705 
1706 
1707 //*************************************************************************************************
1724 template< typename MT1 // Type of the adapted matrix
1725  , bool SO // Storage order of the adapted matrix
1726  , bool DF // Density flag
1727  , typename MT2 > // Type of the right-hand side sparse matrix
1728 inline bool tryAddAssign( const UniLowerMatrix<MT1,SO,DF>& lhs,
1729  const SparseMatrix<MT2,true>& rhs, size_t row, size_t column )
1730 {
1732 
1733  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1734  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1735  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
1736  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
1737 
1738  UNUSED_PARAMETER( lhs );
1739 
1740  using RhsIterator = typename MT2::ConstIterator;
1741 
1742  const size_t M( (~rhs).rows() );
1743  const size_t N( (~rhs).columns() );
1744 
1745  if( row >= column + N )
1746  return true;
1747 
1748  const size_t jbegin( ( row < column )?( 0UL ):( row - column ) );
1749 
1750  for( size_t j=jbegin; j<N; ++j )
1751  {
1752  const size_t index( column + j - row + 1UL );
1753  const RhsIterator last( (~rhs).lowerBound( min( index, M ), j ) );
1754 
1755  for( RhsIterator element=(~rhs).begin(j); element!=last; ++element ) {
1756  if( !isDefault( element->value() ) )
1757  return false;
1758  }
1759  }
1760 
1761  return true;
1762 }
1764 //*************************************************************************************************
1765 
1766 
1767 //*************************************************************************************************
1784 template< typename MT // Type of the adapted matrix
1785  , bool SO // Storage order of the adapted matrix
1786  , bool DF // Density flag
1787  , typename VT // Type of the right-hand side vector
1788  , bool TF > // Transpose flag of the right-hand side vector
1789 inline bool trySubAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1790  const Vector<VT,TF>& rhs, size_t row, size_t column )
1791 {
1792  return tryAddAssign( lhs, ~rhs, row, column );
1793 }
1795 //*************************************************************************************************
1796 
1797 
1798 //*************************************************************************************************
1816 template< typename MT // Type of the adapted matrix
1817  , bool SO // Storage order of the adapted matrix
1818  , bool DF // Density flag
1819  , typename VT // Type of the right-hand side vector
1820  , bool TF > // Transpose flag of the right-hand side vector
1821 inline bool trySubAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
1822  ptrdiff_t band, size_t row, size_t column )
1823 {
1824  return tryAddAssign( lhs, ~rhs, band, row, column );
1825 }
1827 //*************************************************************************************************
1828 
1829 
1830 //*************************************************************************************************
1847 template< typename MT1 // Type of the adapted matrix
1848  , bool SO1 // Storage order of the adapted matrix
1849  , bool DF // Density flag
1850  , typename MT2 // Type of the right-hand side matrix
1851  , bool SO2 > // Storage order of the right-hand side matrix
1852 inline bool trySubAssign( const UniLowerMatrix<MT1,SO1,DF>& lhs,
1853  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
1854 {
1855  return tryAddAssign( lhs, ~rhs, row, column );
1856 }
1858 //*************************************************************************************************
1859 
1860 
1861 //*************************************************************************************************
1878 template< typename MT // Type of the adapted matrix
1879  , bool SO // Storage order of the adapted matrix
1880  , bool DF // Density flag
1881  , typename VT > // Type of the right-hand side vector
1882 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1883  const Vector<VT,false>& rhs, size_t row, size_t column )
1884 {
1886 
1887  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1888  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1889  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1890 
1891  UNUSED_PARAMETER( lhs );
1892 
1893  return ( column < row || (~rhs).size() <= column - row || isOne( (~rhs)[column-row] ) );
1894 }
1896 //*************************************************************************************************
1897 
1898 
1899 //*************************************************************************************************
1916 template< typename MT // Type of the adapted matrix
1917  , bool SO // Storage order of the adapted matrix
1918  , bool DF // Density flag
1919  , typename VT > // Type of the right-hand side vector
1920 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
1921  const Vector<VT,true>& rhs, size_t row, size_t column )
1922 {
1924 
1925  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1926  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1927  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1928 
1929  UNUSED_PARAMETER( lhs );
1930 
1931  return ( row < column || (~rhs).size() <= row - column || isOne( (~rhs)[row-column] ) );
1932 }
1934 //*************************************************************************************************
1935 
1936 
1937 //*************************************************************************************************
1954 template< typename MT // Type of the adapted matrix
1955  , bool SO // Storage order of the adapted matrix
1956  , bool DF // Density flag
1957  , typename VT // Type of the right-hand side dense vector
1958  , bool TF > // Transpose flag of the right-hand side dense vector
1959 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const DenseVector<VT,TF>& rhs,
1960  ptrdiff_t band, size_t row, size_t column )
1961 {
1963 
1964  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
1965  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
1966  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
1967  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
1968 
1969  UNUSED_PARAMETER( lhs, row, column );
1970 
1971  if( band == 0L ) {
1972  for( size_t i=0UL; i<(~rhs).size(); ++i ) {
1973  if( !isOne( (~rhs)[i] ) )
1974  return false;
1975  }
1976  }
1977 
1978  return true;
1979 }
1981 //*************************************************************************************************
1982 
1983 
1984 //*************************************************************************************************
2001 template< typename MT // Type of the adapted matrix
2002  , bool SO // Storage order of the adapted matrix
2003  , bool DF // Density flag
2004  , typename VT // Type of the right-hand side sparse vector
2005  , bool TF > // Transpose flag of the right-hand side sparse vector
2006 inline bool tryMultAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const SparseVector<VT,TF>& rhs,
2007  ptrdiff_t band, size_t row, size_t column )
2008 {
2010 
2011  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
2012  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
2013  BLAZE_INTERNAL_ASSERT( row + (~rhs).size() <= lhs.rows(), "Invalid number of rows" );
2014  BLAZE_INTERNAL_ASSERT( column + (~rhs).size() <= lhs.columns(), "Invalid number of columns" );
2015 
2016  UNUSED_PARAMETER( lhs, row, column );
2017 
2018  if( band == 0L ) {
2019  if( (~rhs).nonZeros() != (~rhs).size() )
2020  return false;
2021  for( const auto& element : ~rhs ) {
2022  if( !isOne( element.value() ) )
2023  return false;
2024  }
2025  }
2026 
2027  return true;
2028 }
2030 //*************************************************************************************************
2031 
2032 
2033 //*************************************************************************************************
2050 template< typename MT1 // Type of the adapted matrix
2051  , bool SO1 // Storage order of the adapted matrix
2052  , bool DF // Density flag
2053  , typename MT2 // Type of the right-hand side matrix
2054  , bool SO2 > // Storage order of the right-hand side matrix
2055 inline bool trySchurAssign( const UniLowerMatrix<MT1,SO1,DF>& lhs,
2056  const Matrix<MT2,SO2>& rhs, size_t row, size_t column )
2057 {
2059 
2060  BLAZE_INTERNAL_ASSERT( row <= lhs.rows(), "Invalid row access index" );
2061  BLAZE_INTERNAL_ASSERT( column <= lhs.columns(), "Invalid column access index" );
2062  BLAZE_INTERNAL_ASSERT( row + (~rhs).rows() <= lhs.rows(), "Invalid number of rows" );
2063  BLAZE_INTERNAL_ASSERT( column + (~rhs).columns() <= lhs.columns(), "Invalid number of columns" );
2064 
2065  UNUSED_PARAMETER( lhs );
2066 
2067  const size_t M( (~rhs).rows() );
2068  const size_t N( (~rhs).columns() );
2069 
2070  if( ( row >= column + N ) || ( column >= row + M ) )
2071  return true;
2072 
2073  size_t i( row < column ? column - row : 0UL );
2074  size_t j( column < row ? row - column : 0UL );
2075 
2076  for( ; i<M && j<N; ++i, ++j )
2077  {
2078  if( !isOne( (~rhs)(i,j) ) )
2079  return false;
2080  }
2081 
2082  return true;
2083 }
2085 //*************************************************************************************************
2086 
2087 
2088 //*************************************************************************************************
2104 template< typename MT // Type of the adapted matrix
2105  , bool SO // Storage order of the adapted matrix
2106  , bool DF // Density flag
2107  , typename VT // Type of the right-hand side vector
2108  , bool TF > // Transpose flag of the right-hand side vector
2109 inline bool tryDivAssign( const UniLowerMatrix<MT,SO,DF>& lhs,
2110  const Vector<VT,TF>& rhs, size_t row, size_t column )
2111 {
2112  return tryMultAssign( lhs, ~rhs, row, column );
2113 }
2115 //*************************************************************************************************
2116 
2117 
2118 //*************************************************************************************************
2135 template< typename MT // Type of the adapted matrix
2136  , bool SO // Storage order of the adapted matrix
2137  , bool DF // Density flag
2138  , typename VT // Type of the right-hand side vector
2139  , bool TF > // Transpose flag of the right-hand side vector
2140 inline bool tryDivAssign( const UniLowerMatrix<MT,SO,DF>& lhs, const Vector<VT,TF>& rhs,
2141  ptrdiff_t band, size_t row, size_t column )
2142 {
2143  return tryMultAssign( lhs, rhs, band, row, column );
2144 }
2146 //*************************************************************************************************
2147 
2148 
2149 //*************************************************************************************************
2163 template< typename MT // Type of the adapted matrix
2164  , bool SO // Storage order of the adapted matrix
2165  , bool DF > // Density flag
2166 inline MT& derestrict( UniLowerMatrix<MT,SO,DF>& m )
2167 {
2168  return m.matrix_;
2169 }
2171 //*************************************************************************************************
2172 
2173 
2174 
2175 
2176 //=================================================================================================
2177 //
2178 // SIZE SPECIALIZATIONS
2179 //
2180 //=================================================================================================
2181 
2182 //*************************************************************************************************
2184 template< typename MT, bool SO, bool DF >
2185 struct Size< UniLowerMatrix<MT,SO,DF>, 0UL >
2186  : public Size<MT,0UL>
2187 {};
2188 
2189 template< typename MT, bool SO, bool DF >
2190 struct Size< UniLowerMatrix<MT,SO,DF>, 1UL >
2191  : public Size<MT,1UL>
2192 {};
2194 //*************************************************************************************************
2195 
2196 
2197 
2198 
2199 //=================================================================================================
2200 //
2201 // ISSQUARE SPECIALIZATIONS
2202 //
2203 //=================================================================================================
2204 
2205 //*************************************************************************************************
2207 template< typename MT, bool SO, bool DF >
2208 struct IsSquare< UniLowerMatrix<MT,SO,DF> >
2209  : public TrueType
2210 {};
2212 //*************************************************************************************************
2213 
2214 
2215 
2216 
2217 //=================================================================================================
2218 //
2219 // ISUNILOWER SPECIALIZATIONS
2220 //
2221 //=================================================================================================
2222 
2223 //*************************************************************************************************
2225 template< typename MT, bool SO, bool DF >
2226 struct IsUniLower< UniLowerMatrix<MT,SO,DF> >
2227  : public TrueType
2228 {};
2230 //*************************************************************************************************
2231 
2232 
2233 
2234 
2235 //=================================================================================================
2236 //
2237 // ISADAPTOR SPECIALIZATIONS
2238 //
2239 //=================================================================================================
2240 
2241 //*************************************************************************************************
2243 template< typename MT, bool SO, bool DF >
2244 struct IsAdaptor< UniLowerMatrix<MT,SO,DF> >
2245  : public TrueType
2246 {};
2248 //*************************************************************************************************
2249 
2250 
2251 
2252 
2253 //=================================================================================================
2254 //
2255 // ISRESTRICTED SPECIALIZATIONS
2256 //
2257 //=================================================================================================
2258 
2259 //*************************************************************************************************
2261 template< typename MT, bool SO, bool DF >
2262 struct IsRestricted< UniLowerMatrix<MT,SO,DF> >
2263  : public TrueType
2264 {};
2266 //*************************************************************************************************
2267 
2268 
2269 
2270 
2271 //=================================================================================================
2272 //
2273 // HASCONSTDATAACCESS SPECIALIZATIONS
2274 //
2275 //=================================================================================================
2276 
2277 //*************************************************************************************************
2279 template< typename MT, bool SO >
2280 struct HasConstDataAccess< UniLowerMatrix<MT,SO,true> >
2281  : public TrueType
2282 {};
2284 //*************************************************************************************************
2285 
2286 
2287 
2288 
2289 //=================================================================================================
2290 //
2291 // ISALIGNED SPECIALIZATIONS
2292 //
2293 //=================================================================================================
2294 
2295 //*************************************************************************************************
2297 template< typename MT, bool SO, bool DF >
2298 struct IsAligned< UniLowerMatrix<MT,SO,DF> >
2299  : public IsAligned<MT>
2300 {};
2302 //*************************************************************************************************
2303 
2304 
2305 
2306 
2307 //=================================================================================================
2308 //
2309 // ISCONTIGUOUS SPECIALIZATIONS
2310 //
2311 //=================================================================================================
2312 
2313 //*************************************************************************************************
2315 template< typename MT, bool SO, bool DF >
2316 struct IsContiguous< UniLowerMatrix<MT,SO,DF> >
2317  : public IsContiguous<MT>
2318 {};
2320 //*************************************************************************************************
2321 
2322 
2323 
2324 
2325 //=================================================================================================
2326 //
2327 // ISPADDED SPECIALIZATIONS
2328 //
2329 //=================================================================================================
2330 
2331 //*************************************************************************************************
2333 template< typename MT, bool SO, bool DF >
2334 struct IsPadded< UniLowerMatrix<MT,SO,DF> >
2335  : public IsPadded<MT>
2336 {};
2338 //*************************************************************************************************
2339 
2340 
2341 
2342 
2343 //=================================================================================================
2344 //
2345 // ISRESIZABLE SPECIALIZATIONS
2346 //
2347 //=================================================================================================
2348 
2349 //*************************************************************************************************
2351 template< typename MT, bool SO, bool DF >
2352 struct IsResizable< UniLowerMatrix<MT,SO,DF> >
2353  : public IsResizable<MT>
2354 {};
2356 //*************************************************************************************************
2357 
2358 
2359 
2360 
2361 //=================================================================================================
2362 //
2363 // ISSHRINKABLE SPECIALIZATIONS
2364 //
2365 //=================================================================================================
2366 
2367 //*************************************************************************************************
2369 template< typename MT, bool SO, bool DF >
2370 struct IsShrinkable< UniLowerMatrix<MT,SO,DF> >
2371  : public IsShrinkable<MT>
2372 {};
2374 //*************************************************************************************************
2375 
2376 
2377 
2378 
2379 //=================================================================================================
2380 //
2381 // REMOVEADAPTOR SPECIALIZATIONS
2382 //
2383 //=================================================================================================
2384 
2385 //*************************************************************************************************
2387 template< typename MT, bool SO, bool DF >
2388 struct RemoveAdaptor< UniLowerMatrix<MT,SO,DF> >
2389 {
2390  using Type = MT;
2391 };
2393 //*************************************************************************************************
2394 
2395 
2396 
2397 
2398 //=================================================================================================
2399 //
2400 // ADDTRAIT SPECIALIZATIONS
2401 //
2402 //=================================================================================================
2403 
2404 //*************************************************************************************************
2406 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2407 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2408 {
2410 };
2411 
2412 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2413 struct AddTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2414 {
2415  using Type = AddTrait_< StaticMatrix<T,M,N,SO1>, MT >;
2416 };
2417 
2418 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2419 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2420 {
2422 };
2423 
2424 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2425 struct AddTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2426 {
2427  using Type = AddTrait_< HybridMatrix<T,M,N,SO1>, MT >;
2428 };
2429 
2430 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2431 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2432 {
2433  using Type = AddTrait_< MT, DynamicMatrix<T,SO2> >;
2434 };
2435 
2436 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2437 struct AddTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2438 {
2439  using Type = AddTrait_< DynamicMatrix<T,SO1>, MT >;
2440 };
2441 
2442 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2443 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2444 {
2446 };
2447 
2448 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2449 struct AddTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
2450 {
2451  using Type = AddTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2452 };
2453 
2454 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2455 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2456 {
2458 };
2459 
2460 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2461 struct AddTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2462 {
2463  using Type = AddTrait_< CompressedMatrix<T,SO1>, MT >;
2464 };
2465 
2466 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2467 struct AddTrait< UniLowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2468 {
2470 };
2471 
2472 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2473 struct AddTrait< IdentityMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2474 {
2475  using Type = LowerMatrix< AddTrait_< IdentityMatrix<T,SO1>, MT > >;
2476 };
2477 
2478 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2479 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2480 {
2481  using Type = AddTrait_<MT1,MT2>;
2482 };
2483 
2484 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2485 struct AddTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
2486 {
2487  using Type = AddTrait_<MT1,MT2>;
2488 };
2489 
2490 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2491 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2492 {
2493  using Type = AddTrait_<MT1,MT2>;
2494 };
2495 
2496 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2497 struct AddTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2498 {
2499  using Type = AddTrait_<MT1,MT2>;
2500 };
2501 
2502 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2503 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2504 {
2505  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
2506 };
2507 
2508 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2509 struct AddTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2510 {
2511  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
2512 };
2513 
2514 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2515 struct AddTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2516 {
2517  using Type = LowerMatrix< AddTrait_<MT1,MT2> >;
2518 };
2520 //*************************************************************************************************
2521 
2522 
2523 
2524 
2525 //=================================================================================================
2526 //
2527 // SUBTRAIT SPECIALIZATIONS
2528 //
2529 //=================================================================================================
2530 
2531 //*************************************************************************************************
2533 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2534 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2535 {
2537 };
2538 
2539 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2540 struct SubTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2541 {
2542  using Type = SubTrait_< StaticMatrix<T,M,N,SO1>, MT >;
2543 };
2544 
2545 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2546 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2547 {
2549 };
2550 
2551 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2552 struct SubTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2553 {
2554  using Type = SubTrait_< HybridMatrix<T,M,N,SO1>, MT >;
2555 };
2556 
2557 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2558 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2559 {
2560  using Type = SubTrait_< MT, DynamicMatrix<T,SO2> >;
2561 };
2562 
2563 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2564 struct SubTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2565 {
2566  using Type = SubTrait_< DynamicMatrix<T,SO1>, MT >;
2567 };
2568 
2569 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2570 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2571 {
2573 };
2574 
2575 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2576 struct SubTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
2577 {
2578  using Type = SubTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2579 };
2580 
2581 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2582 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2583 {
2585 };
2586 
2587 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2588 struct SubTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2589 {
2590  using Type = SubTrait_< CompressedMatrix<T,SO1>, MT >;
2591 };
2592 
2593 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2594 struct SubTrait< UniLowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2595 {
2597 };
2598 
2599 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2600 struct SubTrait< IdentityMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2601 {
2603 };
2604 
2605 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2606 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2607 {
2608  using Type = SubTrait_<MT1,MT2>;
2609 };
2610 
2611 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2612 struct SubTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
2613 {
2614  using Type = SubTrait_<MT1,MT2>;
2615 };
2616 
2617 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2618 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2619 {
2620  using Type = SubTrait_<MT1,MT2>;
2621 };
2622 
2623 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2624 struct SubTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2625 {
2626  using Type = SubTrait_<MT1,MT2>;
2627 };
2628 
2629 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2630 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2631 {
2632  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
2633 };
2634 
2635 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2636 struct SubTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2637 {
2638  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
2639 };
2640 
2641 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2642 struct SubTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2643 {
2644  using Type = LowerMatrix< SubTrait_<MT1,MT2> >;
2645 };
2647 //*************************************************************************************************
2648 
2649 
2650 
2651 
2652 //=================================================================================================
2653 //
2654 // SCHURTRAIT SPECIALIZATIONS
2655 //
2656 //=================================================================================================
2657 
2658 //*************************************************************************************************
2660 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2661 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2662 {
2664 };
2665 
2666 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2667 struct SchurTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2668 {
2670 };
2671 
2672 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2673 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2674 {
2676 };
2677 
2678 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2679 struct SchurTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2680 {
2682 };
2683 
2684 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2685 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2686 {
2688 };
2689 
2690 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2691 struct SchurTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2692 {
2694 };
2695 
2696 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2697 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2698 {
2700 };
2701 
2702 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2703 struct SchurTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
2704 {
2706 };
2707 
2708 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2709 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2710 {
2712 };
2713 
2714 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2715 struct SchurTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2716 {
2718 };
2719 
2720 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2721 struct SchurTrait< UniLowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2722 {
2723  using Type = IdentityMatrix< MultTrait_< ElementType_<MT>, T >, SO2 >;
2724 };
2725 
2726 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2727 struct SchurTrait< IdentityMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2728 {
2730 };
2731 
2732 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2733 struct SchurTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2734 {
2735  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2736 };
2737 
2738 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2739 struct SchurTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
2740 {
2741  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2742 };
2743 
2744 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2745 struct SchurTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2746 {
2747  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2748 };
2749 
2750 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2751 struct SchurTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2752 {
2753  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2754 };
2755 
2756 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2757 struct SchurTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2758 {
2759  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2760 };
2761 
2762 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2763 struct SchurTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2764 {
2765  using Type = LowerMatrix< SchurTrait_<MT1,MT2> >;
2766 };
2767 
2768 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2769 struct SchurTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2770 {
2771  using Type = UniLowerMatrix< SchurTrait_<MT1,MT2> >;
2772 };
2774 //*************************************************************************************************
2775 
2776 
2777 
2778 
2779 //=================================================================================================
2780 //
2781 // MULTTRAIT SPECIALIZATIONS
2782 //
2783 //=================================================================================================
2784 
2785 //*************************************************************************************************
2787 template< typename MT, bool SO, bool DF, typename T >
2788 struct MultTrait< UniLowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
2789 {
2790  using Type = LowerMatrix< MultTrait_<MT,T> >;
2791 };
2792 
2793 template< typename T, typename MT, bool SO, bool DF >
2794 struct MultTrait< T, UniLowerMatrix<MT,SO,DF>, EnableIf_< IsNumeric<T> > >
2795 {
2796  using Type = LowerMatrix< MultTrait_<T,MT> >;
2797 };
2798 
2799 template< typename MT, bool SO, bool DF, typename T, size_t N >
2800 struct MultTrait< UniLowerMatrix<MT,SO,DF>, StaticVector<T,N,false> >
2801 {
2803 };
2804 
2805 template< typename T, size_t N, typename MT, bool SO, bool DF >
2806 struct MultTrait< StaticVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
2807 {
2808  using Type = MultTrait_< StaticVector<T,N,true>, MT >;
2809 };
2810 
2811 template< typename MT, bool SO, bool DF, typename T, size_t N >
2812 struct MultTrait< UniLowerMatrix<MT,SO,DF>, HybridVector<T,N,false> >
2813 {
2815 };
2816 
2817 template< typename T, size_t N, typename MT, bool SO, bool DF >
2818 struct MultTrait< HybridVector<T,N,true>, UniLowerMatrix<MT,SO,DF> >
2819 {
2820  using Type = MultTrait_< HybridVector<T,N,true>, MT >;
2821 };
2822 
2823 template< typename MT, bool SO, bool DF, typename T >
2824 struct MultTrait< UniLowerMatrix<MT,SO,DF>, DynamicVector<T,false> >
2825 {
2827 };
2828 
2829 template< typename T, typename MT, bool SO, bool DF >
2830 struct MultTrait< DynamicVector<T,true>, UniLowerMatrix<MT,SO,DF> >
2831 {
2832  using Type = MultTrait_< DynamicVector<T,true>, MT >;
2833 };
2834 
2835 template< typename MT, bool SO, bool DF, typename T, bool AF, bool PF >
2836 struct MultTrait< UniLowerMatrix<MT,SO,DF>, CustomVector<T,AF,PF,false> >
2837 {
2839 };
2840 
2841 template< typename T, bool AF, bool PF, typename MT, bool SO, bool DF >
2842 struct MultTrait< CustomVector<T,AF,PF,true>, UniLowerMatrix<MT,SO,DF> >
2843 {
2844  using Type = MultTrait_< CustomVector<T,AF,PF,true>, MT >;
2845 };
2846 
2847 template< typename MT, bool SO, bool DF, typename T >
2848 struct MultTrait< UniLowerMatrix<MT,SO,DF>, CompressedVector<T,false> >
2849 {
2851 };
2852 
2853 template< typename T, typename MT, bool SO, bool DF >
2854 struct MultTrait< CompressedVector<T,true>, UniLowerMatrix<MT,SO,DF> >
2855 {
2856  using Type = MultTrait_< CompressedVector<T,true>, MT >;
2857 };
2858 
2859 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2860 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, StaticMatrix<T,M,N,SO2> >
2861 {
2863 };
2864 
2865 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2866 struct MultTrait< StaticMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2867 {
2868  using Type = MultTrait_< StaticMatrix<T,M,N,SO1>, MT >;
2869 };
2870 
2871 template< typename MT, bool SO1, bool DF, typename T, size_t M, size_t N, bool SO2 >
2872 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, HybridMatrix<T,M,N,SO2> >
2873 {
2875 };
2876 
2877 template< typename T, size_t M, size_t N, bool SO1, typename MT, bool SO2, bool DF >
2878 struct MultTrait< HybridMatrix<T,M,N,SO1>, UniLowerMatrix<MT,SO2,DF> >
2879 {
2880  using Type = MultTrait_< HybridMatrix<T,M,N,SO1>, MT >;
2881 };
2882 
2883 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2884 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, DynamicMatrix<T,SO2> >
2885 {
2886  using Type = MultTrait_< MT, DynamicMatrix<T,SO2> >;
2887 };
2888 
2889 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2890 struct MultTrait< DynamicMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2891 {
2892  using Type = MultTrait_< DynamicMatrix<T,SO1>, MT >;
2893 };
2894 
2895 template< typename MT, bool SO1, bool DF, typename T, bool AF, bool PF, bool SO2 >
2896 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, CustomMatrix<T,AF,PF,SO2> >
2897 {
2899 };
2900 
2901 template< typename T, bool AF, bool PF, bool SO1, typename MT, bool SO2, bool DF >
2902 struct MultTrait< CustomMatrix<T,AF,PF,SO1>, UniLowerMatrix<MT,SO2,DF> >
2903 {
2904  using Type = MultTrait_< CustomMatrix<T,AF,PF,SO1>, MT >;
2905 };
2906 
2907 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2908 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, CompressedMatrix<T,SO2> >
2909 {
2911 };
2912 
2913 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2914 struct MultTrait< CompressedMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2915 {
2916  using Type = MultTrait_< CompressedMatrix<T,SO1>, MT >;
2917 };
2918 
2919 template< typename MT, bool SO1, bool DF, typename T, bool SO2 >
2920 struct MultTrait< UniLowerMatrix<MT,SO1,DF>, IdentityMatrix<T,SO2> >
2921 {
2923 };
2924 
2925 template< typename T, bool SO1, typename MT, bool SO2, bool DF >
2926 struct MultTrait< IdentityMatrix<T,SO1>, UniLowerMatrix<MT,SO2,DF> >
2927 {
2929 };
2930 
2931 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2, bool NF >
2932 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, SymmetricMatrix<MT2,SO2,DF2,NF> >
2933 {
2934  using Type = MultTrait_<MT1,MT2>;
2935 };
2936 
2937 template< typename MT1, bool SO1, bool DF1, bool NF, typename MT2, bool SO2, bool DF2 >
2938 struct MultTrait< SymmetricMatrix<MT1,SO1,DF1,NF>, UniLowerMatrix<MT2,SO2,DF2> >
2939 {
2940  using Type = MultTrait_<MT1,MT2>;
2941 };
2942 
2943 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2944 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, HermitianMatrix<MT2,SO2,DF2> >
2945 {
2946  using Type = MultTrait_<MT1,MT2>;
2947 };
2948 
2949 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2950 struct MultTrait< HermitianMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2951 {
2952  using Type = MultTrait_<MT1,MT2>;
2953 };
2954 
2955 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2956 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2> >
2957 {
2958  using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
2959 };
2960 
2961 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2962 struct MultTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2963 {
2964  using Type = LowerMatrix< MultTrait_<MT1,MT2> >;
2965 };
2966 
2967 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
2968 struct MultTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
2969 {
2970  using Type = UniLowerMatrix< MultTrait_<MT1,MT2> >;
2971 };
2973 //*************************************************************************************************
2974 
2975 
2976 
2977 
2978 //=================================================================================================
2979 //
2980 // DIVTRAIT SPECIALIZATIONS
2981 //
2982 //=================================================================================================
2983 
2984 //*************************************************************************************************
2986 template< typename MT, bool SO, bool DF, typename T >
2987 struct DivTrait< UniLowerMatrix<MT,SO,DF>, T, EnableIf_< IsNumeric<T> > >
2988 {
2989  using Type = LowerMatrix< DivTrait_<MT,T> >;
2990 };
2992 //*************************************************************************************************
2993 
2994 
2995 
2996 
2997 //=================================================================================================
2998 //
2999 // UNARYMAPTRAIT SPECIALIZATIONS
3000 //
3001 //=================================================================================================
3002 
3003 //*************************************************************************************************
3005 template< typename MT, bool SO, bool DF >
3006 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Abs >
3007 {
3009 };
3010 
3011 template< typename MT, bool SO, bool DF >
3012 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Floor >
3013 {
3015 };
3016 
3017 template< typename MT, bool SO, bool DF >
3018 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Ceil >
3019 {
3021 };
3022 
3023 template< typename MT, bool SO, bool DF >
3024 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Trunc >
3025 {
3027 };
3028 
3029 template< typename MT, bool SO, bool DF >
3030 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Round >
3031 {
3033 };
3034 
3035 template< typename MT, bool SO, bool DF >
3036 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Conj >
3037 {
3039 };
3040 
3041 template< typename MT, bool SO, bool DF >
3042 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Real >
3043 {
3045 };
3046 
3047 template< typename MT, bool SO, bool DF >
3048 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Sqrt >
3049 {
3051 };
3052 
3053 template< typename MT, bool SO, bool DF >
3054 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, Cbrt >
3055 {
3057 };
3058 
3059 template< typename MT, bool SO, bool DF, typename ET >
3060 struct UnaryMapTrait< UniLowerMatrix<MT,SO,DF>, UnaryPow<ET> >
3061 {
3063 };
3065 //*************************************************************************************************
3066 
3067 
3068 
3069 
3070 //=================================================================================================
3071 //
3072 // BINARYMAPTRAIT SPECIALIZATIONS
3073 //
3074 //=================================================================================================
3075 
3076 //*************************************************************************************************
3078 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3079 struct BinaryMapTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2>, Min >
3080 {
3082 };
3083 
3084 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3085 struct BinaryMapTrait< UniLowerMatrix<MT1,SO1,DF1>, LowerMatrix<MT2,SO2,DF2>, Max >
3086 {
3088 };
3089 
3090 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3091 struct BinaryMapTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2>, Min >
3092 {
3094 };
3095 
3096 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3097 struct BinaryMapTrait< LowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2>, Max >
3098 {
3100 };
3101 
3102 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3103 struct BinaryMapTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2>, Min >
3104 {
3106 };
3107 
3108 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3109 struct BinaryMapTrait< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2>, Max >
3110 {
3112 };
3114 //*************************************************************************************************
3115 
3116 
3117 
3118 
3119 //=================================================================================================
3120 //
3121 // DECLSYMTRAIT SPECIALIZATIONS
3122 //
3123 //=================================================================================================
3124 
3125 //*************************************************************************************************
3127 template< typename MT, bool SO, bool DF >
3128 struct DeclSymTrait< UniLowerMatrix<MT,SO,DF> >
3129 {
3130  using Type = IdentityMatrix< ElementType_<MT>, SO >;
3131 };
3133 //*************************************************************************************************
3134 
3135 
3136 
3137 
3138 //=================================================================================================
3139 //
3140 // DECLHERMTRAIT SPECIALIZATIONS
3141 //
3142 //=================================================================================================
3143 
3144 //*************************************************************************************************
3146 template< typename MT, bool SO, bool DF >
3147 struct DeclHermTrait< UniLowerMatrix<MT,SO,DF> >
3148 {
3149  using Type = IdentityMatrix< ElementType_<MT>, SO >;
3150 };
3152 //*************************************************************************************************
3153 
3154 
3155 
3156 
3157 //=================================================================================================
3158 //
3159 // DECLLOWTRAIT SPECIALIZATIONS
3160 //
3161 //=================================================================================================
3162 
3163 //*************************************************************************************************
3165 template< typename MT, bool SO, bool DF >
3166 struct DeclLowTrait< UniLowerMatrix<MT,SO,DF> >
3167 {
3168  using Type = UniLowerMatrix<MT,SO,DF>;
3169 };
3171 //*************************************************************************************************
3172 
3173 
3174 
3175 
3176 //=================================================================================================
3177 //
3178 // DECLUPPTRAIT SPECIALIZATIONS
3179 //
3180 //=================================================================================================
3181 
3182 //*************************************************************************************************
3184 template< typename MT, bool SO, bool DF >
3185 struct DeclUppTrait< UniLowerMatrix<MT,SO,DF> >
3186 {
3187  using Type = IdentityMatrix< ElementType_<MT>, SO >;
3188 };
3190 //*************************************************************************************************
3191 
3192 
3193 
3194 
3195 //=================================================================================================
3196 //
3197 // DECLDIAGTRAIT SPECIALIZATIONS
3198 //
3199 //=================================================================================================
3200 
3201 //*************************************************************************************************
3203 template< typename MT, bool SO, bool DF >
3204 struct DeclDiagTrait< UniLowerMatrix<MT,SO,DF> >
3205 {
3206  using Type = IdentityMatrix< ElementType_<MT>, SO >;
3207 };
3209 //*************************************************************************************************
3210 
3211 
3212 
3213 
3214 //=================================================================================================
3215 //
3216 // HIGHTYPE SPECIALIZATIONS
3217 //
3218 //=================================================================================================
3219 
3220 //*************************************************************************************************
3222 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3223 struct HighType< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
3224 {
3226 };
3228 //*************************************************************************************************
3229 
3230 
3231 
3232 
3233 //=================================================================================================
3234 //
3235 // LOWTYPE SPECIALIZATIONS
3236 //
3237 //=================================================================================================
3238 
3239 //*************************************************************************************************
3241 template< typename MT1, bool SO1, bool DF1, typename MT2, bool SO2, bool DF2 >
3242 struct LowType< UniLowerMatrix<MT1,SO1,DF1>, UniLowerMatrix<MT2,SO2,DF2> >
3243 {
3245 };
3247 //*************************************************************************************************
3248 
3249 
3250 
3251 
3252 //=================================================================================================
3253 //
3254 // SUBMATRIXTRAIT SPECIALIZATIONS
3255 //
3256 //=================================================================================================
3257 
3258 //*************************************************************************************************
3260 template< typename MT, bool SO, bool DF, size_t... CSAs >
3261 struct SubmatrixTrait< UniLowerMatrix<MT,SO,DF>, CSAs... >
3262 {
3263  using Type = SubmatrixTrait_<MT,CSAs...>;
3264 };
3266 //*************************************************************************************************
3267 
3268 
3269 
3270 
3271 //=================================================================================================
3272 //
3273 // ROWTRAIT SPECIALIZATIONS
3274 //
3275 //=================================================================================================
3276 
3277 //*************************************************************************************************
3279 template< typename MT, bool SO, bool DF, size_t... CRAs >
3280 struct RowTrait< UniLowerMatrix<MT,SO,DF>, CRAs... >
3281 {
3282  using Type = RowTrait_<MT,CRAs...>;
3283 };
3285 //*************************************************************************************************
3286 
3287 
3288 
3289 
3290 //=================================================================================================
3291 //
3292 // ROWSTRAIT SPECIALIZATIONS
3293 //
3294 //=================================================================================================
3295 
3296 //*************************************************************************************************
3298 template< typename MT, bool SO, bool DF, size_t... CRAs >
3299 struct RowsTrait< UniLowerMatrix<MT,SO,DF>, CRAs... >
3300 {
3301  using Type = RowsTrait_<MT,CRAs...>;
3302 };
3304 //*************************************************************************************************
3305 
3306 
3307 
3308 
3309 //=================================================================================================
3310 //
3311 // COLUMNTRAIT SPECIALIZATIONS
3312 //
3313 //=================================================================================================
3314 
3315 //*************************************************************************************************
3317 template< typename MT, bool SO, bool DF, size_t... CCAs >
3318 struct ColumnTrait< UniLowerMatrix<MT,SO,DF>, CCAs... >
3319 {
3320  using Type = ColumnTrait_<MT,CCAs...>;
3321 };
3323 //*************************************************************************************************
3324 
3325 
3326 
3327 
3328 //=================================================================================================
3329 //
3330 // COLUMNSTRAIT SPECIALIZATIONS
3331 //
3332 //=================================================================================================
3333 
3334 //*************************************************************************************************
3336 template< typename MT, bool SO, bool DF, size_t... CCAs >
3337 struct ColumnsTrait< UniLowerMatrix<MT,SO,DF>, CCAs... >
3338 {
3339  using Type = ColumnsTrait_<MT,CCAs...>;
3340 };
3342 //*************************************************************************************************
3343 
3344 
3345 
3346 
3347 //=================================================================================================
3348 //
3349 // BANDTRAIT SPECIALIZATIONS
3350 //
3351 //=================================================================================================
3352 
3353 //*************************************************************************************************
3355 template< typename MT, bool SO, bool DF, ptrdiff_t... CBAs >
3356 struct BandTrait< UniLowerMatrix<MT,SO,DF>, CBAs... >
3357 {
3358  using Type = BandTrait_<MT,CBAs...>;
3359 };
3361 //*************************************************************************************************
3362 
3363 } // namespace blaze
3364 
3365 #endif
Pointer difference type of the Blaze library.
Header file for the implementation of the base template of the UniLowerMatrix.
Header file for auxiliary alias declarations.
decltype(auto) column(Matrix< MT, SO > &matrix, RCAs... args)
Creating a view on a specific column of the given matrix.
Definition: Column.h:131
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 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.
Header file for the declherm trait.
Base template for the SubmatrixTrait class.
Definition: SubmatrixTrait.h:109
Flag for the inversion of a upper unitriangular matrix.
Definition: InversionFlag.h:114
Base template for the ColumnTrait class.
Definition: ColumnTrait.h:108
Flag for the inversion of a lower unitriangular matrix.
Definition: InversionFlag.h:112
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:113
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: BaseTemplate.h:553
Header file for the dense matrix inversion flags.
Base template for the SchurTrait class.
Definition: SchurTrait.h:112
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:364
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1903
#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:291
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:560
typename SubmatrixTrait< MT, CSAs... >::Type SubmatrixTrait_
Auxiliary alias declaration for the SubmatrixTrait type trait.The SubmatrixTrait_ alias declaration p...
Definition: SubmatrixTrait.h:145
Constraint on the data type.
Header file for the IsUniLower type trait.
typename RowTrait< MT, CRAs... >::Type RowTrait_
Auxiliary alias declaration for the RowTrait type trait.The RowTrait_ alias declaration provides a co...
Definition: RowTrait.h:145
Base template for the RowsTrait class.
Definition: RowsTrait.h:109
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:80
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
Header file for the band trait.
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1827
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:772
Base template for the RowTrait class.
Definition: RowTrait.h:109
Flag for the inversion of a upper triangular matrix.
Definition: InversionFlag.h:113
Compile time check for the memory layout of data types.This type trait tests whether the given data t...
Definition: IsContiguous.h:86
Constraint on the data type.
typename ColumnTrait< MT, CCAs... >::Type ColumnTrait_
Auxiliary alias declaration for the ColumnTrait type trait.The ColumnTrait_ alias declaration provide...
Definition: ColumnTrait.h:144
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.
typename ColumnsTrait< MT, CCAs... >::Type ColumnsTrait_
Auxiliary alias declaration for the ColumnsTrait type trait.The ColumnsTrait_ alias declaration provi...
Definition: ColumnsTrait.h:145
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Flag for the LU-based matrix inversion.
Definition: InversionFlag.h:103
Header file for the IsShrinkable type trait.
UniLowerMatrix specialization for dense matrices.
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:221
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3085
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:76
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:506
Base template for the DeclSymTrait class.
Definition: DeclSymTrait.h:113
#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:714
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:430
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
typename BandTrait< MT, CBAs... >::Type BandTrait_
Auxiliary alias declaration for the BandTrait type trait.The BandTrait_ alias declaration provides a ...
Definition: BandTrait.h:145
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
Header file for the IsPadded type trait.
Header file for the IsAdaptor type trait.
decltype(auto) band(Matrix< MT, SO > &matrix, RBAs... args)
Creating a view on a specific band of the given matrix.
Definition: Band.h:134
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
typename RowsTrait< MT, CRAs... >::Type RowsTrait_
Auxiliary alias declaration for the RowsTrait type trait.The RowsTrait_ alias declaration provides a ...
Definition: RowsTrait.h:145
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.
#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:119
Base template for the DeclHermTrait class.
Definition: DeclHermTrait.h:113
Base template for the MultTrait class.
Definition: MultTrait.h:119
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
Header file for the IsContiguous type trait.
Header file for the columns trait.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:131
#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.
Matrix adapter for strictly lower triangular matrices.
Definition: BaseTemplate.h:558
bool isOne(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 1.
Definition: DiagonalProxy.h:690
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:272
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
Base template for the DivTrait class.
Definition: DivTrait.h:120
Header file for the rows trait.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:490
Base template for the DeclLowTrait class.
Definition: DeclLowTrait.h:113
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 template for the ColumnsTrait class.
Definition: ColumnsTrait.h:109
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:291
Compile time evaluation of the size of vectors and matrices.The Size type trait evaluates the size of...
Definition: Size.h:80
Base class for sparse vectors.The SparseVector class is a base class for all arbitrarily sized (N-dim...
Definition: Forward.h:130
Matrix adapter for lower unitriangular matrices.
Definition: BaseTemplate.h:577
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:254
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:628
#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:119
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Base template for the DeclDiagTrait class.
Definition: DeclDiagTrait.h:113
Base template for the BinaryMapTrait class.
Definition: BinaryMapTrait.h:97
Header file for the IsResizable type trait.
Header file for the IsRestricted type trait.
Base template for the UnaryMapTrait class.
Definition: UnaryMapTrait.h:95
Header file for the Size type trait.
typename AddTrait< T1, T2 >::Type AddTrait_
Auxiliary alias declaration for the AddTrait class template.The AddTrait_ alias declaration provides ...
Definition: AddTrait.h:291
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.
Base template for the BandTrait class.
Definition: BandTrait.h:109