Blaze  3.6
ZeroMatrix.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_SPARSE_ZEROMATRIX_H_
36 #define _BLAZE_MATH_SPARSE_ZEROMATRIX_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
44 #include <blaze/math/Exception.h>
47 #include <blaze/math/Forward.h>
82 #include <blaze/util/Assert.h>
87 #include <blaze/util/EnableIf.h>
90 #include <blaze/util/MaybeUnused.h>
91 #include <blaze/util/Types.h>
93 
94 
95 namespace blaze {
96 
97 //=================================================================================================
98 //
99 // CLASS DEFINITION
100 //
101 //=================================================================================================
102 
103 //*************************************************************************************************
178 template< typename Type // Data type of the matrix
179  , bool SO = defaultStorageOrder > // Storage order
180 class ZeroMatrix
181  : public Expression< SparseMatrix< ZeroMatrix<Type,SO>, SO > >
182 {
183  private:
184  //**Type definitions****************************************************************************
186  //**********************************************************************************************
187 
188  public:
189  //**Type definitions****************************************************************************
192  using ResultType = This;
195  using ElementType = Type;
196  using ReturnType = const Type&;
197  using CompositeType = const This&;
198  using Reference = const Type&;
199  using ConstReference = const Type&;
200  using Iterator = Element*;
201  using ConstIterator = const Element*;
202  //**********************************************************************************************
203 
204  //**Rebind struct definition********************************************************************
207  template< typename NewType > // Data type of the other matrix
208  struct Rebind {
210  };
211  //**********************************************************************************************
212 
213  //**Resize struct definition********************************************************************
216  template< size_t NewM // Number of rows of the other matrix
217  , size_t NewN > // Number of columns of the other matrix
218  struct Resize {
220  };
221  //**********************************************************************************************
222 
223  //**Compilation flags***************************************************************************
225 
228  static constexpr bool smpAssignable = !IsSMPAssignable_v<Type>;
229  //**********************************************************************************************
230 
231  //**Constructors********************************************************************************
234  explicit inline constexpr ZeroMatrix() noexcept;
235  explicit inline constexpr ZeroMatrix( size_t m, size_t n ) noexcept;
236 
237  template< typename MT, bool SO2 >
238  explicit inline ZeroMatrix( const Matrix<MT,SO2>& m );
239 
240  ZeroMatrix( const ZeroMatrix& ) = default;
241  ZeroMatrix( ZeroMatrix&& ) = default;
243  //**********************************************************************************************
244 
245  //**Destructor**********************************************************************************
248  ~ZeroMatrix() = default;
250  //**********************************************************************************************
251 
252  //**Data access functions***********************************************************************
255  inline constexpr ConstReference operator()( size_t i, size_t j ) const noexcept;
256  inline ConstReference at( size_t i, size_t j ) const;
257  inline constexpr ConstIterator begin ( size_t i ) const noexcept;
258  inline constexpr ConstIterator cbegin( size_t i ) const noexcept;
259  inline constexpr ConstIterator end ( size_t i ) const noexcept;
260  inline constexpr ConstIterator cend ( size_t i ) const noexcept;
262  //**********************************************************************************************
263 
264  //**Assignment operators************************************************************************
267  template< typename MT, bool SO2 >
268  inline ZeroMatrix& operator=( const Matrix<MT,SO2>& rhs );
269 
270  ZeroMatrix& operator=( const ZeroMatrix& ) = default;
271  ZeroMatrix& operator=( ZeroMatrix&& ) = default;
273  //**********************************************************************************************
274 
275  //**Utility functions***************************************************************************
278  inline constexpr size_t rows() const noexcept;
279  inline constexpr size_t columns() const noexcept;
280  inline constexpr size_t capacity() const noexcept;
281  inline constexpr size_t capacity( size_t i ) const noexcept;
282  inline constexpr size_t nonZeros() const noexcept;
283  inline constexpr size_t nonZeros( size_t i ) const noexcept;
284  inline constexpr void clear() noexcept;
285  constexpr void resize( size_t m, size_t n ) noexcept;
286  inline constexpr void swap( ZeroMatrix& m ) noexcept;
288  //**********************************************************************************************
289 
290  //**Lookup functions****************************************************************************
293  inline ConstIterator find ( size_t i, size_t j ) const;
294  inline ConstIterator lowerBound( size_t i, size_t j ) const;
295  inline ConstIterator upperBound( size_t i, size_t j ) const;
297  //**********************************************************************************************
298 
299  //**Numeric functions***************************************************************************
302  inline constexpr ZeroMatrix& transpose() noexcept;
303  inline constexpr ZeroMatrix& ctranspose() noexcept;
305  //**********************************************************************************************
306 
307  //**Expression template evaluation functions****************************************************
310  template< typename Other > inline bool canAlias ( const Other* alias ) const noexcept;
311  template< typename Other > inline bool isAliased( const Other* alias ) const noexcept;
312 
313  inline bool canSMPAssign() const noexcept;
315  //**********************************************************************************************
316 
317  private:
318  //**Member variables****************************************************************************
321  size_t m_;
322  size_t n_;
323 
324  static const Type zero_;
325 
326  //**********************************************************************************************
327 
328  //**Compile time checks*************************************************************************
335  //**********************************************************************************************
336 };
337 //*************************************************************************************************
338 
339 
340 
341 
342 //=================================================================================================
343 //
344 // DEFINITION AND INITIALIZATION OF THE STATIC MEMBER VARIABLES
345 //
346 //=================================================================================================
347 
348 template< typename Type, bool SO >
349 const Type ZeroMatrix<Type,SO>::zero_{};
350 
351 
352 
353 
354 //=================================================================================================
355 //
356 // CONSTRUCTORS
357 //
358 //=================================================================================================
359 
360 //*************************************************************************************************
363 template< typename Type // Data type of the matrix
364  , bool SO > // Storage order
365 inline constexpr ZeroMatrix<Type,SO>::ZeroMatrix() noexcept
366  : m_( 0UL ) // The current number of rows of the zero matrix
367  , n_( 0UL ) // The current number of columns of the zero matrix
368 {}
369 //*************************************************************************************************
370 
371 
372 //*************************************************************************************************
378 template< typename Type // Data type of the matrix
379  , bool SO > // Storage order
380 inline constexpr ZeroMatrix<Type,SO>::ZeroMatrix( size_t m, size_t n ) noexcept
381  : m_( m ) // The current number of rows of the zero matrix
382  , n_( n ) // The current number of columns of the zero matrix
383 {}
384 //*************************************************************************************************
385 
386 
387 //*************************************************************************************************
396 template< typename Type // Data type of the matrix
397  , bool SO > // Storage order
398 template< typename MT // Type of the foreign zero matrix
399  , bool SO2 > // Storage order of the foreign zero matrix
401  : m_( (~m).rows() ) // The current number of rows of the zero matrix
402  , n_( (~m).columns() ) // The current number of columns of the zero matrix
403 {
404  if( !IsZero_v<MT> && !isZero( ~m ) ) {
405  BLAZE_THROW_INVALID_ARGUMENT( "Invalid setup of zero matrix" );
406  }
407 }
408 //*************************************************************************************************
409 
410 
411 
412 
413 //=================================================================================================
414 //
415 // DATA ACCESS FUNCTIONS
416 //
417 //=================================================================================================
418 
419 //*************************************************************************************************
429 template< typename Type // Data type of the matrix
430  , bool SO > // Storage order
431 inline constexpr typename ZeroMatrix<Type,SO>::ConstReference
432  ZeroMatrix<Type,SO>::operator()( size_t i, size_t j ) const noexcept
433 {
434  MAYBE_UNUSED( i, j );
435 
436  BLAZE_USER_ASSERT( i < rows() , "Invalid zero matrix row access index" );
437  BLAZE_USER_ASSERT( j < columns(), "Invalid zero matrix column access index" );
438 
439  return zero_;
440 }
441 //*************************************************************************************************
442 
443 
444 //*************************************************************************************************
455 template< typename Type // Data type of the matrix
456  , bool SO > // Storage order
458  ZeroMatrix<Type,SO>::at( size_t i, size_t j ) const
459 {
460  if( i >= m_ ) {
461  BLAZE_THROW_OUT_OF_RANGE( "Invalid row access index" );
462  }
463  if( j >= n_ ) {
464  BLAZE_THROW_OUT_OF_RANGE( "Invalid column access index" );
465  }
466 
467  return zero_;
468 }
469 //*************************************************************************************************
470 
471 
472 //*************************************************************************************************
483 template< typename Type // Data type of the matrix
484  , bool SO > // Storage order
485 inline constexpr typename ZeroMatrix<Type,SO>::ConstIterator
486  ZeroMatrix<Type,SO>::begin( size_t i ) const noexcept
487 {
488  MAYBE_UNUSED( i );
489 
490  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
491 
492  return nullptr;
493 }
494 //*************************************************************************************************
495 
496 
497 //*************************************************************************************************
508 template< typename Type // Data type of the matrix
509  , bool SO > // Storage order
510 inline constexpr typename ZeroMatrix<Type,SO>::ConstIterator
511  ZeroMatrix<Type,SO>::cbegin( size_t i ) const noexcept
512 {
513  MAYBE_UNUSED( i );
514 
515  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
516 
517  return nullptr;
518 }
519 //*************************************************************************************************
520 
521 
522 //*************************************************************************************************
533 template< typename Type // Data type of the matrix
534  , bool SO > // Storage order
535 inline constexpr typename ZeroMatrix<Type,SO>::ConstIterator
536  ZeroMatrix<Type,SO>::end( size_t i ) const noexcept
537 {
538  MAYBE_UNUSED( i );
539 
540  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
541 
542  return nullptr;
543 }
544 //*************************************************************************************************
545 
546 
547 //*************************************************************************************************
558 template< typename Type // Data type of the matrix
559  , bool SO > // Storage order
560 inline constexpr typename ZeroMatrix<Type,SO>::ConstIterator
561  ZeroMatrix<Type,SO>::cend( size_t i ) const noexcept
562 {
563  MAYBE_UNUSED( i );
564 
565  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
566 
567  return nullptr;
568 }
569 //*************************************************************************************************
570 
571 
572 
573 
574 //=================================================================================================
575 //
576 // ASSIGNMENT OPERATORS
577 //
578 //=================================================================================================
579 
580 //*************************************************************************************************
590 template< typename Type // Data type of the matrix
591  , bool SO > // Storage order
592 template< typename MT // Type of the right-hand side zero matrix
593  , bool SO2 > // Storage order of the right-hand side zero matrix
594 inline ZeroMatrix<Type,SO>&
596 {
597  if( !IsZero_v<MT> && !isZero( ~rhs ) ) {
598  BLAZE_THROW_INVALID_ARGUMENT( "Invalid assignment of zero matrix" );
599  }
600 
601  const size_t m( (~rhs).rows() );
602  const size_t n( (~rhs).columns() );
603 
604  m_ = m;
605  n_ = n;
606 
607  return *this;
608 }
609 //*************************************************************************************************
610 
611 
612 
613 
614 //=================================================================================================
615 //
616 // UTILITY FUNCTIONS
617 //
618 //=================================================================================================
619 
620 //*************************************************************************************************
625 template< typename Type // Data type of the matrix
626  , bool SO > // Storage order
627 inline constexpr size_t ZeroMatrix<Type,SO>::rows() const noexcept
628 {
629  return m_;
630 }
631 //*************************************************************************************************
632 
633 
634 //*************************************************************************************************
639 template< typename Type // Data type of the matrix
640  , bool SO > // Storage order
641 inline constexpr size_t ZeroMatrix<Type,SO>::columns() const noexcept
642 {
643  return n_;
644 }
645 //*************************************************************************************************
646 
647 
648 //*************************************************************************************************
653 template< typename Type // Data type of the matrix
654  , bool SO > // Storage order
655 inline constexpr size_t ZeroMatrix<Type,SO>::capacity() const noexcept
656 {
657  return 0UL;
658 }
659 //*************************************************************************************************
660 
661 
662 //*************************************************************************************************
673 template< typename Type // Data type of the matrix
674  , bool SO > // Storage order
675 inline constexpr size_t ZeroMatrix<Type,SO>::capacity( size_t i ) const noexcept
676 {
677  MAYBE_UNUSED( i );
678 
679  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
680 
681  return 0UL;
682 }
683 //*************************************************************************************************
684 
685 
686 //*************************************************************************************************
691 template< typename Type // Data type of the matrix
692  , bool SO > // Storage order
693 inline constexpr size_t ZeroMatrix<Type,SO>::nonZeros() const noexcept
694 {
695  return 0UL;
696 }
697 //*************************************************************************************************
698 
699 
700 //*************************************************************************************************
711 template< typename Type // Data type of the matrix
712  , bool SO > // Storage order
713 inline constexpr size_t ZeroMatrix<Type,SO>::nonZeros( size_t i ) const noexcept
714 {
715  MAYBE_UNUSED( i );
716 
717  BLAZE_USER_ASSERT( i < ( SO ? n_ : m_ ), "Invalid zero matrix row/column access index" );
718 
719  return 0UL;
720 }
721 //*************************************************************************************************
722 
723 
724 //*************************************************************************************************
731 template< typename Type // Data type of the matrix
732  , bool SO > // Storage order
733 inline constexpr void ZeroMatrix<Type,SO>::clear() noexcept
734 {
735  m_ = 0UL;
736  n_ = 0UL;
737 }
738 //*************************************************************************************************
739 
740 
741 //*************************************************************************************************
752 template< typename Type // Data type of the matrix
753  , bool SO > // Storage order
754 void constexpr ZeroMatrix<Type,SO>::resize( size_t m, size_t n ) noexcept
755 {
756  m_ = m;
757  n_ = n;
758 }
759 //*************************************************************************************************
760 
761 
762 //*************************************************************************************************
768 template< typename Type // Data type of the matrix
769  , bool SO > // Storage order
770 inline constexpr void ZeroMatrix<Type,SO>::swap( ZeroMatrix& m ) noexcept
771 {
772  const size_t tmp1( m_ );
773  m_ = m.m_;
774  m.m_ = tmp1;
775 
776  const size_t tmp2( n_ );
777  n_ = m.n_;
778  m.n_ = tmp2;
779 }
780 //*************************************************************************************************
781 
782 
783 
784 
785 //=================================================================================================
786 //
787 // LOOKUP FUNCTIONS
788 //
789 //=================================================================================================
790 
791 //*************************************************************************************************
804 template< typename Type // Data type of the matrix
805  , bool SO > // Storage order
807  ZeroMatrix<Type,SO>::find( size_t i, size_t j ) const
808 {
809  MAYBE_UNUSED( i, j );
810 
811  BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
812  BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
813 
814  return nullptr;
815 }
816 //*************************************************************************************************
817 
818 
819 //*************************************************************************************************
832 template< typename Type // Data type of the matrix
833  , bool SO > // Storage order
835  ZeroMatrix<Type,SO>::lowerBound( size_t i, size_t j ) const
836 {
837  MAYBE_UNUSED( i, j );
838 
839  BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
840  BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
841 
842  return nullptr;
843 }
844 //*************************************************************************************************
845 
846 
847 //*************************************************************************************************
860 template< typename Type // Data type of the matrix
861  , bool SO > // Storage order
863  ZeroMatrix<Type,SO>::upperBound( size_t i, size_t j ) const
864 {
865  MAYBE_UNUSED( i, j );
866 
867  BLAZE_USER_ASSERT( SO || i < rows() , "Invalid zero matrix row access index" );
868  BLAZE_USER_ASSERT( !SO || j < columns(), "Invalid zero matrix column access index" );
869 
870  return nullptr;
871 }
872 //*************************************************************************************************
873 
874 
875 
876 
877 //=================================================================================================
878 //
879 // NUMERIC FUNCTIONS
880 //
881 //=================================================================================================
882 
883 //*************************************************************************************************
888 template< typename Type // Data type of the matrix
889  , bool SO > // Storage order
891 {
892  const size_t tmp( m_ );
893  m_ = n_;
894  n_ = tmp;
895 
896  return *this;
897 }
898 //*************************************************************************************************
899 
900 
901 //*************************************************************************************************
906 template< typename Type // Data type of the matrix
907  , bool SO > // Storage order
909 {
910  const size_t tmp( m_ );
911  m_ = n_;
912  n_ = tmp;
913 
914  return *this;
915 }
916 //*************************************************************************************************
917 
918 
919 
920 
921 //=================================================================================================
922 //
923 // EXPRESSION TEMPLATE EVALUATION FUNCTIONS
924 //
925 //=================================================================================================
926 
927 //*************************************************************************************************
937 template< typename Type // Data type of the matrix
938  , bool SO > // Storage order
939 template< typename Other > // Data type of the foreign expression
940 inline bool ZeroMatrix<Type,SO>::canAlias( const Other* alias ) const noexcept
941 {
942  MAYBE_UNUSED( alias );
943 
944  return false;
945 }
946 //*************************************************************************************************
947 
948 
949 //*************************************************************************************************
959 template< typename Type // Data type of the matrix
960  , bool SO > // Storage order
961 template< typename Other > // Data type of the foreign expression
962 inline bool ZeroMatrix<Type,SO>::isAliased( const Other* alias ) const noexcept
963 {
964  MAYBE_UNUSED( alias );
965 
966  return false;
967 }
968 //*************************************************************************************************
969 
970 
971 //*************************************************************************************************
981 template< typename Type // Data type of the matrix
982  , bool SO > // Storage order
983 inline bool ZeroMatrix<Type,SO>::canSMPAssign() const noexcept
984 {
985  return false;
986 }
987 //*************************************************************************************************
988 
989 
990 
991 
992 
993 
994 
995 
996 //=================================================================================================
997 //
998 // ZEROMATRIX OPERATORS
999 //
1000 //=================================================================================================
1001 
1002 //*************************************************************************************************
1005 template< typename Type, bool SO >
1006 constexpr void reset( ZeroMatrix<Type,SO>& m ) noexcept;
1007 
1008 template< typename Type, bool SO >
1009 constexpr void reset( ZeroMatrix<Type,SO>& m, size_t i ) noexcept;
1010 
1011 template< typename Type, bool SO >
1012 constexpr void clear( ZeroMatrix<Type,SO>& m ) noexcept;
1013 
1014 template< bool RF, typename Type, bool SO >
1015 constexpr bool isDefault( const ZeroMatrix<Type,SO>& m ) noexcept;
1016 
1017 template< typename Type, bool SO >
1018 constexpr bool isIntact( const ZeroMatrix<Type,SO>& m ) noexcept;
1019 
1020 template< typename Type, bool SO >
1021 constexpr void swap( ZeroMatrix<Type,SO>& a, ZeroMatrix<Type,SO>& b ) noexcept;
1023 //*************************************************************************************************
1024 
1025 
1026 //*************************************************************************************************
1033 template< typename Type // Data type of the matrix
1034  , bool SO > // Storage order
1035 inline constexpr void reset( ZeroMatrix<Type,SO>& m ) noexcept
1036 {
1037  MAYBE_UNUSED( m );
1038 }
1039 //*************************************************************************************************
1040 
1041 
1042 //*************************************************************************************************
1054 template< typename Type // Data type of the matrix
1055  , bool SO > // Storage order
1056 inline constexpr void reset( ZeroMatrix<Type,SO>& m, size_t i ) noexcept
1057 {
1058  MAYBE_UNUSED( m, i );
1059 }
1060 //*************************************************************************************************
1061 
1062 
1063 //*************************************************************************************************
1070 template< typename Type // Data type of the matrix
1071  , bool SO > // Storage order
1072 inline constexpr void clear( ZeroMatrix<Type,SO>& m ) noexcept
1073 {
1074  m.clear();
1075 }
1076 //*************************************************************************************************
1077 
1078 
1079 //*************************************************************************************************
1104 template< bool RF // Relaxation flag
1105  , typename Type // Data type of the matrix
1106  , bool SO > // Storage order
1107 inline constexpr bool isDefault( const ZeroMatrix<Type,SO>& m ) noexcept
1108 {
1109  return ( m.rows() == 0UL && m.columns() == 0UL );
1110 }
1111 //*************************************************************************************************
1112 
1113 
1114 //*************************************************************************************************
1131 template< typename Type // Data type of the matrix
1132  , bool SO > // Storage order
1133 inline constexpr bool isIntact( const ZeroMatrix<Type,SO>& m ) noexcept
1134 {
1135  MAYBE_UNUSED( m );
1136 
1137  return true;
1138 }
1139 //*************************************************************************************************
1140 
1141 
1142 //*************************************************************************************************
1150 template< typename Type // Data type of the matrix
1151  , bool SO > // Storage order
1152 inline constexpr void swap( ZeroMatrix<Type,SO>& a, ZeroMatrix<Type,SO>& b ) noexcept
1153 {
1154  a.swap( b );
1155 }
1156 //*************************************************************************************************
1157 
1158 
1159 //*************************************************************************************************
1169 template< typename Type // Data type of the matrix
1170  , bool SO > // Storage order
1171 inline void erase( ZeroMatrix<Type,SO>& m, size_t i, size_t j )
1172 {
1173  MAYBE_UNUSED( m, i, j );
1174 }
1176 //*************************************************************************************************
1177 
1178 
1179 //*************************************************************************************************
1193 template< typename Type // Data type of the matrix
1194  , bool SO // Storage order
1195  , typename Iterator > // Type of the matrix iterator
1196 inline Iterator erase( ZeroMatrix<Type,SO>& m, size_t i, Iterator pos )
1197 {
1198  MAYBE_UNUSED( m, i, pos );
1199  return Iterator();
1200 }
1202 //*************************************************************************************************
1203 
1204 
1205 //*************************************************************************************************
1221 template< typename Type // Data type of the matrix
1222  , bool SO // Storage order
1223  , typename Iterator > // Type of the matrix iterator
1224 inline Iterator erase( ZeroMatrix<Type,SO>& m, size_t i, Iterator first, Iterator last )
1225 {
1226  MAYBE_UNUSED( m, i, first, last );
1227  return Iterator();
1228 }
1230 //*************************************************************************************************
1231 
1232 
1233 //*************************************************************************************************
1257 template< typename Type // Data type of the matrix
1258  , bool SO // Storage order
1259  , typename Pred > // Type of the unary predicate
1260 inline void erase( ZeroMatrix<Type,SO>& m, Pred predicate )
1261 {
1262  MAYBE_UNUSED( m, predicate );
1263 }
1265 //*************************************************************************************************
1266 
1267 
1268 //*************************************************************************************************
1298 template< typename Type // Data type of the matrix
1299  , bool SO // Storage order
1300  , typename Iterator // Type of the matrix iterator
1301  , typename Pred > // Type of the unary predicate
1302 inline void erase( ZeroMatrix<Type,SO>& m, size_t i, Iterator first, Iterator last, Pred predicate )
1303 {
1304  MAYBE_UNUSED( m, i, first, last, predicate );
1305 }
1307 //*************************************************************************************************
1308 
1309 
1310 
1311 
1312 //=================================================================================================
1313 //
1314 // GLOBAL FUNCTIONS
1315 //
1316 //=================================================================================================
1317 
1318 //*************************************************************************************************
1352 template< typename T, bool SO = defaultStorageOrder >
1353 inline constexpr decltype(auto) zero( size_t m, size_t n ) noexcept
1354 {
1355  return ZeroMatrix<T,SO>( m, n );
1356 }
1357 //*************************************************************************************************
1358 
1359 
1360 //*************************************************************************************************
1376 template< typename MT // Type of the matrix
1377  , bool SO > // Storage order
1378 inline ZeroMatrix<ElementType_t<MT>,SO>
1380 {
1382 
1383  return ZeroMatrix<ElementType_t<MT>,SO>( (~m).rows(), (~m).columns() );
1384 }
1385 //*************************************************************************************************
1386 
1387 
1388 
1389 
1390 //=================================================================================================
1391 //
1392 // ISUNIFORM SPECIALIZATIONS
1393 //
1394 //=================================================================================================
1395 
1396 //*************************************************************************************************
1398 template< typename Type, bool SO >
1399 struct IsUniform< ZeroMatrix<Type,SO> >
1400  : public TrueType
1401 {};
1403 //*************************************************************************************************
1404 
1405 
1406 
1407 
1408 //=================================================================================================
1409 //
1410 // ISZERO SPECIALIZATIONS
1411 //
1412 //=================================================================================================
1413 
1414 //*************************************************************************************************
1416 template< typename Type, bool SO >
1417 struct IsZero< ZeroMatrix<Type,SO> >
1418  : public TrueType
1419 {};
1421 //*************************************************************************************************
1422 
1423 
1424 
1425 
1426 //=================================================================================================
1427 //
1428 // ISRESIZABLE SPECIALIZATIONS
1429 //
1430 //=================================================================================================
1431 
1432 //*************************************************************************************************
1434 template< typename Type, bool SO >
1435 struct IsResizable< ZeroMatrix<Type,SO> >
1436  : public TrueType
1437 {};
1439 //*************************************************************************************************
1440 
1441 
1442 
1443 
1444 //=================================================================================================
1445 //
1446 // ADDTRAIT SPECIALIZATIONS
1447 //
1448 //=================================================================================================
1449 
1450 //*************************************************************************************************
1452 template< typename T1, typename T2 >
1453 struct AddTraitEval1< T1, T2
1454  , EnableIf_t< IsMatrix_v<T1> &&
1455  IsMatrix_v<T2> &&
1456  !IsZero_v<T1> && IsZero_v<T2> > >
1457 {
1458  using Type = Rebind_t< ResultType_t<T1>, AddTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1459 };
1460 
1461 template< typename T1, typename T2 >
1462 struct AddTraitEval1< T1, T2
1463  , EnableIf_t< IsMatrix_v<T1> &&
1464  IsMatrix_v<T2> &&
1465  IsZero_v<T1> && !IsZero_v<T2> > >
1466 {
1467  using Type = Rebind_t< ResultType_t<T2>, AddTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1468 };
1469 
1470 template< typename T1, typename T2 >
1471 struct AddTraitEval1< T1, T2
1472  , EnableIf_t< IsMatrix_v<T1> &&
1473  IsMatrix_v<T2> &&
1474  IsZero_v<T1> && IsZero_v<T2> > >
1475 {
1476  using ET1 = ElementType_t<T1>;
1477  using ET2 = ElementType_t<T2>;
1478 
1479  static constexpr bool SO = ( StorageOrder_v<T1> && StorageOrder_v<T2> );
1480 
1481  using Type = ZeroMatrix< AddTrait_t<ET1,ET2>, SO >;
1482 };
1484 //*************************************************************************************************
1485 
1486 
1487 
1488 
1489 //=================================================================================================
1490 //
1491 // SUBTRAIT SPECIALIZATIONS
1492 //
1493 //=================================================================================================
1494 
1495 //*************************************************************************************************
1497 template< typename T1, typename T2 >
1498 struct SubTraitEval1< T1, T2
1499  , EnableIf_t< IsMatrix_v<T1> &&
1500  IsMatrix_v<T2> &&
1501  !IsZero_v<T1> && IsZero_v<T2> > >
1502 {
1503  using Type = Rebind_t< ResultType_t<T1>, SubTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1504 };
1505 
1506 template< typename T1, typename T2 >
1507 struct SubTraitEval1< T1, T2
1508  , EnableIf_t< IsMatrix_v<T1> &&
1509  IsMatrix_v<T2> &&
1510  IsZero_v<T1> && !IsZero_v<T2> && !IsIdentity_v<T2> > >
1511 {
1512  using Type = Rebind_t< ResultType_t<T2>, SubTrait_t< ElementType_t<T1>, ElementType_t<T2> > >;
1513 };
1514 
1515 template< typename T1, typename T2 >
1516 struct SubTraitEval1< T1, T2
1517  , EnableIf_t< IsMatrix_v<T1> &&
1518  IsMatrix_v<T2> &&
1519  IsZero_v<T1> && IsZero_v<T2> > >
1520 {
1521  using ET1 = ElementType_t<T1>;
1522  using ET2 = ElementType_t<T2>;
1523 
1524  static constexpr bool SO = ( StorageOrder_v<T1> && StorageOrder_v<T2> );
1525 
1526  using Type = ZeroMatrix< SubTrait_t<ET1,ET2>, SO >;
1527 };
1529 //*************************************************************************************************
1530 
1531 
1532 
1533 
1534 //=================================================================================================
1535 //
1536 // SCHURTRAIT SPECIALIZATIONS
1537 //
1538 //=================================================================================================
1539 
1540 //*************************************************************************************************
1542 template< typename T1, typename T2 >
1543 struct SchurTraitEval1< T1, T2
1544  , EnableIf_t< IsMatrix_v<T1> &&
1545  IsMatrix_v<T2> &&
1546  ( IsZero_v<T1> ||
1547  IsZero_v<T2> ||
1548  ( IsStrictlyLower_v<T1> && IsUpper_v<T2> ) ||
1549  ( IsStrictlyUpper_v<T1> && IsLower_v<T2> ) ||
1550  ( IsLower_v<T1> && IsStrictlyUpper_v<T2> ) ||
1551  ( IsUpper_v<T1> && IsStrictlyLower_v<T2> ) ) > >
1552 {
1553  using ET1 = ElementType_t<T1>;
1554  using ET2 = ElementType_t<T2>;
1555 
1556  static constexpr bool SO1 = StorageOrder_v<T1>;
1557  static constexpr bool SO2 = StorageOrder_v<T2>;
1558 
1559  static constexpr bool SO = ( IsSparseMatrix_v<T1> ^ IsSparseMatrix_v<T2>
1560  ? ( IsSparseMatrix_v<T1>
1561  ? SO1
1562  : SO2 )
1563  : SO1 && SO2 );
1564 
1565  using Type = ZeroMatrix< MultTrait_t<ET1,ET2>, SO >;
1566 };
1568 //*************************************************************************************************
1569 
1570 
1571 
1572 
1573 //=================================================================================================
1574 //
1575 // MULTTRAIT SPECIALIZATIONS
1576 //
1577 //=================================================================================================
1578 
1579 //*************************************************************************************************
1581 template< typename T1, typename T2 >
1582 struct MultTraitEval1< T1, T2
1583  , EnableIf_t< IsMatrix_v<T1> && IsZero_v<T1> && IsNumeric_v<T2> > >
1584 {
1585  using Type = ZeroMatrix< MultTrait_t< ElementType_t<T1>, T2 >, StorageOrder_v<T1> >;
1586 };
1587 
1588 template< typename T1, typename T2 >
1589 struct MultTraitEval1< T1, T2
1590  , EnableIf_t< IsNumeric_v<T1> && IsMatrix_v<T2> && IsZero_v<T2> > >
1591 {
1592  using Type = ZeroMatrix< MultTrait_t< T1, ElementType_t<T2> >, StorageOrder_v<T2> >;
1593 };
1594 
1595 template< typename T1, typename T2 >
1596 struct MultTraitEval1< T1, T2
1597  , EnableIf_t< IsColumnVector_v<T1> &&
1598  IsRowVector_v<T2> &&
1599  ( IsZero_v<T1> || IsZero_v<T2> ) > >
1600 {
1601  using ET1 = ElementType_t<T1>;
1602  using ET2 = ElementType_t<T2>;
1603 
1604  static constexpr bool SO = IsSparseVector_v<T1> && IsDenseVector_v<T2>;
1605 
1606  using Type = ZeroMatrix< MultTrait_t<ET1,ET2>, SO >;
1607 };
1608 
1609 template< typename T1, typename T2 >
1610 struct MultTraitEval1< T1, T2
1611  , EnableIf_t< IsMatrix_v<T1> &&
1612  IsMatrix_v<T2> &&
1613  ( IsZero_v<T1> || IsZero_v<T2> ) > >
1614 {
1615  using ET1 = ElementType_t<T1>;
1616  using ET2 = ElementType_t<T2>;
1617 
1618  static constexpr bool SO = ( IsZero_v<T1> ? StorageOrder_v<T1> : StorageOrder_v<T2> );
1619 
1620  using Type = ZeroMatrix< MultTrait_t<ET1,ET2>, SO >;
1621 };
1623 //*************************************************************************************************
1624 
1625 
1626 
1627 
1628 //=================================================================================================
1629 //
1630 // KRONTRAIT SPECIALIZATIONS
1631 //
1632 //=================================================================================================
1633 
1634 //*************************************************************************************************
1636 template< typename T1, typename T2 >
1637 struct KronTraitEval1< T1, T2
1638  , EnableIf_t< IsMatrix_v<T1> &&
1639  IsMatrix_v<T2> &&
1640  ( IsZero_v<T1> ||
1641  IsZero_v<T2> ) > >
1642 {
1643  using ET1 = ElementType_t<T1>;
1644  using ET2 = ElementType_t<T2>;
1645 
1646  static constexpr bool SO = ( IsZero_v<T2> ? StorageOrder_v<T2> : StorageOrder_v<T1> );
1647 
1648  using Type = ZeroMatrix< MultTrait_t<ET1,ET2>, SO >;
1649 };
1651 //*************************************************************************************************
1652 
1653 
1654 
1655 
1656 //=================================================================================================
1657 //
1658 // DIVTRAIT SPECIALIZATIONS
1659 //
1660 //=================================================================================================
1661 
1662 //*************************************************************************************************
1664 template< typename T1, typename T2 >
1665 struct DivTraitEval1< T1, T2
1666  , EnableIf_t< IsMatrix_v<T1> &&
1667  IsNumeric_v<T2> &&
1668  IsZero_v<T1> > >
1669 {
1670  using ET1 = ElementType_t<T1>;
1671 
1672  using Type = ZeroMatrix< DivTrait_t<ET1,T2>, StorageOrder_v<T1> >;
1673 };
1675 //*************************************************************************************************
1676 
1677 
1678 
1679 
1680 //=================================================================================================
1681 //
1682 // MAPTRAIT SPECIALIZATIONS
1683 //
1684 //=================================================================================================
1685 
1686 //*************************************************************************************************
1688 template< typename T, typename OP >
1689 struct UnaryMapTraitEval1< T, OP
1690  , EnableIf_t< IsMatrix_v<T> &&
1691  YieldsZero_v<OP,T> > >
1692 {
1693  using ET = ElementType_t<T>;
1694 
1695  using Type = ZeroMatrix< MapTrait_t<ET,OP>, StorageOrder_v<T> >;
1696 };
1698 //*************************************************************************************************
1699 
1700 
1701 //*************************************************************************************************
1703 template< typename T1, typename T2, typename OP >
1704 struct BinaryMapTraitEval1< T1, T2, OP
1705  , EnableIf_t< IsMatrix_v<T1> &&
1706  IsMatrix_v<T2> &&
1707  YieldsZero_v<OP,T1,T2> > >
1708 {
1709  using ET1 = ElementType_t<T1>;
1710  using ET2 = ElementType_t<T2>;
1711 
1712  static constexpr bool SO = StorageOrder_v<T1> && StorageOrder_v<T2>;
1713 
1714  using Type = ZeroMatrix< MapTrait_t<ET1,ET2,OP>, SO >;
1715 };
1717 //*************************************************************************************************
1718 
1719 
1720 
1721 
1722 //=================================================================================================
1723 //
1724 // EXPANDTRAIT SPECIALIZATIONS
1725 //
1726 //=================================================================================================
1727 
1728 //*************************************************************************************************
1730 template< typename T // Type to be expanded
1731  , size_t E > // Compile time expansion
1732 struct ExpandTraitEval1< T, E
1733  , EnableIf_t< IsVector_v<T> &&
1734  IsZero_v<T> > >
1735 {
1736  static constexpr bool TF = ( IsColumnVector_v<T> ? columnMajor : rowMajor );
1737 
1738  using Type = ZeroMatrix< ElementType_t<T>, TF >;
1739 };
1741 //*************************************************************************************************
1742 
1743 
1744 
1745 
1746 //=================================================================================================
1747 //
1748 // HIGHTYPE SPECIALIZATIONS
1749 //
1750 //=================================================================================================
1751 
1752 //*************************************************************************************************
1754 template< typename T1, bool SO, typename T2 >
1755 struct HighType< ZeroMatrix<T1,SO>, ZeroMatrix<T2,SO> >
1756 {
1757  using Type = ZeroMatrix< typename HighType<T1,T2>::Type, SO >;
1758 };
1760 //*************************************************************************************************
1761 
1762 
1763 
1764 
1765 //=================================================================================================
1766 //
1767 // LOWTYPE SPECIALIZATIONS
1768 //
1769 //=================================================================================================
1770 
1771 //*************************************************************************************************
1773 template< typename T1, bool SO, typename T2 >
1774 struct LowType< ZeroMatrix<T1,SO>, ZeroMatrix<T2,SO> >
1775 {
1776  using Type = ZeroMatrix< typename LowType<T1,T2>::Type, SO >;
1777 };
1779 //*************************************************************************************************
1780 
1781 
1782 
1783 
1784 //=================================================================================================
1785 //
1786 // SUBMATRIXTRAIT SPECIALIZATIONS
1787 //
1788 //=================================================================================================
1789 
1790 //*************************************************************************************************
1792 template< typename MT, size_t I, size_t J, size_t M, size_t N >
1793 struct SubmatrixTraitEval1< MT, I, J, M, N
1794  , EnableIf_t< IsZero_v<MT> > >
1795 {
1796  using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >, StorageOrder_v<MT> >;
1797 };
1799 //*************************************************************************************************
1800 
1801 
1802 
1803 
1804 //=================================================================================================
1805 //
1806 // ROWSTRAIT SPECIALIZATIONS
1807 //
1808 //=================================================================================================
1809 
1810 //*************************************************************************************************
1812 template< typename MT, size_t M >
1813 struct RowsTraitEval1< MT, M
1814  , EnableIf_t< IsZero_v<MT> > >
1815 {
1816  using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >, false >;
1817 };
1819 //*************************************************************************************************
1820 
1821 
1822 
1823 
1824 //=================================================================================================
1825 //
1826 // COLUMNSTRAIT SPECIALIZATIONS
1827 //
1828 //=================================================================================================
1829 
1830 //*************************************************************************************************
1832 template< typename MT, size_t N >
1833 struct ColumnsTraitEval1< MT, N
1834  , EnableIf_t< IsZero_v<MT> > >
1835 {
1836  using Type = ZeroMatrix< RemoveConst_t< ElementType_t<MT> >, true >;
1837 };
1839 //*************************************************************************************************
1840 
1841 } // namespace blaze
1842 
1843 #endif
Efficient implementation of an zero matrix.The ZeroMatrix class template is the representation of an...
Definition: Forward.h:50
constexpr ConstIterator end(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: ZeroMatrix.h:536
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type,...
Definition: Const.h:79
#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
Resize mechanism to obtain a ZeroMatrix with different fixed dimensions.
Definition: ZeroMatrix.h:218
Header file for auxiliary alias declarations.
Header file for the Schur product trait.
constexpr bool IsMatrix_v
Auxiliary variable template for the IsMatrix type trait.The IsMatrix_v variable template provides a c...
Definition: IsMatrix.h:138
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression,...
Definition: Assert.h:117
constexpr size_t nonZeros() const noexcept
Returns the number of non-zero elements in the zero matrix.
Definition: ZeroMatrix.h:693
Header file for the subtraction trait.
Header file for basic type definitions.
const Type & Reference
Reference to a zero matrix element.
Definition: ZeroMatrix.h:198
Header file for the IsSparseMatrix type trait.
Header file for the isZero shim.
const Type & ReturnType
Return type for expression template evaluations.
Definition: ZeroMatrix.h:196
Header file for the YieldsZero type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:595
Header file for the IsRowVector type trait.
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: ZeroMatrix.h:228
Header file for the MAYBE_UNUSED function template.
Header file for the IsIdentity type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type,...
Definition: Volatile.h:79
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Header file for all forward declarations of the math module.
constexpr void swap(ZeroMatrix &m) noexcept
Swapping the contents of two zero matrices.
Definition: ZeroMatrix.h:770
constexpr size_t rows() const noexcept
Returns the current number of rows of the zero matrix.
Definition: ZeroMatrix.h:627
ConstIterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: ZeroMatrix.h:807
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
constexpr bool rowMajor
Storage order flag for row-major matrices.
Definition: StorageOrder.h:71
ConstIterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: ZeroMatrix.h:863
bool canSMPAssign() const noexcept
Returns whether the matrix can be used in SMP assignments.
Definition: ZeroMatrix.h:983
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes....
Definition: Forward.h:145
size_t m_
The current number of rows of the zero matrix.
Definition: ZeroMatrix.h:321
Constraint on the data type.
Header file for the IsMatrix type trait.
Header file for the SparseMatrix base class.
decltype(auto) constexpr zero(size_t m, size_t n) noexcept
Creating a zero matrix.
Definition: ZeroMatrix.h:1353
ConstReference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: ZeroMatrix.h:458
bool isZero(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is 0.
Definition: DiagonalProxy.h:677
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
constexpr bool columnMajor
Storage order flag for column-major matrices.
Definition: StorageOrder.h:99
Header file for the ValueIndexPair class.
Header file for the LowType type trait.
Header file for the IsUniform type trait.
Header file for the multiplication trait.
Header file for the IsStrictlyUpper type trait.
bool canAlias(const Other *alias) const noexcept
Returns whether the matrix can alias with the given address alias.
Definition: ZeroMatrix.h:940
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Rebind mechanism to obtain a ZeroMatrix with different data/element type.
Definition: ZeroMatrix.h:208
#define BLAZE_CONSTRAINT_MUST_NOT_BE_POINTER_TYPE(T)
Constraint on the data type.In case the given data type T is not a pointer type, a compilation error ...
Definition: Pointer.h:79
Header file for the IsSMPAssignable type trait.
Header file for the expand trait.
constexpr ConstReference operator()(size_t i, size_t j) const noexcept
2D-access to the zero matrix elements.
Definition: ZeroMatrix.h:432
#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
constexpr void clear() noexcept
Clearing the zero matrix.
Definition: ZeroMatrix.h:733
ZeroMatrix< Type, SO > This
Type of this ZeroMatrix instance.
Definition: ZeroMatrix.h:190
size_t n_
The current number of columns of the zero matrix.
Definition: ZeroMatrix.h:322
constexpr ZeroMatrix & transpose() noexcept
In-place transpose of the matrix.
Definition: ZeroMatrix.h:890
ConstIterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: ZeroMatrix.h:835
constexpr bool IsNumeric_v
Auxiliary variable template for the IsNumeric type trait.The IsNumeric_v variable template provides a...
Definition: IsNumeric.h:143
Constraint on the data type.
ZeroMatrix< ElementType_t< MT >, SO > declzero(const Matrix< MT, SO > &m)
Declares the given matrix expression m as zero matrix.
Definition: ZeroMatrix.h:1379
constexpr ZeroMatrix() noexcept
The default constructor for ZeroMatrix.
Definition: ZeroMatrix.h:365
Header file for the IsLower type trait.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
constexpr size_t capacity() const noexcept
Returns the maximum capacity of the zero matrix.
Definition: ZeroMatrix.h:655
static const Type zero_
The zero element.
Definition: ZeroMatrix.h:324
Header file for the default storage order for all vectors of the Blaze library.
Header file for the Kron product trait.
const Type & ConstReference
Reference to a constant zero matrix element.
Definition: ZeroMatrix.h:199
Header file for the exception macros of the math module.
bool isAliased(const Other *alias) const noexcept
Returns whether the matrix is aliased with the given address alias.
Definition: ZeroMatrix.h:962
Header file for the IsVector type trait.
Header file for the EnableIf class template.
Header file for the IsStrictlyLower type trait.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
constexpr bool IsZero_v
Auxiliary variable template for the IsZero type trait.The IsZero_v variable template provides a conve...
Definition: IsZero.h:166
Header file for the RemoveConst type trait.
Header file for the IsSparseVector type trait.
constexpr void resize(size_t m, size_t n) noexcept
Changing the size of the zero matrix.
Definition: ZeroMatrix.h:754
constexpr ConstIterator cend(size_t i) const noexcept
Returns an iterator just past the last non-zero element of row/column i.
Definition: ZeroMatrix.h:561
Header file for run time assertion macros.
Header file for the addition trait.
Header file for the division trait.
Header file for the submatrix trait.
Constraint on the data type.
Header file for the columns trait.
constexpr ZeroMatrix & ctranspose() noexcept
In-place conjugate transpose of the matrix.
Definition: ZeroMatrix.h:908
Header file for the IsZero type trait.
constexpr bool IsVector_v
Auxiliary variable template for the IsVector type trait.The IsVector_v variable template provides a c...
Definition: IsVector.h:139
#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
#define BLAZE_CONSTRAINT_MUST_NOT_BE_REFERENCE_TYPE(T)
Constraint on the data type.In case the given data type T is not a reference type,...
Definition: Reference.h:79
void swap(DiagonalMatrix< MT, SO, DF > &a, DiagonalMatrix< MT, SO, DF > &b) noexcept
Swapping the contents of two matrices.
Definition: DiagonalMatrix.h:282
Base class for matrices.The Matrix class is a base class for all dense and sparse matrix classes with...
Definition: Forward.h:114
Constraint on the data type.
Type ElementType
Type of the zero matrix elements.
Definition: ZeroMatrix.h:195
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 IsDenseVector type trait.
Header file for the rows trait.
constexpr ConstIterator begin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: ZeroMatrix.h:486
Index-value-pair for sparse vectors and matrices.The ValueIndexPair class represents a single index-v...
Definition: ValueIndexPair.h:73
Header file for the StorageOrder type trait.
Header file for the IntegralConstant class template.
Header file for the map trait.
bool isIntact(const DiagonalMatrix< MT, SO, DF > &m)
Returns whether the invariants of the given diagonal matrix are intact.
Definition: DiagonalMatrix.h:264
bool isDefault(const DiagonalProxy< MT > &proxy)
Returns whether the represented element is in default state.
Definition: DiagonalProxy.h:635
constexpr bool IsColumnVector_v
Auxiliary variable template for the IsColumnVector type trait.The IsColumnVector_v variable template ...
Definition: IsColumnVector.h:142
Header file for the IsUpper type trait.
Header file for the IsColumnVector type trait.
Header file for the IsResizable type trait.
constexpr ConstIterator cbegin(size_t i) const noexcept
Returns an iterator to the first non-zero element of row/column i.
Definition: ZeroMatrix.h:511
Header file for the Expression base class.
Header file for the HighType type trait.
Header file for the function trace functionality.
constexpr size_t columns() const noexcept
Returns the current number of columns of the zero matrix.
Definition: ZeroMatrix.h:641