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 
45 #include <blaze/math/shims/Clear.h>
46 #include <blaze/math/shims/Reset.h>
50 #include <blaze/system/Inline.h>
51 #include <blaze/util/EnableIf.h>
52 #include <blaze/util/Exception.h>
53 #include <blaze/util/Types.h>
54 #include <blaze/util/Unused.h>
55 
56 
57 namespace blaze {
58 
59 //=================================================================================================
60 //
61 // CLASS DEFINITION
62 //
63 //=================================================================================================
64 
65 //*************************************************************************************************
73 template< typename PT // Type of the proxy
74  , typename MT > // Type of the dense matrix
75 class DenseMatrixProxy : public DenseMatrix< PT, IsColumnMajorMatrix<MT>::value >
76 {
77  public:
78  //**Type definitions****************************************************************************
79  typedef typename MT::ResultType ResultType;
80  typedef typename MT::OppositeType OppositeType;
81  typedef typename MT::TransposeType TransposeType;
82  typedef typename MT::ElementType ElementType;
83  typedef typename MT::ReturnType ReturnType;
84  typedef typename MT::CompositeType CompositeType;
85  typedef typename MT::Reference Reference;
87  typedef typename MT::Pointer Pointer;
88  typedef typename MT::ConstPointer ConstPointer;
89  typedef typename MT::Iterator Iterator;
90  typedef typename MT::ConstIterator ConstIterator;
91  //**********************************************************************************************
92 
93  //**Compilation flags***************************************************************************
95  enum { vectorizable = MT::vectorizable };
96 
98  enum { smpAssignable = MT::smpAssignable };
99  //**********************************************************************************************
100 
101  //**Data access functions***********************************************************************
104  inline Reference operator()( size_t i, size_t j ) const;
105 
106  inline Pointer data () const;
107  inline Pointer data ( size_t i ) const;
108  inline Iterator begin ( size_t i ) const;
109  inline ConstIterator cbegin( size_t i ) const;
110  inline Iterator end ( size_t i ) const;
111  inline ConstIterator cend ( size_t i ) const;
113  //**********************************************************************************************
114 
115  //**Utility functions***************************************************************************
118  inline size_t rows() const;
119  inline size_t columns() const;
120  inline size_t spacing() const;
121  inline size_t capacity() const;
122  inline size_t capacity( size_t i ) const;
123  inline size_t nonZeros() const;
124  inline size_t nonZeros( size_t i ) const;
125  inline void reset() const;
126  inline void reset( size_t i ) const;
127  inline void clear() const;
128  inline void resize( size_t m, size_t n, bool preserve=true ) const;
129  inline void extend( size_t m, size_t n, bool preserve=true ) const;
130  inline void reserve( size_t n ) const;
131  inline void transpose() const;
132  inline void ctranspose() const;
133 
134  template< typename Other > inline void scale( const Other& scalar ) const;
136  //**********************************************************************************************
137 
138  private:
139  //**Compile time checks*************************************************************************
143  //**********************************************************************************************
144 };
145 //*************************************************************************************************
146 
147 
148 
149 
150 //=================================================================================================
151 //
152 // DATA ACCESS FUNCTIONS
153 //
154 //=================================================================================================
155 
156 //*************************************************************************************************
163 template< typename PT // Type of the proxy
164  , typename MT > // Type of the dense matrix
166  DenseMatrixProxy<PT,MT>::operator()( size_t i, size_t j ) const
167 {
168  if( (~*this).isRestricted() ) {
169  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
170  }
171 
172  return (~*this).get()(i,j);
173 }
174 //*************************************************************************************************
175 
176 
177 //*************************************************************************************************
188 template< typename PT // Type of the proxy
189  , typename MT > // Type of the dense matrix
191 {
192  if( (~*this).isRestricted() ) {
193  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
194  }
195 
196  return (~*this).get().data();
197 }
198 //*************************************************************************************************
199 
200 
201 //*************************************************************************************************
208 template< typename PT // Type of the proxy
209  , typename MT > // Type of the dense matrix
211 {
212  if( (~*this).isRestricted() ) {
213  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
214  }
215 
216  return (~*this).get().data(i);
217 }
218 //*************************************************************************************************
219 
220 
221 //*************************************************************************************************
232 template< typename PT // Type of the proxy
233  , typename MT > // Type of the dense matrix
234 inline typename DenseMatrixProxy<PT,MT>::Iterator
236 {
237  if( (~*this).isRestricted() ) {
238  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
239  }
240 
241  return (~*this).get().begin(i);
242 }
243 //*************************************************************************************************
244 
245 
246 //*************************************************************************************************
257 template< typename PT // Type of the proxy
258  , typename MT > // Type of the dense matrix
261 {
262  return (~*this).get().cbegin(i);
263 }
264 //*************************************************************************************************
265 
266 
267 //*************************************************************************************************
278 template< typename PT // Type of the proxy
279  , typename MT > // Type of the dense matrix
280 inline typename DenseMatrixProxy<PT,MT>::Iterator
282 {
283  if( (~*this).isRestricted() ) {
284  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
285  }
286 
287  return (~*this).get().end(i);
288 }
289 //*************************************************************************************************
290 
291 
292 //*************************************************************************************************
303 template< typename PT // Type of the proxy
304  , typename MT > // Type of the dense matrix
307 {
308  return (~*this).get().cend(i);
309 }
310 //*************************************************************************************************
311 
312 
313 
314 
315 //=================================================================================================
316 //
317 // UTILITY FUNCTIONS
318 //
319 //=================================================================================================
320 
321 //*************************************************************************************************
326 template< typename PT // Type of the proxy
327  , typename MT > // Type of the dense matrix
328 inline size_t DenseMatrixProxy<PT,MT>::rows() const
329 {
330  return (~*this).get().rows();
331 }
332 //*************************************************************************************************
333 
334 
335 //*************************************************************************************************
340 template< typename PT // Type of the proxy
341  , typename MT > // Type of the dense matrix
342 inline size_t DenseMatrixProxy<PT,MT>::columns() const
343 {
344  return (~*this).get().columns();
345 }
346 //*************************************************************************************************
347 
348 
349 //*************************************************************************************************
359 template< typename PT // Type of the proxy
360  , typename MT > // Type of the dense matrix
361 inline size_t DenseMatrixProxy<PT,MT>::spacing() const
362 {
363  return (~*this).get().spacing();
364 }
365 //*************************************************************************************************
366 
367 
368 //*************************************************************************************************
373 template< typename PT // Type of the proxy
374  , typename MT > // Type of the dense matrix
376 {
377  return (~*this).get().capacity();
378 }
379 //*************************************************************************************************
380 
381 
382 //*************************************************************************************************
393 template< typename PT // Type of the proxy
394  , typename MT > // Type of the dense matrix
395 inline size_t DenseMatrixProxy<PT,MT>::capacity( size_t i ) const
396 {
397  return (~*this).get().capacity(i);
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().nonZeros();
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>::nonZeros( size_t i ) const
430 {
431  return (~*this).get().nonZeros(i);
432 }
433 //*************************************************************************************************
434 
435 
436 //*************************************************************************************************
443 template< typename PT // Type of the proxy
444  , typename MT > // Type of the dense matrix
446 {
447  using blaze::reset;
448 
449  reset( (~*this).get() );
450 }
451 //*************************************************************************************************
452 
453 
454 //*************************************************************************************************
465 template< typename PT // Type of the proxy
466  , typename MT > // Type of the dense matrix
467 inline void DenseMatrixProxy<PT,MT>::reset( size_t i ) const
468 {
469  using blaze::reset;
470 
471  reset( (~*this).get(), i );
472 }
473 //*************************************************************************************************
474 
475 
476 //*************************************************************************************************
483 template< typename PT // Type of the proxy
484  , typename MT > // Type of the dense matrix
486 {
487  using blaze::clear;
488 
489  clear( (~*this).get() );
490 }
491 //*************************************************************************************************
492 
493 
494 //*************************************************************************************************
510 template< typename PT // Type of the proxy
511  , typename MT > // Type of the dense matrix
512 inline void DenseMatrixProxy<PT,MT>::resize( size_t m, size_t n, bool preserve ) const
513 {
514  if( (~*this).isRestricted() ) {
515  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
516  }
517 
518  (~*this).get().resize( m, n, preserve );
519 }
520 //*************************************************************************************************
521 
522 
523 //*************************************************************************************************
538 template< typename PT // Type of the proxy
539  , typename MT > // Type of the dense matrix
540 inline void DenseMatrixProxy<PT,MT>::extend( size_t m, size_t n, bool preserve ) const
541 {
542  if( (~*this).isRestricted() ) {
543  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
544  }
545 
546  (~*this).get().extend( m, n, preserve );
547 }
548 //*************************************************************************************************
549 
550 
551 //*************************************************************************************************
560 template< typename PT // Type of the proxy
561  , typename MT > // Type of the dense matrix
562 inline void DenseMatrixProxy<PT,MT>::reserve( size_t n ) const
563 {
564  if( (~*this).isRestricted() ) {
565  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
566  }
567 
568  (~*this).get().reserve( n );
569 }
570 //*************************************************************************************************
571 
572 
573 //*************************************************************************************************
578 template< typename PT // Type of the proxy
579  , typename MT > // Type of the dense matrix
581 {
582  if( (~*this).isRestricted() ) {
583  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
584  }
585 
586  (~*this).get().transpose();
587 }
588 //*************************************************************************************************
589 
590 
591 //*************************************************************************************************
596 template< typename PT // Type of the proxy
597  , typename MT > // Type of the dense matrix
599 {
600  if( (~*this).isRestricted() ) {
601  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
602  }
603 
604  (~*this).get().ctranspose();
605 }
606 //*************************************************************************************************
607 
608 
609 //*************************************************************************************************
615 template< typename PT // Type of the proxy
616  , typename MT > // Type of the dense matrix
617 template< typename Other > // Data type of the scalar value
618 inline void DenseMatrixProxy<PT,MT>::scale( const Other& scalar ) const
619 {
620  if( (~*this).isRestricted() ) {
621  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
622  }
623 
624  (~*this).get().scale( scalar );
625 }
626 //*************************************************************************************************
627 
628 
629 
630 
631 //=================================================================================================
632 //
633 // GLOBAL FUNCTIONS
634 //
635 //=================================================================================================
636 
637 //*************************************************************************************************
640 template< typename PT, typename MT >
642  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
643 
644 template< typename PT, typename MT >
646  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
647 
648 template< typename PT, typename MT >
650  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
651 
652 template< typename PT, typename MT >
654  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
655 
656 template< typename PT, typename MT >
657 BLAZE_ALWAYS_INLINE size_t rows( const DenseMatrixProxy<PT,MT>& proxy );
658 
659 template< typename PT, typename MT >
661 
662 template< typename PT, typename MT >
664 
665 template< typename PT, typename MT >
666 BLAZE_ALWAYS_INLINE size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
667 
668 template< typename PT, typename MT >
670 
671 template< typename PT, typename MT >
672 BLAZE_ALWAYS_INLINE size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
673 
674 template< typename PT, typename MT >
675 BLAZE_ALWAYS_INLINE void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve=true );
676 
677 template< typename PT, typename MT >
679 
680 template< typename PT, typename MT >
681 BLAZE_ALWAYS_INLINE void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
682 
683 template< typename PT, typename MT >
686 //*************************************************************************************************
687 
688 
689 //*************************************************************************************************
702 template< typename PT // Type of the proxy
703  , typename MT > // Type of the dense matrix
705  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
706 {
707  return proxy.begin(i);
708 }
709 //*************************************************************************************************
710 
711 
712 //*************************************************************************************************
725 template< typename PT // Type of the proxy
726  , typename MT > // Type of the dense matrix
728  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
729 {
730  return proxy.cbegin(i);
731 }
732 //*************************************************************************************************
733 
734 
735 //*************************************************************************************************
749 template< typename PT // Type of the proxy
750  , typename MT > // Type of the dense matrix
752  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
753 {
754  return proxy.end(i);
755 }
756 //*************************************************************************************************
757 
758 
759 //*************************************************************************************************
773 template< typename PT // Type of the proxy
774  , typename MT > // Type of the dense matrix
776  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
777 {
778  return proxy.cend(i);
779 }
780 //*************************************************************************************************
781 
782 
783 //*************************************************************************************************
790 template< typename PT // Type of the proxy
791  , typename MT > // Type of the dense matrix
793 {
794  return proxy.rows();
795 }
796 //*************************************************************************************************
797 
798 
799 //*************************************************************************************************
806 template< typename PT // Type of the proxy
807  , typename MT > // Type of the dense matrix
809 {
810  return proxy.columns();
811 }
812 //*************************************************************************************************
813 
814 
815 //*************************************************************************************************
822 template< typename PT // Type of the proxy
823  , typename MT > // Type of the dense matrix
825 {
826  return proxy.capacity();
827 }
828 //*************************************************************************************************
829 
830 
831 //*************************************************************************************************
844 template< typename PT // Type of the proxy
845  , typename MT > // Type of the dense matrix
846 BLAZE_ALWAYS_INLINE size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
847 {
848  return proxy.capacity(i);
849 }
850 //*************************************************************************************************
851 
852 
853 //*************************************************************************************************
860 template< typename PT // Type of the proxy
861  , typename MT > // Type of the dense matrix
863 {
864  return proxy.nonZeros();
865 }
866 //*************************************************************************************************
867 
868 
869 //*************************************************************************************************
882 template< typename PT // Type of the proxy
883  , typename MT > // Type of the dense matrix
884 BLAZE_ALWAYS_INLINE size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
885 {
886  return proxy.nonZeros(i);
887 }
888 //*************************************************************************************************
889 
890 
891 //*************************************************************************************************
908 template< typename PT // Type of the proxy
909  , typename MT > // Type of the dense matrix
910 BLAZE_ALWAYS_INLINE typename DisableIf< IsResizable<MT> >::Type
911  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
912 {
913  UNUSED_PARAMETER( preserve );
914 
915  if( proxy.rows() != m || proxy.columns() != n ) {
916  BLAZE_THROW_INVALID_ARGUMENT( "Matrix cannot be resized" );
917  }
918 }
920 //*************************************************************************************************
921 
922 
923 //*************************************************************************************************
936 template< typename PT // Type of the proxy
937  , typename MT > // Type of the dense matrix
938 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsResizable<MT>, Not< IsSquare<MT> > > >::Type
939  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
940 {
941  proxy.resize( m, n, preserve );
942 }
944 //*************************************************************************************************
945 
946 
947 //*************************************************************************************************
961 template< typename PT // Type of the proxy
962  , typename MT > // Type of the dense matrix
963 BLAZE_ALWAYS_INLINE typename EnableIf< And< IsResizable<MT>, IsSquare<MT> > >::Type
964  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
965 {
966  if( m != n ) {
967  BLAZE_THROW_INVALID_ARGUMENT( "Invalid resize arguments for square matrix" );
968  }
969 
970  proxy.resize( m, preserve );
971 }
973 //*************************************************************************************************
974 
975 
976 //*************************************************************************************************
1001 template< typename PT // Type of the proxy
1002  , typename MT > // Type of the dense matrix
1003 BLAZE_ALWAYS_INLINE void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
1004 {
1005  resize_backend( proxy, m, n, preserve );
1006 }
1007 //*************************************************************************************************
1008 
1009 
1010 //*************************************************************************************************
1019 template< typename PT // Type of the proxy
1020  , typename MT > // Type of the dense matrix
1022 {
1023  proxy.reset();
1024 }
1025 //*************************************************************************************************
1026 
1027 
1028 //*************************************************************************************************
1041 template< typename PT // Type of the proxy
1042  , typename MT > // Type of the dense matrix
1043 BLAZE_ALWAYS_INLINE void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
1044 {
1045  proxy.reset(i);
1046 }
1047 //*************************************************************************************************
1048 
1049 
1050 //*************************************************************************************************
1059 template< typename PT // Type of the proxy
1060  , typename MT > // Type of the dense matrix
1062 {
1063  proxy.clear();
1064 }
1065 //*************************************************************************************************
1066 
1067 } // namespace blaze
1068 
1069 #endif
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseMatrixProxy.h:90
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exceptionThis macro encapsulates the default way of...
Definition: Exception.h:187
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
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:229
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:328
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:292
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:250
#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:79
MT::ElementType ElementType
Type of the matrix elements.
Definition: DenseMatrixProxy.h:82
void extend(size_t m, size_t n, bool preserve=true) const
Extending the size of the represented matrix.
Definition: DenseMatrixProxy.h:540
MT::ResultType ResultType
Result type for expression template evaluations.
Definition: DenseMatrixProxy.h:79
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:507
const This & CompositeType
Data type for composite expression templates.
Definition: CompressedMatrix.h:2588
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:340
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:308
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:235
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:378
void scale(const Other &scalar) const
Scaling of the matrix by the scalar value scalar ( ).
Definition: DenseMatrixProxy.h:618
CompressedMatrix< Type, false > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: CompressedMatrix.h:2584
Proxy backend for dense matrix types.The DenseMatrixProxy class serves as a backend for the Proxy cla...
Definition: DenseMatrixProxy.h:75
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:281
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:342
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:260
Header file for the IsSquare type trait.
Constraint on the data type.
MT::Iterator Iterator
Iterator over non-constant elements.
Definition: DenseMatrixProxy.h:89
MT::OppositeType OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DenseMatrixProxy.h:80
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: DenseMatrixProxy.h:166
void transpose() const
In-place transpose of the represented matrix.
Definition: DenseMatrixProxy.h:580
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
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
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:361
MT::CompositeType CompositeType
Data type for composite expression templates.
Definition: DenseMatrixProxy.h:84
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:375
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
MT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DenseMatrixProxy.h:81
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:187
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:532
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2586
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2590
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:527
void clear() const
Clearing the represented matrix.
Definition: DenseMatrixProxy.h:485
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
MT::Reference Reference
Reference to a non-constant matrix value.
Definition: DenseMatrixProxy.h:85
Header file for the reset shim.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:562
Pointer data() const
Low-level data access to matrix elements.
Definition: DenseMatrixProxy.h:190
MT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DenseMatrixProxy.h:83
MT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: DenseMatrixProxy.h:86
MT::Pointer Pointer
Pointer to a non-constant matrix value.
Definition: DenseMatrixProxy.h:87
MT::ConstPointer ConstPointer
Pointer to a constant matrix value.
Definition: DenseMatrixProxy.h:88
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:512
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: DenseMatrixProxy.h:409
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
void reset() const
Reset to the default initial value.
Definition: DenseMatrixProxy.h:445
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:324
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
Header file for exception macros.
void ctranspose() const
In-place conjugate transpose of the represented matrix.
Definition: DenseMatrixProxy.h:598
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:306
Header file for the IsResizable type trait.
System settings for the inline keywords.