All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DenseMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_DENSEMATRIX_H_
36 #define _BLAZE_MATH_DENSEMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
85 #include <blaze/math/Matrix.h>
86 #include <blaze/math/shims/Equal.h>
88 #include <blaze/math/shims/IsNaN.h>
90 #include <blaze/util/Assert.h>
91 #include <blaze/util/EnableIf.h>
92 #include <blaze/util/Types.h>
95 
96 
97 namespace blaze {
98 
99 //=================================================================================================
100 //
101 // GLOBAL OPERATORS
102 //
103 //=================================================================================================
104 
105 //*************************************************************************************************
108 template< typename T1, typename T2 >
109 inline bool operator==( const DenseMatrix<T1,false>& lhs, const DenseMatrix<T2,false>& rhs );
110 
111 template< typename T1, typename T2 >
112 inline bool operator==( const DenseMatrix<T1,true>& lhs, const DenseMatrix<T2,true>& rhs );
113 
114 template< typename T1, typename T2, bool SO >
115 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const DenseMatrix<T2,!SO>& rhs );
116 
117 template< typename T1, typename T2, bool SO >
118 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,false>& rhs );
119 
120 template< typename T1, typename T2, bool SO >
121 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,true>& rhs );
122 
123 template< typename T1, bool SO1, typename T2, bool SO2 >
124 inline bool operator==( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
125 
126 template< typename T1, typename T2 >
127 inline typename EnableIf< IsNumeric<T2>, bool >::Type
128  operator==( const DenseMatrix<T1,false>& mat, T2 scalar );
129 
130 template< typename T1, typename T2 >
131 inline typename EnableIf< IsNumeric<T2>, bool >::Type
132  operator==( const DenseMatrix<T1,true>& mat, T2 scalar );
133 
134 template< typename T1, typename T2, bool SO >
135 inline typename EnableIf< IsNumeric<T2>, bool >::Type
136  operator==( T1 scalar, const DenseMatrix<T2,SO>& mat );
137 
138 template< typename T1, bool SO1, typename T2, bool SO2 >
139 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
140 
141 template< typename T1, bool SO1, typename T2, bool SO2 >
142 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const SparseMatrix<T2,SO2>& rhs );
143 
144 template< typename T1, bool SO1, typename T2, bool SO2 >
145 inline bool operator!=( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs );
146 
147 template< typename T1, typename T2, bool SO >
148 inline typename EnableIf< IsNumeric<T2>, bool >::Type
149  operator!=( const DenseMatrix<T1,SO>& mat, T2 scalar );
150 
151 template< typename T1, typename T2, bool SO >
152 inline typename EnableIf< IsNumeric<T2>, bool >::Type
153  operator!=( T1 scalar, const DenseMatrix<T2,SO>& mat );
155 //*************************************************************************************************
156 
157 
158 //*************************************************************************************************
166 template< typename T1 // Type of the left-hand side dense matrix
167  , typename T2 > // Type of the right-hand side dense matrix
168 inline bool operator==( const DenseMatrix<T1,false>& lhs, const DenseMatrix<T2,false>& rhs )
169 {
170  typedef typename T1::CompositeType CT1;
171  typedef typename T2::CompositeType CT2;
172 
173  // Early exit in case the matrix sizes don't match
174  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
175  return false;
176 
177  // Evaluation of the two dense matrix operands
178  CT1 A( ~lhs );
179  CT2 B( ~rhs );
180 
181  // In order to compare the two matrices, the data values of the lower-order data
182  // type are converted to the higher-order data type within the equal function.
183  for( size_t i=0; i<A.rows(); ++i ) {
184  for( size_t j=0; j<A.columns(); ++j ) {
185  if( !equal( A(i,j), B(i,j) ) ) return false;
186  }
187  }
188 
189  return true;
190 }
191 //*************************************************************************************************
192 
193 
194 //*************************************************************************************************
202 template< typename T1 // Type of the left-hand side dense matrix
203  , typename T2 > // Type of the right-hand side dense matrix
204 inline bool operator==( const DenseMatrix<T1,true>& lhs, const DenseMatrix<T2,true>& rhs )
205 {
206  typedef typename T1::CompositeType CT1;
207  typedef typename T2::CompositeType CT2;
208 
209  // Early exit in case the matrix sizes don't match
210  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
211  return false;
212 
213  // Evaluation of the two dense matrix operands
214  CT1 A( ~lhs );
215  CT2 B( ~rhs );
216 
217  // In order to compare the two matrices, the data values of the lower-order data
218  // type are converted to the higher-order data type within the equal function.
219  for( size_t j=0; j<A.columns(); ++j ) {
220  for( size_t i=0; i<A.rows(); ++i ) {
221  if( !equal( A(i,j), B(i,j) ) ) return false;
222  }
223  }
224 
225  return true;
226 }
227 //*************************************************************************************************
228 
229 
230 //*************************************************************************************************
238 template< typename T1 // Type of the left-hand side dense matrix
239  , typename T2 // Type of the right-hand side dense matrix
240  , bool SO > // Storage order
241 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const DenseMatrix<T2,!SO>& rhs )
242 {
243  typedef typename T1::CompositeType CT1;
244  typedef typename T2::CompositeType CT2;
245 
246  // Early exit in case the matrix sizes don't match
247  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
248  return false;
249 
250  // Evaluation of the two dense matrix operands
251  CT1 A( ~lhs );
252  CT2 B( ~rhs );
253 
254  // In order to compare the two matrices, the data values of the lower-order data
255  // type are converted to the higher-order data type within the equal function.
256  const size_t rows ( A.rows() );
257  const size_t columns( A.columns() );
258  const size_t block ( 16 );
259 
260  for( size_t ii=0; ii<rows; ii+=block ) {
261  const size_t iend( ( rows < ii+block )?( rows ):( ii+block ) );
262  for( size_t jj=0; jj<columns; jj+=block ) {
263  const size_t jend( ( columns < jj+block )?( columns ):( jj+block ) );
264  for( size_t i=ii; i<iend; ++i ) {
265  for( size_t j=jj; j<jend; ++j ) {
266  if( !equal( A(i,j), B(i,j) ) ) return false;
267  }
268  }
269  }
270  }
271 
272  return true;
273 }
274 //*************************************************************************************************
275 
276 
277 //*************************************************************************************************
285 template< typename T1 // Type of the left-hand side dense matrix
286  , typename T2 // Type of the right-hand side sparse matrix
287  , bool SO > // Storage order of the left-hand side dense matrix
288 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,false>& rhs )
289 {
290  typedef typename T1::CompositeType CT1;
291  typedef typename T2::CompositeType CT2;
293 
294  // Early exit in case the matrix sizes don't match
295  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
296  return false;
297 
298  // Evaluation of the dense matrix and sparse matrix operand
299  CT1 A( ~lhs );
300  CT2 B( ~rhs );
301 
302  // In order to compare the two matrices, the data values of the lower-order data
303  // type are converted to the higher-order data type within the equal function.
304  size_t j( 0 );
305 
306  for( size_t i=0; i<B.rows(); ++i ) {
307  j = 0;
308  for( ConstIterator element=B.begin(i); element!=B.end(i); ++element, ++j ) {
309  for( ; j<element->index(); ++j ) {
310  if( !isDefault( A(i,j) ) ) return false;
311  }
312  if( !equal( element->value(), A(i,j) ) ) return false;
313  }
314  for( ; j<A.columns(); ++j ) {
315  if( !isDefault( A(i,j) ) ) return false;
316  }
317  }
318 
319  return true;
320 }
321 //*************************************************************************************************
322 
323 
324 //*************************************************************************************************
332 template< typename T1 // Type of the left-hand side dense matrix
333  , typename T2 // Type of the right-hand side sparse matrix
334  , bool SO > // Storage order of the left-hand side dense matrix
335 inline bool operator==( const DenseMatrix<T1,SO>& lhs, const SparseMatrix<T2,true>& rhs )
336 {
337  typedef typename T1::CompositeType CT1;
338  typedef typename T2::CompositeType CT2;
340 
341  // Early exit in case the matrix sizes don't match
342  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() )
343  return false;
344 
345  // Evaluation of the dense matrix and sparse matrix operand
346  CT1 A( ~lhs );
347  CT2 B( ~rhs );
348 
349  // In order to compare the two matrices, the data values of the lower-order data
350  // type are converted to the higher-order data type within the equal function.
351  size_t i( 0 );
352 
353  for( size_t j=0; j<B.columns(); ++j ) {
354  i = 0;
355  for( ConstIterator element=B.begin(j); element!=B.end(j); ++element, ++i ) {
356  for( ; i<element->index(); ++i ) {
357  if( !isDefault( A(i,j) ) ) return false;
358  }
359  if( !equal( element->value(), A(i,j) ) ) return false;
360  }
361  for( ; i<A.rows(); ++i ) {
362  if( !isDefault( A(i,j) ) ) return false;
363  }
364  }
365 
366  return true;
367 }
368 //*************************************************************************************************
369 
370 
371 //*************************************************************************************************
379 template< typename T1 // Type of the left-hand side sparse matrix
380  , bool SO1 // Storage order of the left-hand side sparse matrix
381  , typename T2 // Type of the right-hand side dense matrix
382  , bool SO2 > // Storage order of the right-hand side sparse matrix
383 inline bool operator==( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
384 {
385  return ( rhs == lhs );
386 }
387 //*************************************************************************************************
388 
389 
390 //*************************************************************************************************
402 template< typename T1 // Type of the left-hand side dense matrix
403  , typename T2 > // Type of the right-hand side scalar
404 inline typename EnableIf< IsNumeric<T2>, bool >::Type
405  operator==( const DenseMatrix<T1,false>& mat, T2 scalar )
406 {
407  typedef typename T1::CompositeType CT1;
408 
409  // Evaluation of the dense matrix operand
410  CT1 A( ~mat );
411 
412  // In order to compare the matrix and the scalar value, the data values of the lower-order
413  // data type are converted to the higher-order data type within the equal function.
414  for( size_t i=0; i<A.rows(); ++i ) {
415  for( size_t j=0; j<A.columns(); ++j ) {
416  if( !equal( A(i,j), scalar ) ) return false;
417  }
418  }
419 
420  return true;
421 }
422 //*************************************************************************************************
423 
424 
425 //*************************************************************************************************
437 template< typename T1 // Type of the left-hand side dense matrix
438  , typename T2 > // Type of the right-hand side scalar
439 inline typename EnableIf< IsNumeric<T2>, bool >::Type
440  operator==( const DenseMatrix<T1,true>& mat, T2 scalar )
441 {
442  typedef typename T1::CompositeType CT1;
443 
444  // Evaluation of the dense matrix operand
445  CT1 A( ~mat );
446 
447  // In order to compare the matrix and the scalar value, the data values of the lower-order
448  // data type are converted to the higher-order data type within the equal function.
449  for( size_t j=0; j<A.columns(); ++j ) {
450  for( size_t i=0; i<A.rows(); ++i ) {
451  if( !equal( A(i,j), scalar ) ) return false;
452  }
453  }
454 
455  return true;
456 }
457 //*************************************************************************************************
458 
459 
460 //*************************************************************************************************
472 template< typename T1 // Type of the left-hand side scalar
473  , typename T2 // Type of the right-hand side dense matrix
474  , bool SO > // Storage order
475 inline typename EnableIf< IsNumeric<T1>, bool >::Type
476  operator==( T1 scalar, const DenseMatrix<T2,SO>& mat )
477 {
478  return ( mat == scalar );
479 }
480 //*************************************************************************************************
481 
482 
483 //*************************************************************************************************
491 template< typename T1 // Type of the left-hand side dense matrix
492  , bool SO1 // Storage order of the left-hand side dense matrix
493  , typename T2 // Type of the right-hand side dense matrix
494  , bool SO2 > // Storage order of the right-hand side dense matrix
495 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
496 {
497  return !( lhs == rhs );
498 }
499 //*************************************************************************************************
500 
501 
502 //*************************************************************************************************
510 template< typename T1 // Type of the left-hand side dense matrix
511  , bool SO1 // Storage order of the left-hand side dense matrix
512  , typename T2 // Type of the right-hand side sparse matrix
513  , bool SO2 > // Storage order of the right-hand side sparse matrix
514 inline bool operator!=( const DenseMatrix<T1,SO1>& lhs, const SparseMatrix<T2,SO2>& rhs )
515 {
516  return !( lhs == rhs );
517 }
518 //*************************************************************************************************
519 
520 
521 //*************************************************************************************************
529 template< typename T1 // Type of the left-hand side sparse matrix
530  , bool SO1 // Storage order of the left-hand side sparse matrix
531  , typename T2 // Type of the right-hand side dense matrix
532  , bool SO2 > // Storage order right-hand side dense matrix
533 inline bool operator!=( const SparseMatrix<T1,SO1>& lhs, const DenseMatrix<T2,SO2>& rhs )
534 {
535  return !( rhs == lhs );
536 }
537 //*************************************************************************************************
538 
539 
540 //*************************************************************************************************
552 template< typename T1 // Type of the left-hand side dense matrix
553  , typename T2 // Type of the right-hand side scalar
554  , bool SO > // Storage order
555 inline typename EnableIf< IsNumeric<T2>, bool >::Type
556  operator!=( const DenseMatrix<T1,SO>& mat, T2 scalar )
557 {
558  return !( mat == scalar );
559 }
560 //*************************************************************************************************
561 
562 
563 //*************************************************************************************************
575 template< typename T1 // Type of the left-hand side scalar
576  , typename T2 // Type of the right-hand side dense matrix
577  , bool SO > // Storage order
578 inline typename EnableIf< IsNumeric<T1>, bool >::Type
579  operator!=( T1 scalar, const DenseMatrix<T2,SO>& mat )
580 {
581  return !( mat == scalar );
582 }
583 //*************************************************************************************************
584 
585 
586 
587 
588 //=================================================================================================
589 //
590 // GLOBAL FUNCTIONS
591 //
592 //=================================================================================================
593 
594 //*************************************************************************************************
597 template< typename MT, bool SO >
598 bool isnan( const DenseMatrix<MT,SO>& dm );
599 
600 template< typename MT, bool SO >
601 bool isDiagonal( const DenseMatrix<MT,SO>& dm );
602 
603 template< typename MT, bool SO >
604 bool isSymmetric( const DenseMatrix<MT,SO>& dm );
605 
606 template< typename MT, bool SO >
607 const typename MT::ElementType min( const DenseVector<MT,SO>& dm );
608 
609 template< typename MT, bool SO >
610 const typename MT::ElementType max( const DenseVector<MT,SO>& dm );
612 //*************************************************************************************************
613 
614 
615 //*************************************************************************************************
635 template< typename MT // Type of the dense matrix
636  , bool SO > // Storage order
637 bool isnan( const DenseMatrix<MT,SO>& dm )
638 {
639  typedef typename MT::CompositeType CT;
640 
641  CT A( ~dm ); // Evaluation of the dense matrix operand
642 
643  if( SO == rowMajor ) {
644  for( size_t i=0UL; i<A.rows(); ++i ) {
645  for( size_t j=0UL; j<A.columns(); ++j )
646  if( isnan( A(i,j) ) ) return true;
647  }
648  }
649  else {
650  for( size_t j=0UL; j<A.columns(); ++j ) {
651  for( size_t i=0UL; i<A.rows(); ++i )
652  if( isnan( A(i,j) ) ) return true;
653  }
654  }
655 
656  return false;
657 }
658 //*************************************************************************************************
659 
660 
661 //*************************************************************************************************
680 template< typename MT // Type of the dense matrix
681  , bool SO > // Storage order
683 {
684  const size_t rows ( (~dm).rows() );
685  const size_t columns( (~dm).columns() );
686 
687  if( rows != columns ) return false;
688 
689  if( SO == rowMajor ) {
690  for( size_t i=1UL; i<rows; ++i ) {
691  for( size_t j=0UL; j<i; ++j ) {
692  if( !isDefault( (~dm)(i,j) ) || !isDefault( (~dm)(j,i) ) )
693  return false;
694  }
695  }
696  }
697  else {
698  for( size_t j=1UL; j<columns; ++j ) {
699  for( size_t i=0UL; i<j; ++i ) {
700  if( !isDefault( (~dm)(i,j) ) || !isDefault( (~dm)(j,i) ) )
701  return false;
702  }
703  }
704  }
705 
706  return true;
707 }
708 //*************************************************************************************************
709 
710 
711 //*************************************************************************************************
718 template< typename MT // Type of the dense matrix
719  , bool SO > // Storage order
721 {
722  const size_t rows ( (~dm).rows() );
723  const size_t columns( (~dm).columns() );
724 
725  if( rows != columns ) return false;
726 
727  if( SO == rowMajor ) {
728  for( size_t i=1UL; i<rows; ++i ) {
729  for( size_t j=0UL; j<i; ++j ) {
730  if( !equal( (~dm)(i,j), (~dm)(j,i) ) )
731  return false;
732  }
733  }
734  }
735  else {
736  for( size_t j=1UL; j<columns; ++j ) {
737  for( size_t i=0UL; i<j; ++i ) {
738  if( !equal( (~dm)(i,j), (~dm)(j,i) ) )
739  return false;
740  }
741  }
742  }
743 
744  return true;
745 }
746 //*************************************************************************************************
747 
748 
749 //*************************************************************************************************
761 template< typename MT // Type of the dense matrix
762  , bool SO > // Storage order
763 const typename MT::ElementType min( const DenseMatrix<MT,SO>& dm )
764 {
765  using blaze::min;
766 
767  typedef typename MT::ElementType ET;
768  typedef typename MT::CompositeType CT;
769 
770  CT A( ~dm ); // Evaluation of the dense matrix operand
771 
772  if( A.rows() == 0UL || A.columns() == 0UL ) return ET();
773 
774  ET minimum( A(0,0) );
775 
776  if( SO == rowMajor ) {
777  for( size_t j=1UL; j<A.columns(); ++j )
778  minimum = min( minimum, A(0UL,j) );
779  for( size_t i=1UL; i<A.rows(); ++i )
780  for( size_t j=0UL; j<A.columns(); ++j )
781  minimum = min( minimum, A(i,j) );
782  }
783  else {
784  for( size_t i=1UL; i<A.rows(); ++i )
785  minimum = min( minimum, A(i,0UL) );
786  for( size_t j=1UL; j<A.columns(); ++j )
787  for( size_t i=0UL; i<A.rows(); ++i )
788  minimum = min( minimum, A(i,j) );
789  }
790 
791  return minimum;
792 }
793 //*************************************************************************************************
794 
795 
796 //*************************************************************************************************
808 template< typename MT // Type of the dense matrix
809  , bool SO > // Transpose flag
810 const typename MT::ElementType max( const DenseMatrix<MT,SO>& dm )
811 {
812  using blaze::max;
813 
814  typedef typename MT::ElementType ET;
815  typedef typename MT::CompositeType CT;
816 
817  CT A( ~dm ); // Evaluation of the dense matrix operand
818 
819  if( A.rows() == 0UL || A.columns() == 0UL ) return ET();
820 
821  ET maximum( A(0,0) );
822 
823  if( SO == rowMajor ) {
824  for( size_t j=1UL; j<A.columns(); ++j )
825  maximum = max( maximum, A(0UL,j) );
826  for( size_t i=1UL; i<A.rows(); ++i )
827  for( size_t j=0UL; j<A.columns(); ++j )
828  maximum = max( maximum, A(i,j) );
829  }
830  else {
831  for( size_t i=1UL; i<A.rows(); ++i )
832  maximum = max( maximum, A(i,0UL) );
833  for( size_t j=1UL; j<A.columns(); ++j )
834  for( size_t i=0UL; i<A.rows(); ++i )
835  maximum = max( maximum, A(i,j) );
836  }
837 
838  return maximum;
839 }
840 //*************************************************************************************************
841 
842 } // namespace blaze
843 
844 #endif
Header file for the isnan shim.
Header file for the dense vector/dense vector outer product expression.
bool isDiagonal(const DenseMatrix< MT, SO > &dm)
Checks if the give dense matrix is diagonal.
Definition: DenseMatrix.h:682
Header file for the transpose dense vector/dense matrix multiplication expression.
Header file for the dense matrix/dense vector multiplication expression.
Header file for the dense matrix/dense matrix addition expression.
Header file for the dense matrix/sparse vector multiplication expression.
bool isDefault(const DynamicMatrix< Type, SO > &m)
Returns whether the given dense matrix is in default state.
Definition: DynamicMatrix.h:4622
bool isSymmetric(const DenseMatrix< MT, SO > &dm)
Checks if the given dense matrix is symmetric.
Definition: DenseMatrix.h:720
Header file for the transpose sparse matrix/transpose dense matrix multiplication expression...
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2384
bool isnan(const DenseMatrix< MT, SO > &dm)
Checks the given dense matrix for not-a-number elements.
Definition: DenseMatrix.h:637
Header file for the dense matrix/dense matrix subtraction expression.
Header file for the sparse matrix/transpose dense matrix multiplication expression.
Header file for the transpose dense matrix/dense matrix multiplication expression.
Header file for the transpose dense matrix/sparse matrix multiplication expression.
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:104
Header file for the dense matrix/transpose dense matrix addition expression.
Header file for the SparseMatrix base class.
Header file for the transpose sparse vector/dense matrix multiplication expression.
Header file for the matrix storage order types.
Header file for the transpose sparse matrix/dense matrix subtraction expression.
Header file for the dense matrix/transpose sparse matrix addition expression.
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2388
Header file for the DenseMatrix base class.
Header file for the transpose sparse vector/transpose dense matrix multiplication expression...
Header file for the sparse matrix/dense matrix subtraction expression.
Header file for the transpose sparse matrix/dense matrix multiplication expression.
Header file for the dense matrix/scalar multiplication expression.
Header file for the transpose dense matrix/dense vector multiplication expression.
Header file for the dense matrix/sparse matrix addition expression.
Header file for the transpose dense matrix/sparse vector multiplication expression.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2382
Header file for the sparse matrix/transpose dense matrix subtraction expression.
Header file for the EnableIf class template.
Header file for the dense matrix/scalar division expression.
Header file for the equal shim.
Header file for the dense matrix evaluation expression.
Header file for the transpose dense matrix/transpose sparse matrix multiplication expression...
Header file for the transpose dense matrix/transpose dense matrix multiplication expression.
Header file for the dense matrix transposer.
Header file for the IsNumeric type trait.
Header file for all basic Matrix functionality.
Header file for the dense matrix/transpose sparse matrix subtraction expression.
Removal of reference modifiers.The RemoveCV type trait removes any reference modifiers from the given...
Definition: RemoveReference.h:69
Header file for run time assertion macros.
Header file for the dense matrix/dense matrix multiplication expression.
bool equal(const T1 &a, const T2 &b)
Generic equality check.
Definition: Equal.h:352
Header file for the dense matrix/sparse matrix subtraction expression.
Header file for the dense matrix/sparse matrix multiplication expression.
Header file for the dense matrix/transpose dense matrix multiplication expression.
Header file for the dense matrix/transpose sparse matrix multiplication expression.
const VT::ElementType max(const SparseVector< VT, TF > &sv)
Returns the largest element of the sparse vector.
Definition: SparseVector.h:405
Header file for the isDefault shim.
Header file for the transpose dense matrix/sparse matrix addition expression.
Header file for the RemoveReference type trait.
Header file for the dense matrix absolute value expression.
Header file for the dense matrix/transpose dense matrix subtraction expression.
const bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
Header file for the transpose dense matrix/sparse matrix subtraction expression.
bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value. ...
Definition: Accuracy.h:249
size_t columns(const Matrix< MT, SO > &m)
Returns the current number of columns of the matrix.
Definition: Matrix.h:154
bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition: Accuracy.h:289
Header file for basic type definitions.
Header file for the sparse matrix/dense matrix multiplication expression.
Header file for the dense matrix transpose expression.
const VT::ElementType min(const SparseVector< VT, TF > &sv)
Returns the smallest element of the sparse vector.
Definition: SparseVector.h:348
Header file for the transpose dense vector/transpose dense matrix multiplication expression.
size_t rows(const Matrix< MT, SO > &m)
Returns the current number of rows of the matrix.
Definition: Matrix.h:138