DenseMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_DENSE_DENSEMATRIX_H_
36 #define _BLAZE_MATH_DENSE_DENSEMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
49 #include <blaze/math/shims/Equal.h>
51 #include <blaze/math/shims/IsNaN.h>
52 #include <blaze/math/shims/IsOne.h>
72 #include <blaze/util/Assert.h>
73 #include <blaze/util/EnableIf.h>
74 #include <blaze/util/FalseType.h>
75 #include <blaze/util/mpl/If.h>
76 #include <blaze/util/TrueType.h>
77 #include <blaze/util/Types.h>
81 
82 
83 namespace blaze {
84 
85 //=================================================================================================
86 //
87 // GLOBAL OPERATORS
88 //
89 //=================================================================================================
90 
91 //*************************************************************************************************
94 template< typename T1, typename T2 >
95 inline bool operator==( const DenseMatrix<T1,false>& lhs, const DenseMatrix<T2,false>& rhs );
96 
97 template< typename T1, typename T2 >
98 inline bool operator==( const DenseMatrix<T1,true>& lhs, const DenseMatrix<T2,true>& rhs );
99 
100 template< typename T1, typename T2, bool SO >
101 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const DenseMatrix<T2,!SO>& rhs );
102 
103 template< typename T1, typename T2, bool SO >
104 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,false>& rhs );
105 
106 template< typename T1, typename T2, bool SO >
107 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,true>& rhs );
108 
109 template< typename T1, bool SO1, typename T2, bool SO2 >
110 inline bool operator==( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
111 
112 template< typename T1, typename T2 >
113 inline EnableIf_<IsNumeric<T2>, bool > operator==( const DenseMatrix<T1,false>& mat, T2 scalar );
114 
115 template< typename T1, typename T2 >
116 inline EnableIf_<IsNumeric<T2>, bool > operator==( const DenseMatrix<T1,true>& mat, T2 scalar );
117 
118 template< typename T1, typename T2, bool SO >
119 inline EnableIf_<IsNumeric<T2>, bool > operator==( T1 scalar, const DenseMatrix<T2,SO>& mat );
120 
121 template< typename T1, bool SO1, typename T2, bool SO2 >
122 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
123 
124 template< typename T1, bool SO1, typename T2, bool SO2 >
125 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const SparseMatrix<T2,SO2>& rhs );
126 
127 template< typename T1, bool SO1, typename T2, bool SO2 >
128 inline bool operator!=( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
129 
130 template< typename T1, typename T2, bool SO >
131 inline EnableIf_<IsNumeric<T2>, bool > operator!=( const DenseMatrix<T1,SO>& mat, T2 scalar );
132 
133 template< typename T1, typename T2, bool SO >
134 inline EnableIf_<IsNumeric<T2>, bool > operator!=( T1 scalar, const DenseMatrix<T2,SO>& mat );
136 //*************************************************************************************************
137 
138 
139 //*************************************************************************************************
147 template< typename T1 // Type of the left-hand side dense matrix
148  , typename T2 > // Type of the right-hand side dense matrix
149 inline bool operator==( const DenseMatrix<T1,false>& lhs, const DenseMatrix<T2,false>& rhs )
150 {
151  using CT1 = CompositeType_<T1>;
152  using CT2 = CompositeType_<T2>;
153 
154  // Early exit in case the matrix sizes don't match
155  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
156  return false;
157 
158  // Evaluation of the two dense matrix operands
159  CT1 A( ~lhs );
160  CT2 B( ~rhs );
161 
162  // In order to compare the two matrices, the data values of the lower-order data
163  // type are converted to the higher-order data type within the equal function.
164  for( size_t i=0; i<A.rows(); ++i ) {
165  for( size_t j=0; j<A.columns(); ++j ) {
166  if( !equal( A(i,j), B(i,j) ) ) return false;
167  }
168  }
169 
170  return true;
171 }
172 //*************************************************************************************************
173 
174 
175 //*************************************************************************************************
183 template< typename T1 // Type of the left-hand side dense matrix
184  , typename T2 > // Type of the right-hand side dense matrix
185 inline bool operator==( const DenseMatrix<T1,true>& lhs, const DenseMatrix<T2,true>& rhs )
186 {
187  using CT1 = CompositeType_<T1>;
188  using CT2 = CompositeType_<T2>;
189 
190  // Early exit in case the matrix sizes don't match
191  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
192  return false;
193 
194  // Evaluation of the two dense matrix operands
195  CT1 A( ~lhs );
196  CT2 B( ~rhs );
197 
198  // In order to compare the two matrices, the data values of the lower-order data
199  // type are converted to the higher-order data type within the equal function.
200  for( size_t j=0; j<A.columns(); ++j ) {
201  for( size_t i=0; i<A.rows(); ++i ) {
202  if( !equal( A(i,j), B(i,j) ) ) return false;
203  }
204  }
205 
206  return true;
207 }
208 //*************************************************************************************************
209 
210 
211 //*************************************************************************************************
219 template< typename T1 // Type of the left-hand side dense matrix
220  , typename T2 // Type of the right-hand side dense matrix
221  , bool SO > // Storage order
222 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const DenseMatrix<T2,!SO>& rhs )
223 {
224  using CT1 = CompositeType_<T1>;
225  using CT2 = CompositeType_<T2>;
226 
227  // Early exit in case the matrix sizes don't match
228  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
229  return false;
230 
231  // Evaluation of the two dense matrix operands
232  CT1 A( ~lhs );
233  CT2 B( ~rhs );
234 
235  // In order to compare the two matrices, the data values of the lower-order data
236  // type are converted to the higher-order data type within the equal function.
237  const size_t rows ( A.rows() );
238  const size_t columns( A.columns() );
239  const size_t block ( 16 );
240 
241  for( size_t ii=0; ii<rows; ii+=block ) {
242  const size_t iend( ( rows < ii+block )?( rows ):( ii+block ) );
243  for( size_t jj=0; jj<columns; jj+=block ) {
244  const size_t jend( ( columns < jj+block )?( columns ):( jj+block ) );
245  for( size_t i=ii; i<iend; ++i ) {
246  for( size_t j=jj; j<jend; ++j ) {
247  if( !equal( A(i,j), B(i,j) ) ) return false;
248  }
249  }
250  }
251  }
252 
253  return true;
254 }
255 //*************************************************************************************************
256 
257 
258 //*************************************************************************************************
266 template< typename T1 // Type of the left-hand side dense matrix
267  , typename T2 // Type of the right-hand side sparse matrix
268  , bool SO > // Storage order of the left-hand side dense matrix
269 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,false>& rhs )
270 {
271  using CT1 = CompositeType_<T1>;
272  using CT2 = CompositeType_<T2>;
274 
275  // Early exit in case the matrix sizes don't match
276  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
277  return false;
278 
279  // Evaluation of the dense matrix and sparse matrix operand
280  CT1 A( ~lhs );
281  CT2 B( ~rhs );
282 
283  // In order to compare the two matrices, the data values of the lower-order data
284  // type are converted to the higher-order data type within the equal function.
285  size_t j( 0 );
286 
287  for( size_t i=0; i<B.rows(); ++i ) {
288  j = 0;
289  for( ConstIterator element=B.begin(i); element!=B.end(i); ++element, ++j ) {
290  for( ; j<element->index(); ++j ) {
291  if( !isDefault( A(i,j) ) ) return false;
292  }
293  if( !equal( element->value(), A(i,j) ) ) return false;
294  }
295  for( ; j<A.columns(); ++j ) {
296  if( !isDefault( A(i,j) ) ) return false;
297  }
298  }
299 
300  return true;
301 }
302 //*************************************************************************************************
303 
304 
305 //*************************************************************************************************
313 template< typename T1 // Type of the left-hand side dense matrix
314  , typename T2 // Type of the right-hand side sparse matrix
315  , bool SO > // Storage order of the left-hand side dense matrix
316 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,true>& rhs )
317 {
318  using CT1 = CompositeType_<T1>;
319  using CT2 = CompositeType_<T2>;
321 
322  // Early exit in case the matrix sizes don't match
323  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
324  return false;
325 
326  // Evaluation of the dense matrix and sparse matrix operand
327  CT1 A( ~lhs );
328  CT2 B( ~rhs );
329 
330  // In order to compare the two matrices, the data values of the lower-order data
331  // type are converted to the higher-order data type within the equal function.
332  size_t i( 0 );
333 
334  for( size_t j=0; j<B.columns(); ++j ) {
335  i = 0;
336  for( ConstIterator element=B.begin(j); element!=B.end(j); ++element, ++i ) {
337  for( ; i<element->index(); ++i ) {
338  if( !isDefault( A(i,j) ) ) return false;
339  }
340  if( !equal( element->value(), A(i,j) ) ) return false;
341  }
342  for( ; i<A.rows(); ++i ) {
343  if( !isDefault( A(i,j) ) ) return false;
344  }
345  }
346 
347  return true;
348 }
349 //*************************************************************************************************
350 
351 
352 //*************************************************************************************************
360 template< typename T1 // Type of the left-hand side sparse matrix
361  , bool SO1 // Storage order of the left-hand side sparse matrix
362  , typename T2 // Type of the right-hand side dense matrix
363  , bool SO2 > // Storage order of the right-hand side sparse matrix
364 inline bool operator==( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
365 {
366  return ( rhs == lhs );
367 }
368 //*************************************************************************************************
369 
370 
371 //*************************************************************************************************
383 template< typename T1 // Type of the left-hand side dense matrix
384  , typename T2 > // Type of the right-hand side scalar
385 inline EnableIf_<IsNumeric<T2>, bool > operator==( const DenseMatrix<T1,false>& mat, T2 scalar )
386 {
387  using CT1 = CompositeType_<T1>;
388 
389  // Evaluation of the dense matrix operand
390  CT1 A( ~mat );
391 
392  // In order to compare the matrix and the scalar value, the data values of the lower-order
393  // data type are converted to the higher-order data type within the equal function.
394  for( size_t i=0; i<A.rows(); ++i ) {
395  for( size_t j=0; j<A.columns(); ++j ) {
396  if( !equal( A(i,j), scalar ) ) return false;
397  }
398  }
399 
400  return true;
401 }
402 //*************************************************************************************************
403 
404 
405 //*************************************************************************************************
417 template< typename T1 // Type of the left-hand side dense matrix
418  , typename T2 > // Type of the right-hand side scalar
419 inline EnableIf_<IsNumeric<T2>, bool > operator==( const DenseMatrix<T1,true>& mat, T2 scalar )
420 {
421  using CT1 = CompositeType_<T1>;
422 
423  // Evaluation of the dense matrix operand
424  CT1 A( ~mat );
425 
426  // In order to compare the matrix and the scalar value, the data values of the lower-order
427  // data type are converted to the higher-order data type within the equal function.
428  for( size_t j=0; j<A.columns(); ++j ) {
429  for( size_t i=0; i<A.rows(); ++i ) {
430  if( !equal( A(i,j), scalar ) ) return false;
431  }
432  }
433 
434  return true;
435 }
436 //*************************************************************************************************
437 
438 
439 //*************************************************************************************************
451 template< typename T1 // Type of the left-hand side scalar
452  , typename T2 // Type of the right-hand side dense matrix
453  , bool SO > // Storage order
454 inline EnableIf_<IsNumeric<T1>, bool > operator==( T1 scalar, const DenseMatrix<T2,SO>& mat )
455 {
456  return ( mat == scalar );
457 }
458 //*************************************************************************************************
459 
460 
461 //*************************************************************************************************
469 template< typename T1 // Type of the left-hand side dense matrix
470  , bool SO1 // Storage order of the left-hand side dense matrix
471  , typename T2 // Type of the right-hand side dense matrix
472  , bool SO2 > // Storage order of the right-hand side dense matrix
473 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
474 {
475  return !( lhs == rhs );
476 }
477 //*************************************************************************************************
478 
479 
480 //*************************************************************************************************
488 template< typename T1 // Type of the left-hand side dense matrix
489  , bool SO1 // Storage order of the left-hand side dense matrix
490  , typename T2 // Type of the right-hand side sparse matrix
491  , bool SO2 > // Storage order of the right-hand side sparse matrix
492 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const SparseMatrix<T2,SO2>& rhs )
493 {
494  return !( lhs == rhs );
495 }
496 //*************************************************************************************************
497 
498 
499 //*************************************************************************************************
507 template< typename T1 // Type of the left-hand side sparse matrix
508  , bool SO1 // Storage order of the left-hand side sparse matrix
509  , typename T2 // Type of the right-hand side dense matrix
510  , bool SO2 > // Storage order right-hand side dense matrix
511 inline bool operator!=( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
512 {
513  return !( rhs == lhs );
514 }
515 //*************************************************************************************************
516 
517 
518 //*************************************************************************************************
530 template< typename T1 // Type of the left-hand side dense matrix
531  , typename T2 // Type of the right-hand side scalar
532  , bool SO > // Storage order
533 inline EnableIf_<IsNumeric<T2>, bool > operator!=( const DenseMatrix<T1,SO>& mat, T2 scalar )
534 {
535  return !( mat == scalar );
536 }
537 //*************************************************************************************************
538 
539 
540 //*************************************************************************************************
552 template< typename T1 // Type of the left-hand side scalar
553  , typename T2 // Type of the right-hand side dense matrix
554  , bool SO > // Storage order
555 inline EnableIf_<IsNumeric<T1>, bool > operator!=( T1 scalar, const DenseMatrix<T2,SO>& mat )
556 {
557  return !( mat == scalar );
558 }
559 //*************************************************************************************************
560 
561 
562 
563 
564 //=================================================================================================
565 //
566 // GLOBAL FUNCTIONS
567 //
568 //=================================================================================================
569 
570 //*************************************************************************************************
573 template< typename MT, bool SO >
574 bool isnan( const DenseMatrix<MT,SO>& dm );
575 
576 template< bool RF, typename MT, bool SO >
577 bool isSymmetric( const DenseMatrix<MT,SO>& dm );
578 
579 template< bool RF, typename MT, bool SO >
580 bool isHermitian( const DenseMatrix<MT,SO>& dm );
581 
582 template< bool RF, typename MT, bool SO >
583 bool isUniform( const DenseMatrix<MT,SO>& dm );
584 
585 template< bool RF, typename MT, bool SO >
586 bool isLower( const DenseMatrix<MT,SO>& dm );
587 
588 template< bool RF, typename MT, bool SO >
589 bool isUniLower( const DenseMatrix<MT,SO>& dm );
590 
591 template< bool RF, typename MT, bool SO >
592 bool isStrictlyLower( const DenseMatrix<MT,SO>& dm );
593 
594 template< bool RF, typename MT, bool SO >
595 bool isUpper( const DenseMatrix<MT,SO>& dm );
596 
597 template< bool RF, typename MT, bool SO >
598 bool isUniUpper( const DenseMatrix<MT,SO>& dm );
599 
600 template< bool RF, typename MT, bool SO >
601 bool isStrictlyUpper( const DenseMatrix<MT,SO>& dm );
602 
603 template< bool RF, typename MT, bool SO >
604 bool isDiagonal( const DenseMatrix<MT,SO>& dm );
605 
606 template< bool RF, typename MT, bool SO >
607 bool isIdentity( const DenseMatrix<MT,SO>& dm );
608 
609 template< typename MT, bool SO >
610 const ElementType_<MT> min( const DenseMatrix<MT,SO>& dm );
611 
612 template< typename MT, bool SO >
613 const ElementType_<MT> max( const DenseMatrix<MT,SO>& dm );
615 //*************************************************************************************************
616 
617 
618 //*************************************************************************************************
638 template< typename MT // Type of the dense matrix
639  , bool SO > // Storage order
640 bool isnan( const DenseMatrix<MT,SO>& dm )
641 {
642  using CT = CompositeType_<MT>;
643 
644  CT A( ~dm ); // Evaluation of the dense matrix operand
645 
646  if( SO == rowMajor ) {
647  for( size_t i=0UL; i<A.rows(); ++i ) {
648  for( size_t j=0UL; j<A.columns(); ++j )
649  if( isnan( A(i,j) ) ) return true;
650  }
651  }
652  else {
653  for( size_t j=0UL; j<A.columns(); ++j ) {
654  for( size_t i=0UL; i<A.rows(); ++i )
655  if( isnan( A(i,j) ) ) return true;
656  }
657  }
658 
659  return false;
660 }
661 //*************************************************************************************************
662 
663 
664 //*************************************************************************************************
697 template< bool RF // Relaxation flag
698  , typename MT // Type of the dense matrix
699  , bool SO > // Storage order
701 {
702  using CT = CompositeType_<MT>;
703 
705  return true;
706 
707  if( !isSquare( ~dm ) )
708  return false;
709 
710  if( IsUniform<MT>::value || (~dm).rows() < 2UL )
711  return true;
712 
714  return isDiagonal( ~dm );
715 
716  CT A( ~dm ); // Evaluation of the dense matrix operand
717 
718  if( SO == rowMajor ) {
719  for( size_t i=1UL; i<A.rows(); ++i ) {
720  for( size_t j=0UL; j<i; ++j ) {
721  if( !equal<RF>( A(i,j), A(j,i) ) )
722  return false;
723  }
724  }
725  }
726  else {
727  for( size_t j=1UL; j<A.columns(); ++j ) {
728  for( size_t i=0UL; i<j; ++i ) {
729  if( !equal<RF>( A(i,j), A(j,i) ) )
730  return false;
731  }
732  }
733  }
734 
735  return true;
736 }
737 //*************************************************************************************************
738 
739 
740 //*************************************************************************************************
775 template< bool RF // Relaxation flag
776  , typename MT // Type of the dense matrix
777  , bool SO > // Storage order
779 {
780  using ET = ElementType_<MT>;
781  using CT = CompositeType_<MT>;
782 
784  return true;
785 
786  if( !IsNumeric<ET>::value || !isSquare( ~dm ) )
787  return false;
788 
790  return true;
791 
792  CT A( ~dm ); // Evaluation of the dense matrix operand
793 
794  if( SO == rowMajor ) {
795  for( size_t i=0UL; i<A.rows(); ++i ) {
796  for( size_t j=0UL; j<i; ++j ) {
797  if( !equal<RF>( A(i,j), conj( A(j,i) ) ) )
798  return false;
799  }
800  if( !isReal<RF>( A(i,i) ) )
801  return false;
802  }
803  }
804  else {
805  for( size_t j=0UL; j<A.columns(); ++j ) {
806  for( size_t i=0UL; i<j; ++i ) {
807  if( !equal<RF>( A(i,j), conj( A(j,i) ) ) )
808  return false;
809  }
810  if( !isReal<RF>( A(j,j) ) )
811  return false;
812  }
813  }
814 
815  return true;
816 }
817 //*************************************************************************************************
818 
819 
820 //*************************************************************************************************
828 template< bool RF // Relaxation flag
829  , typename MT > // Type of the dense matrix
830 bool isUniform_backend( const DenseMatrix<MT,false>& dm, TrueType )
831 {
834 
835  BLAZE_INTERNAL_ASSERT( (~dm).rows() != 0UL, "Invalid number of rows detected" );
836  BLAZE_INTERNAL_ASSERT( (~dm).columns() != 0UL, "Invalid number of columns detected" );
837 
838  const size_t ibegin( ( IsStrictlyLower<MT>::value )?( 1UL ):( 0UL ) );
839  const size_t iend ( ( IsStrictlyUpper<MT>::value )?( (~dm).rows()-1UL ):( (~dm).rows() ) );
840 
841  for( size_t i=ibegin; i<iend; ++i ) {
842  if( !IsUpper<MT>::value ) {
843  for( size_t j=0UL; j<i; ++j ) {
844  if( !isDefault<RF>( (~dm)(i,j) ) )
845  return false;
846  }
847  }
848  if( !isDefault<RF>( (~dm)(i,i) ) )
849  return false;
850  if( !IsLower<MT>::value ) {
851  for( size_t j=i+1UL; j<(~dm).columns(); ++j ) {
852  if( !isDefault<RF>( (~dm)(i,j) ) )
853  return false;
854  }
855  }
856  }
857 
858  return true;
859 }
861 //*************************************************************************************************
862 
863 
864 //*************************************************************************************************
872 template< bool RF // Relaxation flag
873  , typename MT > // Type of the dense matrix
874 bool isUniform_backend( const DenseMatrix<MT,true>& dm, TrueType )
875 {
878 
879  BLAZE_INTERNAL_ASSERT( (~dm).rows() != 0UL, "Invalid number of rows detected" );
880  BLAZE_INTERNAL_ASSERT( (~dm).columns() != 0UL, "Invalid number of columns detected" );
881 
882  const size_t jbegin( ( IsStrictlyUpper<MT>::value )?( 1UL ):( 0UL ) );
883  const size_t jend ( ( IsStrictlyLower<MT>::value )?( (~dm).columns()-1UL ):( (~dm).columns() ) );
884 
885  for( size_t j=jbegin; j<jend; ++j ) {
886  if( !IsLower<MT>::value ) {
887  for( size_t i=0UL; i<j; ++i ) {
888  if( !isDefault<RF>( (~dm)(i,j) ) )
889  return false;
890  }
891  }
892  if( !isDefault<RF>( (~dm)(j,j) ) )
893  return false;
894  if( !IsUpper<MT>::value ) {
895  for( size_t i=j+1UL; i<(~dm).rows(); ++i ) {
896  if( !isDefault<RF>( (~dm)(i,j) ) )
897  return false;
898  }
899  }
900  }
901 
902  return true;
903 }
905 //*************************************************************************************************
906 
907 
908 //*************************************************************************************************
916 template< bool RF // Relaxation flag
917  , typename MT > // Type of the dense matrix
918 bool isUniform_backend( const DenseMatrix<MT,false>& dm, FalseType )
919 {
922 
923  BLAZE_INTERNAL_ASSERT( (~dm).rows() != 0UL, "Invalid number of rows detected" );
924  BLAZE_INTERNAL_ASSERT( (~dm).columns() != 0UL, "Invalid number of columns detected" );
925 
926  ConstReference_<MT> cmp( (~dm)(0UL,0UL) );
927 
928  for( size_t i=0UL; i<(~dm).rows(); ++i ) {
929  for( size_t j=0UL; j<(~dm).columns(); ++j ) {
930  if( (~dm)(i,j) != cmp )
931  return false;
932  }
933  }
934 
935  return true;
936 }
938 //*************************************************************************************************
939 
940 
941 //*************************************************************************************************
949 template< bool RF // Relaxation flag
950  , typename MT > // Type of the dense matrix
951 bool isUniform_backend( const DenseMatrix<MT,true>& dm, FalseType )
952 {
955 
956  BLAZE_INTERNAL_ASSERT( (~dm).rows() != 0UL, "Invalid number of rows detected" );
957  BLAZE_INTERNAL_ASSERT( (~dm).columns() != 0UL, "Invalid number of columns detected" );
958 
959  ConstReference_<MT> cmp( (~dm)(0UL,0UL) );
960 
961  for( size_t j=0UL; j<(~dm).columns(); ++j ) {
962  for( size_t i=0UL; i<(~dm).rows(); ++i ) {
963  if( (~dm)(i,j) != cmp )
964  return false;
965  }
966  }
967 
968  return true;
969 }
971 //*************************************************************************************************
972 
973 
974 //*************************************************************************************************
1007 template< bool RF // Relaxation flag
1008  , typename MT // Type of the dense matrix
1009  , bool SO > // Storage order
1011 {
1013  return false;
1014 
1015  if( IsUniform<MT>::value ||
1016  (~dm).rows() == 0UL || (~dm).columns() == 0UL ||
1017  ( (~dm).rows() == 1UL && (~dm).columns() == 1UL ) )
1018  return true;
1019 
1020  CompositeType_<MT> A( ~dm ); // Evaluation of the dense matrix operand
1021 
1022  return isUniform_backend<RF>( A, typename IsTriangular<MT>::Type() );
1023 }
1024 //*************************************************************************************************
1025 
1026 
1027 //*************************************************************************************************
1070 template< bool RF // Relaxation flag
1071  , typename MT // Type of the dense matrix
1072  , bool SO > // Storage order
1073 bool isLower( const DenseMatrix<MT,SO>& dm )
1074 {
1075  using RT = ResultType_<MT>;
1076  using RN = ReturnType_<MT>;
1077  using CT = CompositeType_<MT>;
1078  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1079 
1080  if( IsLower<MT>::value )
1081  return true;
1082 
1083  if( !isSquare( ~dm ) )
1084  return false;
1085 
1086  if( (~dm).rows() < 2UL )
1087  return true;
1088 
1089  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1090 
1091  if( SO == rowMajor ) {
1092  for( size_t i=0UL; i<A.rows()-1UL; ++i ) {
1093  for( size_t j=i+1UL; j<A.columns(); ++j ) {
1094  if( !isDefault<RF>( A(i,j) ) )
1095  return false;
1096  }
1097  }
1098  }
1099  else {
1100  for( size_t j=1UL; j<A.columns(); ++j ) {
1101  for( size_t i=0UL; i<j; ++i ) {
1102  if( !isDefault<RF>( A(i,j) ) )
1103  return false;
1104  }
1105  }
1106  }
1107 
1108  return true;
1109 }
1110 //*************************************************************************************************
1111 
1112 
1113 //*************************************************************************************************
1155 template< bool RF // Relaxation flag
1156  , typename MT // Type of the dense matrix
1157  , bool SO > // Storage order
1159 {
1160  using RT = ResultType_<MT>;
1161  using RN = ReturnType_<MT>;
1162  using CT = CompositeType_<MT>;
1163  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1164 
1165  if( IsUniLower<MT>::value )
1166  return true;
1167 
1168  if( !isSquare( ~dm ) )
1169  return false;
1170 
1171  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1172 
1173  if( SO == rowMajor ) {
1174  for( size_t i=0UL; i<A.rows(); ++i ) {
1175  if( !isOne<RF>( A(i,i) ) )
1176  return false;
1177  for( size_t j=i+1UL; j<A.columns(); ++j ) {
1178  if( !isZero<RF>( A(i,j) ) )
1179  return false;
1180  }
1181  }
1182  }
1183  else {
1184  for( size_t j=0UL; j<A.columns(); ++j ) {
1185  for( size_t i=0UL; i<j; ++i ) {
1186  if( !isZero<RF>( A(i,j) ) )
1187  return false;
1188  }
1189  if( !isOne<RF>( A(j,j) ) )
1190  return false;
1191  }
1192  }
1193 
1194  return true;
1195 }
1196 //*************************************************************************************************
1197 
1198 
1199 //*************************************************************************************************
1242 template< bool RF // Relaxation flag
1243  , typename MT // Type of the dense matrix
1244  , bool SO > // Storage order
1246 {
1247  using RT = ResultType_<MT>;
1248  using RN = ReturnType_<MT>;
1249  using CT = CompositeType_<MT>;
1250  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1251 
1253  return true;
1254 
1256  return false;
1257 
1258  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1259 
1260  if( SO == rowMajor ) {
1261  for( size_t i=0UL; i<A.rows(); ++i ) {
1262  for( size_t j=i; j<A.columns(); ++j ) {
1263  if( !isDefault<RF>( A(i,j) ) )
1264  return false;
1265  }
1266  }
1267  }
1268  else {
1269  for( size_t j=0UL; j<A.columns(); ++j ) {
1270  for( size_t i=0UL; i<=j; ++i ) {
1271  if( !isDefault<RF>( A(i,j) ) )
1272  return false;
1273  }
1274  }
1275  }
1276 
1277  return true;
1278 }
1279 //*************************************************************************************************
1280 
1281 
1282 //*************************************************************************************************
1325 template< bool RF // Relaxation flag
1326  , typename MT // Type of the dense matrix
1327  , bool SO > // Storage order
1328 bool isUpper( const DenseMatrix<MT,SO>& dm )
1329 {
1330  using RT = ResultType_<MT>;
1331  using RN = ReturnType_<MT>;
1332  using CT = CompositeType_<MT>;
1333  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1334 
1335  if( IsUpper<MT>::value )
1336  return true;
1337 
1338  if( !isSquare( ~dm ) )
1339  return false;
1340 
1341  if( (~dm).rows() < 2UL )
1342  return true;
1343 
1344  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1345 
1346  if( SO == rowMajor ) {
1347  for( size_t i=1UL; i<A.rows(); ++i ) {
1348  for( size_t j=0UL; j<i; ++j ) {
1349  if( !isDefault<RF>( A(i,j) ) )
1350  return false;
1351  }
1352  }
1353  }
1354  else {
1355  for( size_t j=0UL; j<A.columns()-1UL; ++j ) {
1356  for( size_t i=j+1UL; i<A.rows(); ++i ) {
1357  if( !isDefault<RF>( A(i,j) ) )
1358  return false;
1359  }
1360  }
1361  }
1362 
1363  return true;
1364 }
1365 //*************************************************************************************************
1366 
1367 
1368 //*************************************************************************************************
1410 template< bool RF // Relaxation flag
1411  , typename MT // Type of the dense matrix
1412  , bool SO > // Storage order
1414 {
1415  using RT = ResultType_<MT>;
1416  using RN = ReturnType_<MT>;
1417  using CT = CompositeType_<MT>;
1418  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1419 
1420  if( IsUniUpper<MT>::value )
1421  return true;
1422 
1423  if( !isSquare( ~dm ) )
1424  return false;
1425 
1426  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1427 
1428  if( SO == rowMajor ) {
1429  for( size_t i=0UL; i<A.rows(); ++i ) {
1430  for( size_t j=0UL; j<i; ++j ) {
1431  if( !isZero<RF>( A(i,j) ) )
1432  return false;
1433  }
1434  if( !isOne<RF>( A(i,i) ) )
1435  return false;
1436  }
1437  }
1438  else {
1439  for( size_t j=0UL; j<A.columns(); ++j ) {
1440  if( !isOne<RF>( A(j,j) ) )
1441  return false;
1442  for( size_t i=j+1UL; i<A.rows(); ++i ) {
1443  if( !isZero<RF>( A(i,j) ) )
1444  return false;
1445  }
1446  }
1447  }
1448 
1449  return true;
1450 }
1451 //*************************************************************************************************
1452 
1453 
1454 //*************************************************************************************************
1497 template< bool RF // Relaxation flag
1498  , typename MT // Type of the dense matrix
1499  , bool SO > // Storage order
1501 {
1502  using RT = ResultType_<MT>;
1503  using RN = ReturnType_<MT>;
1504  using CT = CompositeType_<MT>;
1505  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1506 
1508  return true;
1509 
1511  return false;
1512 
1513  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1514 
1515  if( SO == rowMajor ) {
1516  for( size_t i=0UL; i<A.rows(); ++i ) {
1517  for( size_t j=0UL; j<=i; ++j ) {
1518  if( !isDefault<RF>( A(i,j) ) )
1519  return false;
1520  }
1521  }
1522  }
1523  else {
1524  for( size_t j=0UL; j<A.columns(); ++j ) {
1525  for( size_t i=j; i<A.rows(); ++i ) {
1526  if( !isDefault<RF>( A(i,j) ) )
1527  return false;
1528  }
1529  }
1530  }
1531 
1532  return true;
1533 }
1534 //*************************************************************************************************
1535 
1536 
1537 //*************************************************************************************************
1581 template< bool RF // Relaxation flag
1582  , typename MT // Type of the dense matrix
1583  , bool SO > // Storage order
1585 {
1586  using RT = ResultType_<MT>;
1587  using RN = ReturnType_<MT>;
1588  using CT = CompositeType_<MT>;
1589  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1590 
1591  if( IsDiagonal<MT>::value )
1592  return true;
1593 
1594  if( !isSquare( ~dm ) )
1595  return false;
1596 
1597  if( (~dm).rows() < 2UL )
1598  return true;
1599 
1600  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1601 
1602  if( SO == rowMajor ) {
1603  for( size_t i=0UL; i<A.rows(); ++i ) {
1604  if( !IsUpper<MT>::value ) {
1605  for( size_t j=0UL; j<i; ++j ) {
1606  if( !isDefault<RF>( A(i,j) ) )
1607  return false;
1608  }
1609  }
1610  if( !IsLower<MT>::value ) {
1611  for( size_t j=i+1UL; j<A.columns(); ++j ) {
1612  if( !isDefault<RF>( A(i,j) ) )
1613  return false;
1614  }
1615  }
1616  }
1617  }
1618  else {
1619  for( size_t j=0UL; j<A.columns(); ++j ) {
1620  if( !IsLower<MT>::value ) {
1621  for( size_t i=0UL; i<j; ++i ) {
1622  if( !isDefault<RF>( A(i,j) ) )
1623  return false;
1624  }
1625  }
1626  if( !IsUpper<MT>::value ) {
1627  for( size_t i=j+1UL; i<A.rows(); ++i ) {
1628  if( !isDefault<RF>( A(i,j) ) )
1629  return false;
1630  }
1631  }
1632  }
1633  }
1634 
1635  return true;
1636 }
1637 //*************************************************************************************************
1638 
1639 
1640 //*************************************************************************************************
1683 template< bool RF // Relaxation flag
1684  , typename MT // Type of the dense matrix
1685  , bool SO > // Storage order
1687 {
1688  using RT = ResultType_<MT>;
1689  using RN = ReturnType_<MT>;
1690  using CT = CompositeType_<MT>;
1691  using Tmp = If_< IsExpression<RN>, const RT, CT >;
1692 
1693  if( IsIdentity<MT>::value )
1694  return true;
1695 
1696  if( !isSquare( ~dm ) )
1697  return false;
1698 
1699  if( (~dm).rows() == 0UL )
1700  return true;
1701 
1702  Tmp A( ~dm ); // Evaluation of the dense matrix operand
1703 
1704  if( SO == rowMajor ) {
1705  for( size_t i=0UL; i<A.rows(); ++i ) {
1706  if( !IsUpper<MT>::value ) {
1707  for( size_t j=0UL; j<i; ++j ) {
1708  if( !isZero<RF>( A(i,j) ) )
1709  return false;
1710  }
1711  }
1712  if( !IsUniLower<MT>::value && !IsUniUpper<MT>::value && !isOne<RF>( A(i,i) ) ) {
1713  return false;
1714  }
1715  if( !IsLower<MT>::value ) {
1716  for( size_t j=i+1UL; j<A.columns(); ++j ) {
1717  if( !isZero<RF>( A(i,j) ) )
1718  return false;
1719  }
1720  }
1721  }
1722  }
1723  else {
1724  for( size_t j=0UL; j<A.columns(); ++j ) {
1725  if( !IsLower<MT>::value ) {
1726  for( size_t i=0UL; i<j; ++i ) {
1727  if( !isZero<RF>( A(i,j) ) )
1728  return false;
1729  }
1730  }
1731  if( !IsUniLower<MT>::value && !IsUniUpper<MT>::value && !isOne<RF>( A(j,j) ) ) {
1732  return false;
1733  }
1734  if( !IsUpper<MT>::value ) {
1735  for( size_t i=j+1UL; i<A.rows(); ++i ) {
1736  if( !isZero<RF>( A(i,j) ) )
1737  return false;
1738  }
1739  }
1740  }
1741  }
1742 
1743  return true;
1744 }
1745 //*************************************************************************************************
1746 
1747 
1748 //*************************************************************************************************
1760 template< typename MT // Type of the dense matrix
1761  , bool SO > // Storage order
1763 {
1764  using blaze::min;
1765 
1766  using ET = ElementType_<MT>;
1767  using CT = CompositeType_<MT>;
1768 
1769  CT A( ~dm ); // Evaluation of the dense matrix operand
1770 
1771  if( A.rows() == 0UL || A.columns() == 0UL ) return ET();
1772 
1773  ET minimum( A(0,0) );
1774 
1775  if( SO == rowMajor ) {
1776  for( size_t j=1UL; j<A.columns(); ++j )
1777  minimum = min( minimum, A(0UL,j) );
1778  for( size_t i=1UL; i<A.rows(); ++i )
1779  for( size_t j=0UL; j<A.columns(); ++j )
1780  minimum = min( minimum, A(i,j) );
1781  }
1782  else {
1783  for( size_t i=1UL; i<A.rows(); ++i )
1784  minimum = min( minimum, A(i,0UL) );
1785  for( size_t j=1UL; j<A.columns(); ++j )
1786  for( size_t i=0UL; i<A.rows(); ++i )
1787  minimum = min( minimum, A(i,j) );
1788  }
1789 
1790  return minimum;
1791 }
1792 //*************************************************************************************************
1793 
1794 
1795 //*************************************************************************************************
1807 template< typename MT // Type of the dense matrix
1808  , bool SO > // Transpose flag
1810 {
1811  using blaze::max;
1812 
1813  using ET = ElementType_<MT>;
1814  using CT = CompositeType_<MT>;
1815 
1816  CT A( ~dm ); // Evaluation of the dense matrix operand
1817 
1818  if( A.rows() == 0UL || A.columns() == 0UL ) return ET();
1819 
1820  ET maximum( A(0,0) );
1821 
1822  if( SO == rowMajor ) {
1823  for( size_t j=1UL; j<A.columns(); ++j )
1824  maximum = max( maximum, A(0UL,j) );
1825  for( size_t i=1UL; i<A.rows(); ++i )
1826  for( size_t j=0UL; j<A.columns(); ++j )
1827  maximum = max( maximum, A(i,j) );
1828  }
1829  else {
1830  for( size_t i=1UL; i<A.rows(); ++i )
1831  maximum = max( maximum, A(i,0UL) );
1832  for( size_t j=1UL; j<A.columns(); ++j )
1833  for( size_t i=0UL; i<A.rows(); ++i )
1834  maximum = max( maximum, A(i,j) );
1835  }
1836 
1837  return maximum;
1838 }
1839 //*************************************************************************************************
1840 
1841 } // namespace blaze
1842 
1843 #endif
#define BLAZE_CONSTRAINT_MUST_BE_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a lower or upper triangular matrix t...
Definition: Triangular.h:61
Header file for the isnan shim.
Header file for auxiliary alias declarations.
Headerfile for the generic min algorithm.
Compile time check for numeric types.This type trait tests whether or not the given template paramete...
Definition: IsNumeric.h:79
bool isLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower triangular matrix.
Definition: DenseMatrix.h:1073
bool isUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper triangular matrix.
Definition: DenseMatrix.h:1328
bool isStrictlyLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly lower triangular matrix.
Definition: DenseMatrix.h:1245
Header file for the IsUniUpper type trait.
Compile time check for triangular matrix types.This type trait tests whether or not the given templat...
Definition: IsTriangular.h:87
Header file for basic type definitions.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_TRIANGULAR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is a lower or upper triangular matrix type...
Definition: Triangular.h:81
constexpr bool equal(const T1 &a, const T2 &b)
Generic equality check.
Definition: Equal.h:76
Header file for the FalseType type/value trait base class.
Header file for the IsDiagonal type trait.
Generic wrapper for a compile time constant integral value.The IntegralConstant class template repres...
Definition: IntegralConstant.h:71
Compile time check for uniform vectors and matrices.This type trait tests whether or not the given te...
Definition: IsUniform.h:67
bool isUniLower(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a lower unitriangular matrix.
Definition: DenseMatrix.h:1158
const ElementType_< MT > min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1762
Compile time check for lower triangular matrices.This type trait tests whether or not the given templ...
Definition: IsLower.h:88
Header file for the IsIdentity type trait.
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:1584
Compile time check for upper triangular matrices.This type trait tests whether or not the given templ...
Definition: IsUpper.h:88
Header file for the IsUniLower type trait.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
const ElementType_< MT > max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1809
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:78
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:129
bool isIdentity(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is an identity matrix.
Definition: DenseMatrix.h:1686
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:363
Header file for the SparseMatrix base class.
Header file for the matrix storage order types.
Constraint on the data type.
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
Compile time check for upper unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniUpper.h:86
Headerfile for the generic max algorithm.
Header file for the IsUniform type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
Header file for the If class template.
Header file for the DenseMatrix base class.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3087
Header file for the isZero shim.
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:250
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Header file for the IsLower type trait.
Compile time check for diagonal matrices.This type trait tests whether or not the given template para...
Definition: IsDiagonal.h:90
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:340
Header file for the equal shim.
Header file for the IsUniTriangular type trait.
Header file for the IsTriangular type trait.
Compile time check for symmetric matrices.This type trait tests whether or not the given template par...
Definition: IsSymmetric.h:85
bool isnan(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is not a number.
Definition: DiagonalProxy.h:682
Compile time check for strictly upper triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyUpper.h:86
bool isUniform(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a uniform matrix.
Definition: DenseMatrix.h:1010
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:290
Constraint on the data type.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
Header file for the isOne shim.
Compile time check for lower unitriangular matrices.This type trait tests whether or not the given te...
Definition: IsUniLower.h:86
Header file for the conjugate shim.
Header file for the IsNumeric type trait.
Compile time check for identity matrices.This type trait tests whether or not the given template para...
Definition: IsIdentity.h:90
bool isStrictlyUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is a strictly upper triangular matrix.
Definition: DenseMatrix.h:1500
Header file for run time assertion macros.
typename If< T1, T2, T3 >::Type If_
Auxiliary alias declaration for the If class template.The If_ alias declaration provides a convenient...
Definition: If.h:154
bool isHermitian(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is Hermitian.
Definition: DenseMatrix.h:778
Header file for the isDefault shim.
Compile time check for Hermitian matrices.This type trait tests whether or not the given template par...
Definition: IsHermitian.h:85
Compile time check for built-in data types.This type trait tests whether or not the given template pa...
Definition: IsBuiltin.h:75
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:700
#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
Header file for the RemoveReference type trait.
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
Compile time check for strictly lower triangular matrices.This type trait tests whether or not the gi...
Definition: IsStrictlyLower.h:86
typename T::ConstReference ConstReference_
Alias declaration for nested ConstReference type definitions.The ConstReference_ alias declaration pr...
Definition: Aliases.h:143
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:324
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Header file for the IsBuiltin type trait.
bool isUniUpper(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is an upper unitriangular matrix.
Definition: DenseMatrix.h:1413
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:600
Header file for the IsUpper type trait.
decltype(auto) conj(const DenseMatrix< MT, SO > &dm)
Returns a matrix containing the complex conjugate of each single element of dm.
Definition: DMatMapExpr.h:1321
Header file for the IsHermitian type trait.
BLAZE_ALWAYS_INLINE bool isSquare(const Matrix< MT, SO > &matrix) noexcept
Checks if the given matrix is a square matrix.
Definition: Matrix.h:742
Header file for the isReal shim.
#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 TrueType type/value trait base class.
Compile time check for unitriangular matrix types.This type trait tests whether or not the given temp...
Definition: IsUniTriangular.h:87
Header file for the IsExpression type trait class.