DMatSMatSchurExpr.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_EXPRESSIONS_DMATSMATSCHUREXPR_H_
36 #define _BLAZE_MATH_EXPRESSIONS_DMATSMATSCHUREXPR_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <iterator>
44 #include <utility>
45 #include <blaze/math/Aliases.h>
53 #include <blaze/math/Exception.h>
72 #include <blaze/util/Assert.h>
73 #include <blaze/util/DisableIf.h>
74 #include <blaze/util/EnableIf.h>
77 #include <blaze/util/mpl/If.h>
78 #include <blaze/util/mpl/Maximum.h>
79 #include <blaze/util/Types.h>
81 #include <blaze/util/Unused.h>
82 
83 
84 namespace blaze {
85 
86 //=================================================================================================
87 //
88 // CLASS DMATSMATSCHUREXPR
89 //
90 //=================================================================================================
91 
92 //*************************************************************************************************
99 template< typename MT1 // Type of the left-hand side dense matrix
100  , typename MT2 > // Type of the right-hand side sparse matrix
102  : public SchurExpr< SparseMatrix< DMatSMatSchurExpr<MT1,MT2>, false > >
103  , private Computation
104 {
105  private:
106  //**Type definitions****************************************************************************
113  //**********************************************************************************************
114 
115  //**Return type evaluation**********************************************************************
117 
122  static constexpr bool returnExpr = ( !IsTemporary_v<RN1> && !IsTemporary_v<RN2> );
123 
125  using ExprReturnType = decltype( std::declval<RN1>() * std::declval<RN2>() );
126  //**********************************************************************************************
127 
128  //**Evaluation strategy*************************************************************************
130 
136  static constexpr bool useAssign = ( RequiresEvaluation_v<MT1> || RequiresEvaluation_v<MT2> );
137 
139  template< typename MT >
141  static constexpr bool UseAssign_v = useAssign;
143  //**********************************************************************************************
144 
145  public:
146  //**Type definitions****************************************************************************
153 
156 
159 
161  using LeftOperand = If_t< IsExpression_v<MT1>, const MT1, const MT1& >;
162 
164  using RightOperand = If_t< IsExpression_v<MT2>, const MT2, const MT2& >;
165  //**********************************************************************************************
166 
167  //**ConstIterator class definition**************************************************************
171  {
172  public:
173  //**Type definitions*************************************************************************
176 
179 
180  using IteratorCategory = std::forward_iterator_tag;
181  using ValueType = Element;
185 
186  // STL iterator requirements
192  //*******************************************************************************************
193 
194  //**Constructor******************************************************************************
201  inline ConstIterator( LeftOperand left, RightIterator right, size_t row )
202  : left_ ( left ) // Left-hand side dense matrix expression
203  , right_( right ) // Iterator over the elements of the right-hand side sparse matrix expression
204  , row_ ( row ) // The row index of the iterator
205  {}
206  //*******************************************************************************************
207 
208  //**Prefix increment operator****************************************************************
214  ++right_;
215  return *this;
216  }
217  //*******************************************************************************************
218 
219  //**Element access operator******************************************************************
224  inline const Element operator*() const {
225  return Element( left_(row_,right_->index()) * right_->value(), right_->index() );
226  }
227  //*******************************************************************************************
228 
229  //**Element access operator******************************************************************
234  inline const ConstIterator* operator->() const {
235  return this;
236  }
237  //*******************************************************************************************
238 
239  //**Value function***************************************************************************
244  inline ReturnType value() const {
245  return left_(row_,right_->index()) * right_->value();
246  }
247  //*******************************************************************************************
248 
249  //**Index function***************************************************************************
254  inline size_t index() const {
255  return right_->index();
256  }
257  //*******************************************************************************************
258 
259  //**Equality operator************************************************************************
265  inline bool operator==( const ConstIterator& rhs ) const {
266  return right_ == rhs.right_;
267  }
268  //*******************************************************************************************
269 
270  //**Inequality operator**********************************************************************
276  inline bool operator!=( const ConstIterator& rhs ) const {
277  return right_ != rhs.right_;
278  }
279  //*******************************************************************************************
280 
281  //**Subtraction operator*********************************************************************
287  inline DifferenceType operator-( const ConstIterator& rhs ) const {
288  return right_ - rhs.right_;
289  }
290  //*******************************************************************************************
291 
292  private:
293  //**Member variables*************************************************************************
296  size_t row_;
297  //*******************************************************************************************
298  };
299  //**********************************************************************************************
300 
301  //**Compilation flags***************************************************************************
303  static constexpr bool smpAssignable = false;
304  //**********************************************************************************************
305 
306  //**Constructor*********************************************************************************
312  explicit inline DMatSMatSchurExpr( const MT1& lhs, const MT2& rhs ) noexcept
313  : lhs_( lhs ) // Left-hand side dense matrix of the Schur product expression
314  , rhs_( rhs ) // Right-hand side sparse matrix of the Schur product expression
315  {
316  BLAZE_INTERNAL_ASSERT( lhs.rows() == rhs.rows() , "Invalid number of rows" );
317  BLAZE_INTERNAL_ASSERT( lhs.columns() == rhs.columns(), "Invalid number of columns" );
318  }
319  //**********************************************************************************************
320 
321  //**Access operator*****************************************************************************
328  inline ReturnType operator()( size_t i, size_t j ) const {
329  BLAZE_INTERNAL_ASSERT( i < lhs_.rows() , "Invalid row access index" );
330  BLAZE_INTERNAL_ASSERT( j < lhs_.columns(), "Invalid column access index" );
331  return lhs_(i,j) * rhs_(i,j);
332  }
333  //**********************************************************************************************
334 
335  //**At function*********************************************************************************
343  inline ReturnType at( size_t i, size_t j ) const {
344  if( i >= lhs_.rows() ) {
345  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
346  }
347  if( j >= lhs_.columns() ) {
348  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
349  }
350  return (*this)(i,j);
351  }
352  //**********************************************************************************************
353 
354  //**Begin function******************************************************************************
360  inline ConstIterator begin( size_t i ) const {
361  return ConstIterator( lhs_, rhs_.begin(i), i );
362  }
363  //**********************************************************************************************
364 
365  //**End function********************************************************************************
371  inline ConstIterator end( size_t i ) const {
372  return ConstIterator( lhs_, rhs_.end(i), i );
373  }
374  //**********************************************************************************************
375 
376  //**Rows function*******************************************************************************
381  inline size_t rows() const noexcept {
382  return lhs_.rows();
383  }
384  //**********************************************************************************************
385 
386  //**Columns function****************************************************************************
391  inline size_t columns() const noexcept {
392  return lhs_.columns();
393  }
394  //**********************************************************************************************
395 
396  //**NonZeros function***************************************************************************
401  inline size_t nonZeros() const {
402  return rhs_.nonZeros();
403  }
404  //**********************************************************************************************
405 
406  //**NonZeros function***************************************************************************
412  inline size_t nonZeros( size_t i ) const {
413  return rhs_.nonZeros(i);
414  }
415  //**********************************************************************************************
416 
417  //**Find function*******************************************************************************
424  inline ConstIterator find( size_t i, size_t j ) const {
426  return ConstIterator( lhs_, rhs_.find( i, j ), i );
427  }
428  //**********************************************************************************************
429 
430  //**LowerBound function*************************************************************************
437  inline ConstIterator lowerBound( size_t i, size_t j ) const {
439  return ConstIterator( lhs_, rhs_.lowerBound( i, j ), i );
440  }
441  //**********************************************************************************************
442 
443  //**UpperBound function*************************************************************************
450  inline ConstIterator upperBound( size_t i, size_t j ) const {
452  return ConstIterator( lhs_, rhs_.upperBound( i, j ), i );
453  }
454  //**********************************************************************************************
455 
456  //**Left operand access*************************************************************************
461  inline LeftOperand leftOperand() const noexcept {
462  return lhs_;
463  }
464  //**********************************************************************************************
465 
466  //**Right operand access************************************************************************
471  inline RightOperand rightOperand() const noexcept {
472  return rhs_;
473  }
474  //**********************************************************************************************
475 
476  //**********************************************************************************************
482  template< typename T >
483  inline bool canAlias( const T* alias ) const noexcept {
484  return ( lhs_.isAliased( alias ) || rhs_.canAlias( alias ) );
485  }
486  //**********************************************************************************************
487 
488  //**********************************************************************************************
494  template< typename T >
495  inline bool isAliased( const T* alias ) const noexcept {
496  return ( lhs_.isAliased( alias ) || rhs_.isAliased( alias ) );
497  }
498  //**********************************************************************************************
499 
500  private:
501  //**Member variables****************************************************************************
504  //**********************************************************************************************
505 
506  //**Assignment to dense matrices****************************************************************
518  template< typename MT // Type of the target dense matrix
519  , bool SO2 > // Storage order of the target dense matrix
520  friend inline auto assign( DenseMatrix<MT,SO2>& lhs, const DMatSMatSchurExpr& rhs )
522  {
524 
525  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
526  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
527 
528  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
529  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
530 
531  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
532  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
533  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
534  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
535  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
536  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
537 
538  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
539  for( auto element=B.begin(i); element!=B.end(i); ++element )
540  (~lhs)(i,element->index()) = A(i,element->index()) * element->value();
541  }
542  }
544  //**********************************************************************************************
545 
546  //**Assignment to row-major sparse matrices*****************************************************
558  template< typename MT > // Type of the target sparse matrix
559  friend inline auto assign( SparseMatrix<MT,false>& lhs, const DMatSMatSchurExpr& rhs )
561  {
563 
564  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
565  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
566 
567  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
568  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
569 
570  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
571  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
572  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
573  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
574  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
575  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
576 
577  // Final memory allocation (based on the evaluated operands)
578  (~lhs).reserve( B.nonZeros() );
579 
580  // Performing the Schur product
581  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
582  for( auto element=B.begin(i); element!=B.end(i); ++element )
583  (~lhs).append( i, element->index(), A(i,element->index()) * element->value() );
584  (~lhs).finalize( i );
585  }
586  }
588  //**********************************************************************************************
589 
590  //**Assignment to column-major sparse matrices**************************************************
603  template< typename MT > // Type of the target sparse matrix
604  friend inline auto assign( SparseMatrix<MT,true>& lhs, const DMatSMatSchurExpr& rhs )
605  -> EnableIf_t< UseAssign_v<MT> >
606  {
608 
609  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
610  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
611 
612  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
613  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
614 
615  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
616  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
617  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
618  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
619  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
620  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
621 
622  const size_t m( rhs.rows() );
623  const size_t n( rhs.columns() );
624 
625  // Counting the number of elements per column
626  std::vector<size_t> nonzeros( n, 0UL );
627  for( size_t i=0UL; i<m; ++i ) {
628  const auto lend( B.end(i) );
629  for( auto l=B.begin(i); l!=lend; ++l ) {
630  ++nonzeros[l->index()];
631  }
632  }
633 
634  // Resizing the left-hand side sparse matrix
635  for( size_t j=0UL; j<n; ++j ) {
636  (~lhs).reserve( j, nonzeros[j] );
637  }
638 
639  // Performing the Schur product
640  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
641  for( auto element=B.begin(i); element!=B.end(i); ++element )
642  (~lhs).append( i, element->index(), A(i,element->index()) * element->value() );
643  }
644  }
646  //**********************************************************************************************
647 
648  //**Addition assignment to dense matrices*******************************************************
660  template< typename MT // Type of the target dense matrix
661  , bool SO2 > // Storage order of the target dense matrix
662  friend inline auto addAssign( DenseMatrix<MT,SO2>& lhs, const DMatSMatSchurExpr& rhs )
663  -> EnableIf_t< UseAssign_v<MT> >
664  {
666 
667  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
668  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
669 
670  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
671  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
672 
673  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
674  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
675  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
676  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
677  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
678  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
679 
680  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
681  for( auto element=B.begin(i); element!=B.end(i); ++element )
682  (~lhs)(i,element->index()) += A(i,element->index()) * element->value();
683  }
684  }
686  //**********************************************************************************************
687 
688  //**Addition assignment to sparse matrices******************************************************
689  // No special implementation for the addition assignment to sparse matrices.
690  //**********************************************************************************************
691 
692  //**Subtraction assignment to dense matrices****************************************************
704  template< typename MT // Type of the target dense matrix
705  , bool SO2 > // Storage order of the target dense matrix
706  friend inline auto subAssign( DenseMatrix<MT,SO2>& lhs, const DMatSMatSchurExpr& rhs )
707  -> EnableIf_t< UseAssign_v<MT> >
708  {
710 
711  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
712  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
713 
714  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
715  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
716 
717  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
718  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
719  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
720  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
721  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
722  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
723 
724  for( size_t i=0UL; i<(~lhs).rows(); ++i ) {
725  for( auto element=B.begin(i); element!=B.end(i); ++element )
726  (~lhs)(i,element->index()) -= A(i,element->index()) * element->value();
727  }
728  }
730  //**********************************************************************************************
731 
732  //**Subtraction assignment to sparse matrices***************************************************
733  // No special implementation for the subtraction assignment to sparse matrices.
734  //**********************************************************************************************
735 
736  //**Schur product assignment to dense matrices**************************************************
749  template< typename MT // Type of the target dense matrix
750  , bool SO2 > // Storage order of the target dense matrix
751  friend inline void schurAssign( DenseMatrix<MT,SO2>& lhs, const DMatSMatSchurExpr& rhs )
752  {
754 
755  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
756  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
757 
758  CT1 A( serial( rhs.lhs_ ) ); // Evaluation of the left-hand side dense matrix operand
759  CT2 B( serial( rhs.rhs_ ) ); // Evaluation of the right-hand side sparse matrix operand
760 
761  BLAZE_INTERNAL_ASSERT( A.rows() == rhs.lhs_.rows() , "Invalid number of rows" );
762  BLAZE_INTERNAL_ASSERT( A.columns() == rhs.lhs_.columns(), "Invalid number of columns" );
763  BLAZE_INTERNAL_ASSERT( B.rows() == rhs.rhs_.rows() , "Invalid number of rows" );
764  BLAZE_INTERNAL_ASSERT( B.columns() == rhs.rhs_.columns(), "Invalid number of columns" );
765  BLAZE_INTERNAL_ASSERT( A.rows() == (~lhs).rows() , "Invalid number of rows" );
766  BLAZE_INTERNAL_ASSERT( A.columns() == (~lhs).columns() , "Invalid number of columns" );
767 
768  for( size_t i=0UL; i<(~lhs).rows(); ++i )
769  {
770  const auto end( B.end(i) );
771  auto begin( B.begin(i) );
772  size_t j( 0UL );
773 
774  for( ; begin!=end; ++begin ) {
775  const size_t index( begin->index() );
776  for( ; j<index; ++j )
777  reset( (~lhs)(i,j) );
778  (~lhs)(i,index) *= A(i,index) * begin->value();
779  ++j;
780  }
781 
782  for( ; j<(~lhs).columns(); ++j )
783  reset( (~lhs)(i,j) );
784  }
785  }
787  //**********************************************************************************************
788 
789  //**Schur product assignment to sparse matrices*************************************************
790  // No special implementation for the Schur product assignment to sparse matrices.
791  //**********************************************************************************************
792 
793  //**Multiplication assignment to dense matrices*************************************************
794  // No special implementation for the multiplication assignment to dense matrices.
795  //**********************************************************************************************
796 
797  //**Multiplication assignment to sparse matrices************************************************
798  // No special implementation for the multiplication assignment to sparse matrices.
799  //**********************************************************************************************
800 
801  //**SMP assignment to dense matrices************************************************************
802  // No special implementation for the SMP assignment to dense matrices.
803  //**********************************************************************************************
804 
805  //**SMP assignment to sparse matrices***********************************************************
806  // No special implementation for the SMP assignment to sparse matrices.
807  //**********************************************************************************************
808 
809  //**SMP addition assignment to dense matrices***************************************************
810  // No special implementation for the SMP addition assignment to dense matrices.
811  //**********************************************************************************************
812 
813  //**SMP addition assignment to sparse matrices**************************************************
814  // No special implementation for the SMP addition assignment to sparse matrices.
815  //**********************************************************************************************
816 
817  //**SMP subtraction assignment to dense matrices************************************************
818  // No special implementation for the SMP subtraction assignment to dense matrices.
819  //**********************************************************************************************
820 
821  //**SMP subtraction assignment to sparse matrices***********************************************
822  // No special implementation for the SMP subtraction assignment to sparse matrices.
823  //**********************************************************************************************
824 
825  //**SMP Schur product assignment to dense matrices**********************************************
838  template< typename MT // Type of the target dense matrix
839  , bool SO > // Storage order of the target dense matrix
840  friend inline void smpSchurAssign( DenseMatrix<MT,SO>& lhs, const DMatSMatSchurExpr& rhs )
841  {
843 
844  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == rhs.rows() , "Invalid number of rows" );
845  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == rhs.columns(), "Invalid number of columns" );
846 
847  smpSchurAssign( ~lhs, rhs.lhs_ );
848  smpSchurAssign( ~lhs, rhs.rhs_ );
849  }
851  //**********************************************************************************************
852 
853  //**SMP Schur product assignment to sparse matrices*********************************************
854  // No special implementation for the SMP Schur product assignment to sparse matrices.
855  //**********************************************************************************************
856 
857  //**SMP multiplication assignment to dense matrices*********************************************
858  // No special implementation for the SMP multiplication assignment to dense matrices.
859  //**********************************************************************************************
860 
861  //**SMP multiplication assignment to sparse matrices********************************************
862  // No special implementation for the SMP multiplication assignment to sparse matrices.
863  //**********************************************************************************************
864 
865  //**Compile time checks*************************************************************************
873  //**********************************************************************************************
874 };
875 //*************************************************************************************************
876 
877 
878 
879 
880 //=================================================================================================
881 //
882 // GLOBAL BINARY ARITHMETIC OPERATORS
883 //
884 //=================================================================================================
885 
886 //*************************************************************************************************
899 template< typename MT1 // Type of the left-hand side dense matrix
900  , typename MT2 // Type of the right-hand side sparse matrix
901  , DisableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
902  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) ||
903  ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
904  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
905  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
906  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) ||
907  IsZero_v<MT2> >* = nullptr >
908 inline const DMatSMatSchurExpr<MT1,MT2>
909  dmatsmatschur( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,false>& rhs )
910 {
912 
913  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
914  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
915 
916  return DMatSMatSchurExpr<MT1,MT2>( ~lhs, ~rhs );
917 }
919 //*************************************************************************************************
920 
921 
922 //*************************************************************************************************
936 template< typename MT1 // Type of the left-hand side dense matrix
937  , typename MT2 // Type of the right-hand side sparse matrix
938  , EnableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
939  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) >* = nullptr >
940 inline decltype(auto)
941  dmatsmatschur( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,false>& rhs )
942 {
944 
945  UNUSED_PARAMETER( rhs );
946 
947  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
948  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
949 
950  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
951 
954 
955  return ReturnType( (~lhs).rows() );
956 }
958 //*************************************************************************************************
959 
960 
961 //*************************************************************************************************
975 template< typename MT1 // Type of the left-hand side dense matrix
976  , typename MT2 // Type of the right-hand side sparse matrix
977  , EnableIf_t< ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
978  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
979  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
980  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) ||
981  IsZero_v<MT2> >* = nullptr >
982 inline decltype(auto)
983  dmatsmatschur( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,false>& rhs )
984 {
986 
987  UNUSED_PARAMETER( rhs );
988 
989  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
990  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
991 
992  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
993 
996 
997  return ReturnType( (~lhs).rows(), (~lhs).columns() );
998 }
1000 //*************************************************************************************************
1001 
1002 
1003 //*************************************************************************************************
1032 template< typename MT1 // Type of the left-hand side dense matrix
1033  , typename MT2 > // Type of the right-hand side sparse matrix
1034 inline decltype(auto)
1035  operator%( const DenseMatrix<MT1,false>& lhs, const SparseMatrix<MT2,false>& rhs )
1036 {
1038 
1039  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() ) {
1040  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
1041  }
1042 
1043  return dmatsmatschur( ~lhs, ~rhs );
1044 }
1045 //*************************************************************************************************
1046 
1047 
1048 //*************************************************************************************************
1061 template< typename MT1 // Type of the left-hand side dense matrix
1062  , typename MT2 // Type of the right-hand side sparse matrix
1063  , DisableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1064  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) ||
1065  ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1066  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1067  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1068  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) ||
1069  IsZero_v<MT2> >* = nullptr >
1070 inline const DMatSMatSchurExpr<MT1,MT2>
1071  tdmatsmatschur( const DenseMatrix<MT1,true>& lhs, const SparseMatrix<MT2,false>& rhs )
1072 {
1074 
1075  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1076  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1077 
1078  return DMatSMatSchurExpr<MT1,MT2>( ~lhs, ~rhs );
1079 }
1080 //*************************************************************************************************
1081 
1082 
1083 //*************************************************************************************************
1097 template< typename MT1 // Type of the left-hand side dense matrix
1098  , typename MT2 // Type of the right-hand side sparse matrix
1099  , EnableIf_t< ( IsUniLower_v<MT1> && IsUniUpper_v<MT2> ) ||
1100  ( IsUniUpper_v<MT1> && IsUniLower_v<MT2> ) >* = nullptr >
1101 inline decltype(auto)
1102  tdmatsmatschur( const DenseMatrix<MT1,true>& lhs, const SparseMatrix<MT2,false>& rhs )
1103 {
1105 
1106  UNUSED_PARAMETER( rhs );
1107 
1108  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1109  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1110 
1111  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1112 
1115 
1116  return ReturnType( (~lhs).rows() );
1117 }
1119 //*************************************************************************************************
1120 
1121 
1122 //*************************************************************************************************
1136 template< typename MT1 // Type of the left-hand side dense matrix
1137  , typename MT2 // Type of the right-hand side sparse matrix
1138  , EnableIf_t< ( IsStrictlyLower_v<MT1> && IsUpper_v<MT2> ) ||
1139  ( IsStrictlyUpper_v<MT1> && IsLower_v<MT2> ) ||
1140  ( IsLower_v<MT1> && IsStrictlyUpper_v<MT2> ) ||
1141  ( IsUpper_v<MT1> && IsStrictlyLower_v<MT2> ) ||
1142  IsZero_v<MT2> >* = nullptr >
1143 inline decltype(auto)
1144  tdmatsmatschur( const DenseMatrix<MT1,true>& lhs, const SparseMatrix<MT2,false>& rhs )
1145 {
1147 
1148  UNUSED_PARAMETER( rhs );
1149 
1150  BLAZE_INTERNAL_ASSERT( (~lhs).rows() == (~rhs).rows() , "Invalid number of rows" );
1151  BLAZE_INTERNAL_ASSERT( (~lhs).columns() == (~rhs).columns(), "Invalid number of columns" );
1152 
1153  using ReturnType = const SchurTrait_t< ResultType_t<MT1>, ResultType_t<MT2> >;
1154 
1157 
1158  return ReturnType( (~lhs).rows(), (~lhs).columns() );
1159 }
1161 //*************************************************************************************************
1162 
1163 
1164 //*************************************************************************************************
1194 template< typename MT1 // Type of the left-hand side dense matrix
1195  , typename MT2 > // Type of the right-hand side sparse matrix
1196 inline decltype(auto)
1197  operator%( const DenseMatrix<MT1,true>& lhs, const SparseMatrix<MT2,false>& rhs )
1198 {
1200 
1201  if( (~lhs).rows() != (~rhs).rows() || (~lhs).columns() != (~rhs).columns() ) {
1202  BLAZE_THROW_INVALID_ARGUMENT( "Matrix sizes do not match" );
1203  }
1204 
1205  return tdmatsmatschur( ~lhs, ~rhs );
1206 }
1207 //*************************************************************************************************
1208 
1209 
1210 
1211 
1212 //=================================================================================================
1213 //
1214 // SIZE SPECIALIZATIONS
1215 //
1216 //=================================================================================================
1217 
1218 //*************************************************************************************************
1220 template< typename MT1, typename MT2 >
1221 struct Size< DMatSMatSchurExpr<MT1,MT2>, 0UL >
1222  : public Maximum< Size<MT1,0UL>, Size<MT2,0UL> >
1223 {};
1224 
1225 template< typename MT1, typename MT2 >
1226 struct Size< DMatSMatSchurExpr<MT1,MT2>, 1UL >
1227  : public Maximum< Size<MT1,1UL>, Size<MT2,1UL> >
1228 {};
1230 //*************************************************************************************************
1231 
1232 } // namespace blaze
1233 
1234 #endif
Constraint on the data type.
RightOperand rightOperand() const noexcept
Returns the right-hand side sparse matrix operand.
Definition: DMatSMatSchurExpr.h:471
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Pointer difference type of the Blaze library.
Header file for auxiliary alias declarations.
#define BLAZE_CONSTRAINT_MUST_BE_IDENTITY_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not an identity matrix type...
Definition: Identity.h:60
Header file for the Schur product trait.
If_t< useAssign, const ResultType, const DMatSMatSchurExpr &> CompositeType
Data type for composite expression templates.
Definition: DMatSMatSchurExpr.h:158
Header file for the UNUSED_PARAMETER function template.
Header file for the IsUniUpper type trait.
LeftOperand left_
Left-hand side dense matrix expression.
Definition: DMatSMatSchurExpr.h:294
Header file for basic type definitions.
ConstIterator & operator++()
Pre-increment operator.
Definition: DMatSMatSchurExpr.h:213
decltype(std::declval< RN1 >() *std::declval< RN2 >()) ExprReturnType
Expression return type for the subscript operator.
Definition: DMatSMatSchurExpr.h:125
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: DMatSMatSchurExpr.h:450
typename If< Condition, T1, T2 >::Type If_t
Auxiliary alias declaration for the If class template.The If_t alias declaration provides a convenien...
Definition: If.h:109
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
Header file for the serial shim.
ptrdiff_t DifferenceType
Difference between two iterators.
Definition: DMatSMatSchurExpr.h:184
OppositeType_t< ResultType > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DMatSMatSchurExpr.h:150
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional matrix type...
Definition: DenseMatrix.h:61
CompositeType_t< MT1 > CT1
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatSchurExpr.h:111
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: DMatSMatSchurExpr.h:424
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:591
RightIterator right_
Iterator over the elements of the right-hand side sparse matrix expression.
Definition: DMatSMatSchurExpr.h:295
Constraint on the data type.
Expression object for dense matrix-sparse matrix Schur product.The DMatSMatSchurExpr class represents...
Definition: DMatSMatSchurExpr.h:101
size_t nonZeros(size_t i) const
Returns the number of non-zero elements in the specified row.
Definition: DMatSMatSchurExpr.h:412
const ConstIterator * operator->() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DMatSMatSchurExpr.h:234
size_t index() const
Access to the current index of the sparse element.
Definition: DMatSMatSchurExpr.h:254
std::forward_iterator_tag IteratorCategory
The iterator category.
Definition: DMatSMatSchurExpr.h:180
Header file for the Computation base class.
Constraints on the storage order of matrix types.
bool isAliased(const T *alias) const noexcept
Returns whether the expression is aliased with the given address alias.
Definition: DMatSMatSchurExpr.h:495
constexpr void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
Header file for the IsUniLower type trait.
#define BLAZE_CONSTRAINT_MUST_FORM_VALID_SCHUREXPR(T1, T2)
Constraint on the data type.In case the given data types T1 and T2 do not form a valid matrix/matrix ...
Definition: SchurExpr.h:103
ValueType & ReferenceType
Reference return type.
Definition: DMatSMatSchurExpr.h:183
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
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:137
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Header file for all forward declarations for sparse vectors and matrices.
ReturnType_t< MT2 > RN2
Return type of the right-hand side sparse matrix expression.
Definition: DMatSMatSchurExpr.h:110
Header file for the SparseMatrix base class.
ConstIterator end(size_t i) const
Returns an iterator just past the last non-zero element of row i.
Definition: DMatSMatSchurExpr.h:371
Constraint on the data type.
Constraint on the data type.
Header file for the Maximum class template.
typename EnableIf< Condition, T >::Type EnableIf_t
Auxiliary type for the EnableIf class template.The EnableIf_t alias declaration provides a convenient...
Definition: EnableIf.h:138
Iterator over the elements of the dense matrix/sparse matrix Schur product expression.
Definition: DMatSMatSchurExpr.h:170
Header file for the ValueIndexPair class.
Header file for the DisableIf class template.
Header file for the IsTemporary type trait class.
Header file for the IsStrictlyUpper type trait.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the If class template.
#define BLAZE_CONSTRAINT_MUST_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is not a zero vector or matrix type...
Definition: Zero.h:61
ReturnType at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DMatSMatSchurExpr.h:343
If_t< IsExpression_v< MT1 >, const MT1, const MT1 &> LeftOperand
Composite type of the left-hand side dense matrix expression.
Definition: DMatSMatSchurExpr.h:161
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.This macro encapsulates the default way of Bl...
Definition: Exception.h:331
SchurTrait_t< RT1, RT2 > ResultType
Result type for expression template evaluations.
Definition: DMatSMatSchurExpr.h:149
ValueType * PointerType
Pointer return type.
Definition: DMatSMatSchurExpr.h:182
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:3086
bool canAlias(const T *alias) const noexcept
Returns whether the expression can alias with the given address alias.
Definition: DMatSMatSchurExpr.h:483
bool operator==(const ConstIterator &rhs) const
Equality comparison between two ConstIterator objects.
Definition: DMatSMatSchurExpr.h:265
Header file for the IsLower type trait.
LeftOperand leftOperand() const noexcept
Returns the left-hand side dense matrix operand.
Definition: DMatSMatSchurExpr.h:461
ResultType_t< MT2 > RT2
Result type of the right-hand side sparse matrix expression.
Definition: DMatSMatSchurExpr.h:108
Header file for the exception macros of the math module.
LeftOperand lhs_
Left-hand side dense matrix of the Schur product expression.
Definition: DMatSMatSchurExpr.h:502
Constraint on the data type.
Header file for all forward declarations for expression class templates.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
ElementType_t< ResultType > ElementType
Resulting element type.
Definition: DMatSMatSchurExpr.h:152
size_t row_
The row index of the iterator.
Definition: DMatSMatSchurExpr.h:296
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
IteratorCategory iterator_category
The iterator category.
Definition: DMatSMatSchurExpr.h:187
static constexpr bool returnExpr
Compilation switch for the selection of the subscript operator return type.
Definition: DMatSMatSchurExpr.h:122
DifferenceType operator-(const ConstIterator &rhs) const
Calculating the number of elements between two expression iterators.
Definition: DMatSMatSchurExpr.h:287
#define BLAZE_CONSTRAINT_MUST_BE_ROW_MAJOR_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a row-major dense or sparse matrix t...
Definition: RowMajorMatrix.h:61
const Element operator*() const
Direct access to the sparse matrix element at the current iterator position.
Definition: DMatSMatSchurExpr.h:224
Base class for all Schur product expression templates.The SchurExpr class serves as a tag for all exp...
Definition: SchurExpr.h:66
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
Header file for run time assertion macros.
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
DMatSMatSchurExpr(const MT1 &lhs, const MT2 &rhs) noexcept
Constructor for the DMatSMatSchurExpr class.
Definition: DMatSMatSchurExpr.h:312
ValueIndexPair< ElementType > Element
Element type of the sparse matrix expression.
Definition: DMatSMatSchurExpr.h:175
static constexpr bool useAssign
Compilation switch for the evaluation strategy of the Schur product expression.
Definition: DMatSMatSchurExpr.h:136
Header file for the SchurExpr base class.
decltype(auto) row(Matrix< MT, SO > &, RRAs...)
Creating a view on a specific row of the given matrix.
Definition: Row.h:133
typename SchurTrait< T1, T2 >::Type SchurTrait_t
Auxiliary alias declaration for the SchurTrait class template.The SchurTrait_t alias declaration prov...
Definition: SchurTrait.h:164
Header file for the IsZero type trait.
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
Element ValueType
Type of the underlying pointers.
Definition: DMatSMatSchurExpr.h:181
ConstIterator begin(size_t i) const
Returns an iterator to the first non-zero element of row i.
Definition: DMatSMatSchurExpr.h:360
size_t rows() const noexcept
Returns the current number of rows of the matrix.
Definition: DMatSMatSchurExpr.h:381
static constexpr bool smpAssignable
Compilation switch for the expression template assignment strategy.
Definition: DMatSMatSchurExpr.h:303
ConstIterator(LeftOperand left, RightIterator right, size_t row)
Constructor for the ConstIterator class.
Definition: DMatSMatSchurExpr.h:201
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: DMatSMatSchurExpr.h:437
decltype(auto) serial(const DenseMatrix< MT, SO > &dm)
Forces the serial evaluation of the given dense matrix expression dm.
Definition: DMatSerialExpr.h:808
ReturnType_t< MT1 > RN1
Return type of the left-hand side dense matrix expression.
Definition: DMatSMatSchurExpr.h:109
ConstIterator_t< RemoveReference_t< RightOperand > > RightIterator
Iterator type of the sparse matrix expression.
Definition: DMatSMatSchurExpr.h:178
#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
auto smpSchurAssign(Matrix< MT1, SO1 > &lhs, const Matrix< MT2, SO2 > &rhs) -> EnableIf_t< IsDenseMatrix_v< MT1 > >
Default implementation of the SMP Schur product assignment of a matrix to dense matrix.
Definition: DenseMatrix.h:194
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
Header file for the RemoveReference type trait.
bool operator!=(const ConstIterator &rhs) const
Inequality comparison between two ConstIterator objects.
Definition: DMatSMatSchurExpr.h:276
RightOperand rhs_
Right-hand side sparse matrix of the Schur product expression.
Definition: DMatSMatSchurExpr.h:503
size_t nonZeros() const
Returns the number of non-zero elements in the sparse matrix.
Definition: DMatSMatSchurExpr.h:401
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
const If_t< returnExpr, ExprReturnType, ElementType > ReturnType
Return type for expression template evaluations.
Definition: DMatSMatSchurExpr.h:155
ReturnType operator()(size_t i, size_t j) const
2D-access to the matrix elements.
Definition: DMatSMatSchurExpr.h:328
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:3081
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
TransposeType_t< ResultType > TransposeType
Transpose type for expression template evaluations.
Definition: DMatSMatSchurExpr.h:151
Base class for all compute expression templates.The Computation class serves as a tag for all computa...
Definition: Computation.h:66
Header file for the IntegralConstant class template.
ReturnType value() const
Access to the current value of the sparse element.
Definition: DMatSMatSchurExpr.h:244
If_t< IsExpression_v< MT2 >, const MT2, const MT2 &> RightOperand
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatSchurExpr.h:164
Header file for the IsUpper type trait.
ResultType_t< MT1 > RT1
Result type of the left-hand side dense matrix expression.
Definition: DMatSMatSchurExpr.h:107
CompositeType_t< MT2 > CT2
Composite type of the right-hand side sparse matrix expression.
Definition: DMatSMatSchurExpr.h:112
Header file for the Size type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_ZERO_TYPE(T)
Constraint on the data type.In case the given data type T is a zero vector or matrix type...
Definition: Zero.h:81
#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
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:61
If_t< Less< T1, T2 >::value, T2, T1 > Maximum
Compile time value evaluation.The Maximum alias declaration selects the larger of the two given templ...
Definition: Maximum.h:73
Header file for the IsExpression type trait class.
size_t columns() const noexcept
Returns the current number of columns of the matrix.
Definition: DMatSMatSchurExpr.h:391
Header file for the function trace functionality.
Constraint on the data type.