DenseMatrixProxy.h
Go to the documentation of this file.
1 //=================================================================================================
33 //=================================================================================================
34 
35 #ifndef _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
37 
38 
39 //*************************************************************************************************
40 // Includes
41 //*************************************************************************************************
42 
43 #include <blaze/math/Aliases.h>
45 #include <blaze/math/Exception.h>
47 #include <blaze/math/shims/Clear.h>
48 #include <blaze/math/shims/Reset.h>
52 #include <blaze/system/Inline.h>
53 #include <blaze/util/DisableIf.h>
54 #include <blaze/util/EnableIf.h>
55 #include <blaze/util/Types.h>
56 #include <blaze/util/Unused.h>
57 
58 
59 namespace blaze {
60 
61 //=================================================================================================
62 //
63 // CLASS DEFINITION
64 //
65 //=================================================================================================
66 
67 //*************************************************************************************************
75 template< typename PT // Type of the proxy
76  , typename MT > // Type of the dense matrix
77 class DenseMatrixProxy : public DenseMatrix< PT, IsColumnMajorMatrix<MT>::value >
78 {
79  public:
80  //**Type definitions****************************************************************************
93  //**********************************************************************************************
94 
95  //**Compilation flags***************************************************************************
97  enum : bool { simdEnabled = MT::simdEnabled };
98 
100  enum : bool { smpAssignable = MT::smpAssignable };
101  //**********************************************************************************************
102 
103  //**Data access functions***********************************************************************
106  inline Reference operator()( size_t i, size_t j ) const;
107  inline Reference at( size_t i, size_t j ) const;
108 
109  inline Pointer data () const;
110  inline Pointer data ( size_t i ) const;
111  inline Iterator begin ( size_t i ) const;
112  inline ConstIterator cbegin( size_t i ) const;
113  inline Iterator end ( size_t i ) const;
114  inline ConstIterator cend ( size_t i ) const;
116  //**********************************************************************************************
117 
118  //**Utility functions***************************************************************************
121  inline size_t rows() const;
122  inline size_t columns() const;
123  inline size_t spacing() const;
124  inline size_t capacity() const;
125  inline size_t capacity( size_t i ) const;
126  inline size_t nonZeros() const;
127  inline size_t nonZeros( size_t i ) const;
128  inline void reset() const;
129  inline void reset( size_t i ) const;
130  inline void clear() const;
131  inline void resize( size_t m, size_t n, bool preserve=true ) const;
132  inline void extend( size_t m, size_t n, bool preserve=true ) const;
133  inline void reserve( size_t n ) const;
134  inline void transpose() const;
135  inline void ctranspose() const;
136 
137  template< typename Other > inline void scale( const Other& scalar ) const;
139  //**********************************************************************************************
140 
141  private:
142  //**Compile time checks*************************************************************************
146  //**********************************************************************************************
147 };
148 //*************************************************************************************************
149 
150 
151 
152 
153 //=================================================================================================
154 //
155 // DATA ACCESS FUNCTIONS
156 //
157 //=================================================================================================
158 
159 //*************************************************************************************************
167 template< typename PT // Type of the proxy
168  , typename MT > // Type of the dense matrix
170  DenseMatrixProxy<PT,MT>::operator()( size_t i, size_t j ) const
171 {
172  if( (~*this).isRestricted() ) {
173  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
174  }
175 
176  return (~*this).get()(i,j);
177 }
178 //*************************************************************************************************
179 
180 
181 //*************************************************************************************************
193 template< typename PT // Type of the proxy
194  , typename MT > // Type of the dense matrix
196  DenseMatrixProxy<PT,MT>::at( size_t i, size_t j ) const
197 {
198  if( (~*this).isRestricted() ) {
199  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
200  }
201 
202  return (~*this).get().at(i,j);
203 }
204 //*************************************************************************************************
205 
206 
207 //*************************************************************************************************
219 template< typename PT // Type of the proxy
220  , typename MT > // Type of the dense matrix
222 {
223  if( (~*this).isRestricted() ) {
224  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
225  }
226 
227  return (~*this).get().data();
228 }
229 //*************************************************************************************************
230 
231 
232 //*************************************************************************************************
240 template< typename PT // Type of the proxy
241  , typename MT > // Type of the dense matrix
243 {
244  if( (~*this).isRestricted() ) {
245  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
246  }
247 
248  return (~*this).get().data(i);
249 }
250 //*************************************************************************************************
251 
252 
253 //*************************************************************************************************
265 template< typename PT // Type of the proxy
266  , typename MT > // Type of the dense matrix
267 inline typename DenseMatrixProxy<PT,MT>::Iterator
269 {
270  if( (~*this).isRestricted() ) {
271  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
272  }
273 
274  return (~*this).get().begin(i);
275 }
276 //*************************************************************************************************
277 
278 
279 //*************************************************************************************************
290 template< typename PT // Type of the proxy
291  , typename MT > // Type of the dense matrix
294 {
295  return (~*this).get().cbegin(i);
296 }
297 //*************************************************************************************************
298 
299 
300 //*************************************************************************************************
312 template< typename PT // Type of the proxy
313  , typename MT > // Type of the dense matrix
314 inline typename DenseMatrixProxy<PT,MT>::Iterator
316 {
317  if( (~*this).isRestricted() ) {
318  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
319  }
320 
321  return (~*this).get().end(i);
322 }
323 //*************************************************************************************************
324 
325 
326 //*************************************************************************************************
337 template< typename PT // Type of the proxy
338  , typename MT > // Type of the dense matrix
341 {
342  return (~*this).get().cend(i);
343 }
344 //*************************************************************************************************
345 
346 
347 
348 
349 //=================================================================================================
350 //
351 // UTILITY FUNCTIONS
352 //
353 //=================================================================================================
354 
355 //*************************************************************************************************
360 template< typename PT // Type of the proxy
361  , typename MT > // Type of the dense matrix
362 inline size_t DenseMatrixProxy<PT,MT>::rows() const
363 {
364  return (~*this).get().rows();
365 }
366 //*************************************************************************************************
367 
368 
369 //*************************************************************************************************
374 template< typename PT // Type of the proxy
375  , typename MT > // Type of the dense matrix
376 inline size_t DenseMatrixProxy<PT,MT>::columns() const
377 {
378  return (~*this).get().columns();
379 }
380 //*************************************************************************************************
381 
382 
383 //*************************************************************************************************
393 template< typename PT // Type of the proxy
394  , typename MT > // Type of the dense matrix
395 inline size_t DenseMatrixProxy<PT,MT>::spacing() const
396 {
397  return (~*this).get().spacing();
398 }
399 //*************************************************************************************************
400 
401 
402 //*************************************************************************************************
407 template< typename PT // Type of the proxy
408  , typename MT > // Type of the dense matrix
410 {
411  return (~*this).get().capacity();
412 }
413 //*************************************************************************************************
414 
415 
416 //*************************************************************************************************
427 template< typename PT // Type of the proxy
428  , typename MT > // Type of the dense matrix
429 inline size_t DenseMatrixProxy<PT,MT>::capacity( size_t i ) const
430 {
431  return (~*this).get().capacity(i);
432 }
433 //*************************************************************************************************
434 
435 
436 //*************************************************************************************************
441 template< typename PT // Type of the proxy
442  , typename MT > // Type of the dense matrix
444 {
445  return (~*this).get().nonZeros();
446 }
447 //*************************************************************************************************
448 
449 
450 //*************************************************************************************************
461 template< typename PT // Type of the proxy
462  , typename MT > // Type of the dense matrix
463 inline size_t DenseMatrixProxy<PT,MT>::nonZeros( size_t i ) const
464 {
465  return (~*this).get().nonZeros(i);
466 }
467 //*************************************************************************************************
468 
469 
470 //*************************************************************************************************
477 template< typename PT // Type of the proxy
478  , typename MT > // Type of the dense matrix
480 {
481  using blaze::reset;
482 
483  reset( (~*this).get() );
484 }
485 //*************************************************************************************************
486 
487 
488 //*************************************************************************************************
499 template< typename PT // Type of the proxy
500  , typename MT > // Type of the dense matrix
501 inline void DenseMatrixProxy<PT,MT>::reset( size_t i ) const
502 {
503  using blaze::reset;
504 
505  reset( (~*this).get(), i );
506 }
507 //*************************************************************************************************
508 
509 
510 //*************************************************************************************************
517 template< typename PT // Type of the proxy
518  , typename MT > // Type of the dense matrix
520 {
521  using blaze::clear;
522 
523  clear( (~*this).get() );
524 }
525 //*************************************************************************************************
526 
527 
528 //*************************************************************************************************
545 template< typename PT // Type of the proxy
546  , typename MT > // Type of the dense matrix
547 inline void DenseMatrixProxy<PT,MT>::resize( size_t m, size_t n, bool preserve ) const
548 {
549  if( (~*this).isRestricted() ) {
550  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
551  }
552 
553  (~*this).get().resize( m, n, preserve );
554 }
555 //*************************************************************************************************
556 
557 
558 //*************************************************************************************************
574 template< typename PT // Type of the proxy
575  , typename MT > // Type of the dense matrix
576 inline void DenseMatrixProxy<PT,MT>::extend( size_t m, size_t n, bool preserve ) const
577 {
578  if( (~*this).isRestricted() ) {
579  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
580  }
581 
582  (~*this).get().extend( m, n, preserve );
583 }
584 //*************************************************************************************************
585 
586 
587 //*************************************************************************************************
597 template< typename PT // Type of the proxy
598  , typename MT > // Type of the dense matrix
599 inline void DenseMatrixProxy<PT,MT>::reserve( size_t n ) const
600 {
601  if( (~*this).isRestricted() ) {
602  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
603  }
604 
605  (~*this).get().reserve( n );
606 }
607 //*************************************************************************************************
608 
609 
610 //*************************************************************************************************
616 template< typename PT // Type of the proxy
617  , typename MT > // Type of the dense matrix
619 {
620  if( (~*this).isRestricted() ) {
621  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
622  }
623 
624  (~*this).get().transpose();
625 }
626 //*************************************************************************************************
627 
628 
629 //*************************************************************************************************
635 template< typename PT // Type of the proxy
636  , typename MT > // Type of the dense matrix
638 {
639  if( (~*this).isRestricted() ) {
640  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
641  }
642 
643  (~*this).get().ctranspose();
644 }
645 //*************************************************************************************************
646 
647 
648 //*************************************************************************************************
655 template< typename PT // Type of the proxy
656  , typename MT > // Type of the dense matrix
657 template< typename Other > // Data type of the scalar value
658 inline void DenseMatrixProxy<PT,MT>::scale( const Other& scalar ) const
659 {
660  if( (~*this).isRestricted() ) {
661  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
662  }
663 
664  (~*this).get().scale( scalar );
665 }
666 //*************************************************************************************************
667 
668 
669 
670 
671 //=================================================================================================
672 //
673 // GLOBAL FUNCTIONS
674 //
675 //=================================================================================================
676 
677 //*************************************************************************************************
680 template< typename PT, typename MT >
682  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
683 
684 template< typename PT, typename MT >
686  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
687 
688 template< typename PT, typename MT >
690  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
691 
692 template< typename PT, typename MT >
694  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
695 
696 template< typename PT, typename MT >
697 BLAZE_ALWAYS_INLINE size_t rows( const DenseMatrixProxy<PT,MT>& proxy );
698 
699 template< typename PT, typename MT >
701 
702 template< typename PT, typename MT >
704 
705 template< typename PT, typename MT >
706 BLAZE_ALWAYS_INLINE size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
707 
708 template< typename PT, typename MT >
710 
711 template< typename PT, typename MT >
712 BLAZE_ALWAYS_INLINE size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
713 
714 template< typename PT, typename MT >
715 BLAZE_ALWAYS_INLINE void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve=true );
716 
717 template< typename PT, typename MT >
719 
720 template< typename PT, typename MT >
721 BLAZE_ALWAYS_INLINE void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
722 
723 template< typename PT, typename MT >
726 //*************************************************************************************************
727 
728 
729 //*************************************************************************************************
742 template< typename PT // Type of the proxy
743  , typename MT > // Type of the dense matrix
745  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
746 {
747  return proxy.begin(i);
748 }
749 //*************************************************************************************************
750 
751 
752 //*************************************************************************************************
765 template< typename PT // Type of the proxy
766  , typename MT > // Type of the dense matrix
768  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
769 {
770  return proxy.cbegin(i);
771 }
772 //*************************************************************************************************
773 
774 
775 //*************************************************************************************************
789 template< typename PT // Type of the proxy
790  , typename MT > // Type of the dense matrix
792  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
793 {
794  return proxy.end(i);
795 }
796 //*************************************************************************************************
797 
798 
799 //*************************************************************************************************
813 template< typename PT // Type of the proxy
814  , typename MT > // Type of the dense matrix
816  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
817 {
818  return proxy.cend(i);
819 }
820 //*************************************************************************************************
821 
822 
823 //*************************************************************************************************
830 template< typename PT // Type of the proxy
831  , typename MT > // Type of the dense matrix
833 {
834  return proxy.rows();
835 }
836 //*************************************************************************************************
837 
838 
839 //*************************************************************************************************
846 template< typename PT // Type of the proxy
847  , typename MT > // Type of the dense matrix
849 {
850  return proxy.columns();
851 }
852 //*************************************************************************************************
853 
854 
855 //*************************************************************************************************
862 template< typename PT // Type of the proxy
863  , typename MT > // Type of the dense matrix
865 {
866  return proxy.capacity();
867 }
868 //*************************************************************************************************
869 
870 
871 //*************************************************************************************************
884 template< typename PT // Type of the proxy
885  , typename MT > // Type of the dense matrix
886 BLAZE_ALWAYS_INLINE size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
887 {
888  return proxy.capacity(i);
889 }
890 //*************************************************************************************************
891 
892 
893 //*************************************************************************************************
900 template< typename PT // Type of the proxy
901  , typename MT > // Type of the dense matrix
903 {
904  return proxy.nonZeros();
905 }
906 //*************************************************************************************************
907 
908 
909 //*************************************************************************************************
922 template< typename PT // Type of the proxy
923  , typename MT > // Type of the dense matrix
924 BLAZE_ALWAYS_INLINE size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
925 {
926  return proxy.nonZeros(i);
927 }
928 //*************************************************************************************************
929 
930 
931 //*************************************************************************************************
948 template< typename PT // Type of the proxy
949  , typename MT > // Type of the dense matrix
950 BLAZE_ALWAYS_INLINE DisableIf_< IsResizable<MT> >
951  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
952 {
953  UNUSED_PARAMETER( preserve );
954 
955  if( proxy.rows() != m || proxy.columns() != n ) {
956  BLAZE_THROW_INVALID_ARGUMENT( "Matrix cannot be resized" );
957  }
958 }
960 //*************************************************************************************************
961 
962 
963 //*************************************************************************************************
976 template< typename PT // Type of the proxy
977  , typename MT > // Type of the dense matrix
978 BLAZE_ALWAYS_INLINE EnableIf_< And< IsResizable<MT>, Not< IsSquare<MT> > > >
979  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
980 {
981  proxy.resize( m, n, preserve );
982 }
984 //*************************************************************************************************
985 
986 
987 //*************************************************************************************************
1001 template< typename PT // Type of the proxy
1002  , typename MT > // Type of the dense matrix
1003 BLAZE_ALWAYS_INLINE EnableIf_< And< IsResizable<MT>, IsSquare<MT> > >
1004  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
1005 {
1006  if( m != n ) {
1007  BLAZE_THROW_INVALID_ARGUMENT( "Invalid resize arguments for square matrix" );
1008  }
1009 
1010  proxy.resize( m, preserve );
1011 }
1013 //*************************************************************************************************
1014 
1015 
1016 //*************************************************************************************************
1041 template< typename PT // Type of the proxy
1042  , typename MT > // Type of the dense matrix
1043 BLAZE_ALWAYS_INLINE void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
1044 {
1045  resize_backend( proxy, m, n, preserve );
1046 }
1047 //*************************************************************************************************
1048 
1049 
1050 //*************************************************************************************************
1059 template< typename PT // Type of the proxy
1060  , typename MT > // Type of the dense matrix
1062 {
1063  proxy.reset();
1064 }
1065 //*************************************************************************************************
1066 
1067 
1068 //*************************************************************************************************
1081 template< typename PT // Type of the proxy
1082  , typename MT > // Type of the dense matrix
1083 BLAZE_ALWAYS_INLINE void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
1084 {
1085  proxy.reset(i);
1086 }
1087 //*************************************************************************************************
1088 
1089 
1090 //*************************************************************************************************
1099 template< typename PT // Type of the proxy
1100  , typename MT > // Type of the dense matrix
1102 {
1103  proxy.clear();
1104 }
1105 //*************************************************************************************************
1106 
1107 } // namespace blaze
1108 
1109 #endif
#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
Header file for auxiliary alias declarations.
Header file for the UNUSED_PARAMETER function template.
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
Header file for basic type definitions.
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:362
CompositeType_< MT > CompositeType
Data type for composite expression templates.
Definition: DenseMatrixProxy.h:86
#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
BLAZE_ALWAYS_INLINE MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:188
void extend(size_t m, size_t n, bool preserve=true) const
Extending the size of the represented matrix.
Definition: DenseMatrixProxy.h:576
Header file for the IsColumnMajorMatrix type trait.
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:268
BLAZE_ALWAYS_INLINE size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:384
void scale(const Other &scalar) const
Scaling of the matrix by the scalar value scalar ( ).
Definition: DenseMatrixProxy.h:658
ReturnType_< MT > ReturnType
Return type for expression template evaluations.
Definition: DenseMatrixProxy.h:85
ResultType_< MT > ResultType
Result type for expression template evaluations.
Definition: DenseMatrixProxy.h:81
Pointer_< MT > Pointer
Pointer to a non-constant matrix value.
Definition: DenseMatrixProxy.h:89
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
Proxy backend for dense matrix types.The DenseMatrixProxy class serves as a backend for the Proxy cla...
Definition: DenseMatrixProxy.h:77
BLAZE_ALWAYS_INLINE MT::ConstIterator cend(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:298
BLAZE_ALWAYS_INLINE MT::ConstIterator cbegin(const Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:232
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes...
Definition: DenseMatrix.h:70
Iterator end(size_t i) const
Returns an iterator just past the last element of row/column i of the represented matrix...
Definition: DenseMatrixProxy.h:315
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:376
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:293
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
OppositeType_< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DenseMatrixProxy.h:82
Header file for the IsSquare type trait.
Constraint on the data type.
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: DenseMatrixProxy.h:170
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
void transpose() const
In-place transpose of the represented matrix.
Definition: DenseMatrixProxy.h:618
Iterator_< MT > Iterator
Iterator over non-constant elements.
Definition: DenseMatrixProxy.h:91
Header file for the DisableIf class template.
typename T::Pointer Pointer_
Alias declaration for nested Pointer type definitions.The Pointer_ alias declaration provides a conve...
Definition: Aliases.h:263
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
ElementType_< MT > ElementType
Type of the matrix elements.
Definition: DenseMatrixProxy.h:84
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
Header file for the DenseMatrix base class.
size_t spacing() const
Returns the spacing between the beginning of two rows/columns of the represented matrix.
Definition: DenseMatrixProxy.h:395
TransposeType_< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DenseMatrixProxy.h:83
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:330
ConstReference_< MT > ConstReference
Reference to a constant matrix value.
Definition: DenseMatrixProxy.h:88
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:409
Header file for the exception macros of the math module.
BLAZE_ALWAYS_INLINE void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:538
BLAZE_ALWAYS_INLINE MT::Iterator end(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator just past the last element of row/column i.
Definition: Matrix.h:254
typename T::Reference Reference_
Alias declaration for nested Reference type definitions.The Reference_ alias declaration provides a c...
Definition: Aliases.h:283
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
void clear() const
Clearing the represented matrix.
Definition: DenseMatrixProxy.h:519
ConstIterator_< MT > ConstIterator
Iterator over constant elements.
Definition: DenseMatrixProxy.h:92
Reference_< MT > Reference
Reference to a non-constant matrix value.
Definition: DenseMatrixProxy.h:87
Reference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DenseMatrixProxy.h:196
Header file for the reset shim.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:599
typename T::OppositeType OppositeType_
Alias declaration for nested OppositeType type definitions.The OppositeType_ alias declaration provid...
Definition: Aliases.h:243
Pointer data() const
Low-level data access to matrix elements.
Definition: DenseMatrixProxy.h:221
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
typename T::ConstPointer ConstPointer_
Alias declaration for nested ConstPointer type definitions.The ConstPointer_ alias declaration provid...
Definition: Aliases.h:123
typename T::ConstReference ConstReference_
Alias declaration for nested ConstReference type definitions.The ConstReference_ alias declaration pr...
Definition: Aliases.h:143
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:314
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:547
ConstPointer_< MT > ConstPointer
Pointer to a constant matrix value.
Definition: DenseMatrixProxy.h:90
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: DenseMatrixProxy.h:443
void reset() const
Reset to the default initial value.
Definition: DenseMatrixProxy.h:479
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
void ctranspose() const
In-place conjugate transpose of the represented matrix.
Definition: DenseMatrixProxy.h:637
ConstIterator cend(size_t i) const
Returns an iterator just past the last element of row/column i of the represented matrix...
Definition: DenseMatrixProxy.h:340
Header file for the IsResizable type trait.
System settings for the inline keywords.