Blaze  3.6
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/MaybeUnused.h>
56 #include <blaze/util/Types.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
78  : public DenseMatrix< PT, IsColumnMajorMatrix_v<MT> >
79 {
80  public:
81  //**Type definitions****************************************************************************
94  //**********************************************************************************************
95 
96  //**Compilation flags***************************************************************************
98  static constexpr bool simdEnabled = MT::simdEnabled;
99 
101  static constexpr bool smpAssignable = MT::smpAssignable;
102  //**********************************************************************************************
103 
104  //**Data access functions***********************************************************************
107  inline Reference operator()( size_t i, size_t j ) const;
108  inline Reference at( size_t i, size_t j ) const;
109 
110  inline Pointer data () const;
111  inline Pointer data ( size_t i ) const;
112  inline Iterator begin ( size_t i ) const;
113  inline ConstIterator cbegin( size_t i ) const;
114  inline Iterator end ( size_t i ) const;
115  inline ConstIterator cend ( size_t i ) const;
117  //**********************************************************************************************
118 
119  //**Utility functions***************************************************************************
122  inline size_t rows() const;
123  inline size_t columns() const;
124  inline size_t spacing() const;
125  inline size_t capacity() const;
126  inline size_t capacity( size_t i ) const;
127  inline size_t nonZeros() const;
128  inline size_t nonZeros( size_t i ) const;
129  inline void reset() const;
130  inline void reset( size_t i ) const;
131  inline void clear() const;
132  inline void resize( size_t m, size_t n, bool preserve=true ) const;
133  inline void extend( size_t m, size_t n, bool preserve=true ) const;
134  inline void reserve( size_t n ) const;
136  //**********************************************************************************************
137 
138  //**Numeric functions***************************************************************************
141  inline void transpose() const;
142  inline void ctranspose() const;
143 
144  template< typename Other > inline void scale( const Other& scalar ) const;
146  //**********************************************************************************************
147 
148  private:
149  //**Compile time checks*************************************************************************
153  //**********************************************************************************************
154 };
155 //*************************************************************************************************
156 
157 
158 
159 
160 //=================================================================================================
161 //
162 // DATA ACCESS FUNCTIONS
163 //
164 //=================================================================================================
165 
166 //*************************************************************************************************
174 template< typename PT // Type of the proxy
175  , typename MT > // Type of the dense matrix
177  DenseMatrixProxy<PT,MT>::operator()( size_t i, size_t j ) const
178 {
179  if( (~*this).isRestricted() ) {
180  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
181  }
182 
183  return (~*this).get()(i,j);
184 }
185 //*************************************************************************************************
186 
187 
188 //*************************************************************************************************
200 template< typename PT // Type of the proxy
201  , typename MT > // Type of the dense matrix
203  DenseMatrixProxy<PT,MT>::at( size_t i, size_t j ) const
204 {
205  if( (~*this).isRestricted() ) {
206  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
207  }
208 
209  return (~*this).get().at(i,j);
210 }
211 //*************************************************************************************************
212 
213 
214 //*************************************************************************************************
226 template< typename PT // Type of the proxy
227  , typename MT > // Type of the dense matrix
229 {
230  if( (~*this).isRestricted() ) {
231  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
232  }
233 
234  return (~*this).get().data();
235 }
236 //*************************************************************************************************
237 
238 
239 //*************************************************************************************************
247 template< typename PT // Type of the proxy
248  , typename MT > // Type of the dense matrix
250 {
251  if( (~*this).isRestricted() ) {
252  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
253  }
254 
255  return (~*this).get().data(i);
256 }
257 //*************************************************************************************************
258 
259 
260 //*************************************************************************************************
272 template< typename PT // Type of the proxy
273  , typename MT > // Type of the dense matrix
274 inline typename DenseMatrixProxy<PT,MT>::Iterator
276 {
277  if( (~*this).isRestricted() ) {
278  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
279  }
280 
281  return (~*this).get().begin(i);
282 }
283 //*************************************************************************************************
284 
285 
286 //*************************************************************************************************
297 template< typename PT // Type of the proxy
298  , typename MT > // Type of the dense matrix
301 {
302  return (~*this).get().cbegin(i);
303 }
304 //*************************************************************************************************
305 
306 
307 //*************************************************************************************************
319 template< typename PT // Type of the proxy
320  , typename MT > // Type of the dense matrix
321 inline typename DenseMatrixProxy<PT,MT>::Iterator
323 {
324  if( (~*this).isRestricted() ) {
325  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
326  }
327 
328  return (~*this).get().end(i);
329 }
330 //*************************************************************************************************
331 
332 
333 //*************************************************************************************************
344 template< typename PT // Type of the proxy
345  , typename MT > // Type of the dense matrix
348 {
349  return (~*this).get().cend(i);
350 }
351 //*************************************************************************************************
352 
353 
354 
355 
356 //=================================================================================================
357 //
358 // UTILITY FUNCTIONS
359 //
360 //=================================================================================================
361 
362 //*************************************************************************************************
367 template< typename PT // Type of the proxy
368  , typename MT > // Type of the dense matrix
369 inline size_t DenseMatrixProxy<PT,MT>::rows() const
370 {
371  return (~*this).get().rows();
372 }
373 //*************************************************************************************************
374 
375 
376 //*************************************************************************************************
381 template< typename PT // Type of the proxy
382  , typename MT > // Type of the dense matrix
383 inline size_t DenseMatrixProxy<PT,MT>::columns() const
384 {
385  return (~*this).get().columns();
386 }
387 //*************************************************************************************************
388 
389 
390 //*************************************************************************************************
400 template< typename PT // Type of the proxy
401  , typename MT > // Type of the dense matrix
402 inline size_t DenseMatrixProxy<PT,MT>::spacing() const
403 {
404  return (~*this).get().spacing();
405 }
406 //*************************************************************************************************
407 
408 
409 //*************************************************************************************************
414 template< typename PT // Type of the proxy
415  , typename MT > // Type of the dense matrix
417 {
418  return (~*this).get().capacity();
419 }
420 //*************************************************************************************************
421 
422 
423 //*************************************************************************************************
434 template< typename PT // Type of the proxy
435  , typename MT > // Type of the dense matrix
436 inline size_t DenseMatrixProxy<PT,MT>::capacity( size_t i ) const
437 {
438  return (~*this).get().capacity(i);
439 }
440 //*************************************************************************************************
441 
442 
443 //*************************************************************************************************
448 template< typename PT // Type of the proxy
449  , typename MT > // Type of the dense matrix
451 {
452  return (~*this).get().nonZeros();
453 }
454 //*************************************************************************************************
455 
456 
457 //*************************************************************************************************
468 template< typename PT // Type of the proxy
469  , typename MT > // Type of the dense matrix
470 inline size_t DenseMatrixProxy<PT,MT>::nonZeros( size_t i ) const
471 {
472  return (~*this).get().nonZeros(i);
473 }
474 //*************************************************************************************************
475 
476 
477 //*************************************************************************************************
484 template< typename PT // Type of the proxy
485  , typename MT > // Type of the dense matrix
487 {
488  using blaze::reset;
489 
490  reset( (~*this).get() );
491 }
492 //*************************************************************************************************
493 
494 
495 //*************************************************************************************************
506 template< typename PT // Type of the proxy
507  , typename MT > // Type of the dense matrix
508 inline void DenseMatrixProxy<PT,MT>::reset( size_t i ) const
509 {
510  using blaze::reset;
511 
512  reset( (~*this).get(), i );
513 }
514 //*************************************************************************************************
515 
516 
517 //*************************************************************************************************
524 template< typename PT // Type of the proxy
525  , typename MT > // Type of the dense matrix
527 {
528  using blaze::clear;
529 
530  clear( (~*this).get() );
531 }
532 //*************************************************************************************************
533 
534 
535 //*************************************************************************************************
552 template< typename PT // Type of the proxy
553  , typename MT > // Type of the dense matrix
554 inline void DenseMatrixProxy<PT,MT>::resize( size_t m, size_t n, bool preserve ) const
555 {
556  if( (~*this).isRestricted() ) {
557  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
558  }
559 
560  (~*this).get().resize( m, n, preserve );
561 }
562 //*************************************************************************************************
563 
564 
565 //*************************************************************************************************
581 template< typename PT // Type of the proxy
582  , typename MT > // Type of the dense matrix
583 inline void DenseMatrixProxy<PT,MT>::extend( size_t m, size_t n, bool preserve ) const
584 {
585  if( (~*this).isRestricted() ) {
586  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
587  }
588 
589  (~*this).get().extend( m, n, preserve );
590 }
591 //*************************************************************************************************
592 
593 
594 //*************************************************************************************************
604 template< typename PT // Type of the proxy
605  , typename MT > // Type of the dense matrix
606 inline void DenseMatrixProxy<PT,MT>::reserve( size_t n ) const
607 {
608  if( (~*this).isRestricted() ) {
609  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
610  }
611 
612  (~*this).get().reserve( n );
613 }
614 //*************************************************************************************************
615 
616 
617 //*************************************************************************************************
623 template< typename PT // Type of the proxy
624  , typename MT > // Type of the dense matrix
626 {
627  if( (~*this).isRestricted() ) {
628  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
629  }
630 
631  (~*this).get().transpose();
632 }
633 //*************************************************************************************************
634 
635 
636 //*************************************************************************************************
642 template< typename PT // Type of the proxy
643  , typename MT > // Type of the dense matrix
645 {
646  if( (~*this).isRestricted() ) {
647  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
648  }
649 
650  (~*this).get().ctranspose();
651 }
652 //*************************************************************************************************
653 
654 
655 //*************************************************************************************************
666 template< typename PT // Type of the proxy
667  , typename MT > // Type of the dense matrix
668 template< typename Other > // Data type of the scalar value
669 inline void DenseMatrixProxy<PT,MT>::scale( const Other& scalar ) const
670 {
671  if( (~*this).isRestricted() ) {
672  BLAZE_THROW_INVALID_ARGUMENT( "Invalid access to restricted element" );
673  }
674 
675  (~*this).get().scale( scalar );
676 }
677 //*************************************************************************************************
678 
679 
680 
681 
682 //=================================================================================================
683 //
684 // GLOBAL FUNCTIONS
685 //
686 //=================================================================================================
687 
688 //*************************************************************************************************
691 template< typename PT, typename MT >
693  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
694 
695 template< typename PT, typename MT >
697  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
698 
699 template< typename PT, typename MT >
701  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
702 
703 template< typename PT, typename MT >
705  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
706 
707 template< typename PT, typename MT >
708 size_t rows( const DenseMatrixProxy<PT,MT>& proxy );
709 
710 template< typename PT, typename MT >
711 size_t columns( const DenseMatrixProxy<PT,MT>& proxy );
712 
713 template< typename PT, typename MT >
714 size_t capacity( const DenseMatrixProxy<PT,MT>& proxy );
715 
716 template< typename PT, typename MT >
717 size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
718 
719 template< typename PT, typename MT >
720 size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy );
721 
722 template< typename PT, typename MT >
723 size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
724 
725 template< typename PT, typename MT >
726 void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve=true );
727 
728 template< typename PT, typename MT >
729 void reset( const DenseMatrixProxy<PT,MT>& proxy );
730 
731 template< typename PT, typename MT >
732 void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i );
733 
734 template< typename PT, typename MT >
735 void clear( const DenseMatrixProxy<PT,MT>& proxy );
737 //*************************************************************************************************
738 
739 
740 //*************************************************************************************************
753 template< typename PT // Type of the proxy
754  , typename MT > // Type of the dense matrix
756  begin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
757 {
758  return proxy.begin(i);
759 }
760 //*************************************************************************************************
761 
762 
763 //*************************************************************************************************
776 template< typename PT // Type of the proxy
777  , typename MT > // Type of the dense matrix
779  cbegin( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
780 {
781  return proxy.cbegin(i);
782 }
783 //*************************************************************************************************
784 
785 
786 //*************************************************************************************************
800 template< typename PT // Type of the proxy
801  , typename MT > // Type of the dense matrix
803  end( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
804 {
805  return proxy.end(i);
806 }
807 //*************************************************************************************************
808 
809 
810 //*************************************************************************************************
824 template< typename PT // Type of the proxy
825  , typename MT > // Type of the dense matrix
827  cend( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
828 {
829  return proxy.cend(i);
830 }
831 //*************************************************************************************************
832 
833 
834 //*************************************************************************************************
841 template< typename PT // Type of the proxy
842  , typename MT > // Type of the dense matrix
844 {
845  return proxy.rows();
846 }
847 //*************************************************************************************************
848 
849 
850 //*************************************************************************************************
857 template< typename PT // Type of the proxy
858  , typename MT > // Type of the dense matrix
860 {
861  return proxy.columns();
862 }
863 //*************************************************************************************************
864 
865 
866 //*************************************************************************************************
873 template< typename PT // Type of the proxy
874  , typename MT > // Type of the dense matrix
876 {
877  return proxy.capacity();
878 }
879 //*************************************************************************************************
880 
881 
882 //*************************************************************************************************
895 template< typename PT // Type of the proxy
896  , typename MT > // Type of the dense matrix
897 BLAZE_ALWAYS_INLINE size_t capacity( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
898 {
899  return proxy.capacity(i);
900 }
901 //*************************************************************************************************
902 
903 
904 //*************************************************************************************************
911 template< typename PT // Type of the proxy
912  , typename MT > // Type of the dense matrix
914 {
915  return proxy.nonZeros();
916 }
917 //*************************************************************************************************
918 
919 
920 //*************************************************************************************************
933 template< typename PT // Type of the proxy
934  , typename MT > // Type of the dense matrix
935 BLAZE_ALWAYS_INLINE size_t nonZeros( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
936 {
937  return proxy.nonZeros(i);
938 }
939 //*************************************************************************************************
940 
941 
942 //*************************************************************************************************
959 template< typename PT // Type of the proxy
960  , typename MT > // Type of the dense matrix
961 BLAZE_ALWAYS_INLINE DisableIf_t< IsResizable_v<MT> >
962  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
963 {
964  MAYBE_UNUSED( preserve );
965 
966  if( proxy.rows() != m || proxy.columns() != n ) {
967  BLAZE_THROW_INVALID_ARGUMENT( "Matrix cannot be resized" );
968  }
969 }
971 //*************************************************************************************************
972 
973 
974 //*************************************************************************************************
987 template< typename PT // Type of the proxy
988  , typename MT > // Type of the dense matrix
989 BLAZE_ALWAYS_INLINE EnableIf_t< IsResizable_v<MT> && !IsSquare_v<MT> >
990  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
991 {
992  proxy.resize( m, n, preserve );
993 }
995 //*************************************************************************************************
996 
997 
998 //*************************************************************************************************
1012 template< typename PT // Type of the proxy
1013  , typename MT > // Type of the dense matrix
1014 BLAZE_ALWAYS_INLINE EnableIf_t< IsResizable_v<MT> && IsSquare_v<MT> >
1015  resize_backend( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
1016 {
1017  if( m != n ) {
1018  BLAZE_THROW_INVALID_ARGUMENT( "Invalid resize arguments for square matrix" );
1019  }
1020 
1021  proxy.resize( m, preserve );
1022 }
1024 //*************************************************************************************************
1025 
1026 
1027 //*************************************************************************************************
1052 template< typename PT // Type of the proxy
1053  , typename MT > // Type of the dense matrix
1054 BLAZE_ALWAYS_INLINE void resize( const DenseMatrixProxy<PT,MT>& proxy, size_t m, size_t n, bool preserve )
1055 {
1056  resize_backend( proxy, m, n, preserve );
1057 }
1058 //*************************************************************************************************
1059 
1060 
1061 //*************************************************************************************************
1070 template< typename PT // Type of the proxy
1071  , typename MT > // Type of the dense matrix
1073 {
1074  proxy.reset();
1075 }
1076 //*************************************************************************************************
1077 
1078 
1079 //*************************************************************************************************
1092 template< typename PT // Type of the proxy
1093  , typename MT > // Type of the dense matrix
1094 BLAZE_ALWAYS_INLINE void reset( const DenseMatrixProxy<PT,MT>& proxy, size_t i )
1095 {
1096  proxy.reset(i);
1097 }
1098 //*************************************************************************************************
1099 
1100 
1101 //*************************************************************************************************
1110 template< typename PT // Type of the proxy
1111  , typename MT > // Type of the dense matrix
1113 {
1114  proxy.clear();
1115 }
1116 //*************************************************************************************************
1117 
1118 } // namespace blaze
1119 
1120 #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.
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:322
Iterator_t< MT > Iterator
Iterator over non-constant elements.
Definition: DenseMatrixProxy.h:92
size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:546
Header file for basic type definitions.
ConstReference_t< MT > ConstReference
Reference to a constant matrix value.
Definition: DenseMatrixProxy.h:89
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.The ResultType_t alias declaration provides ...
Definition: Aliases.h:390
typename T::Reference Reference_t
Alias declaration for nested Reference type definitions.The Reference_t alias declaration provides a ...
Definition: Aliases.h:330
#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
Reference_t< MT > Reference
Reference to a non-constant matrix value.
Definition: DenseMatrixProxy.h:88
MT::Iterator begin(Matrix< MT, SO > &matrix, size_t i)
Returns an iterator to the first element of row/column i.
Definition: Matrix.h:372
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:595
void scale(const Other &scalar) const
Scaling of the matrix by the scalar value scalar ( ).
Definition: DenseMatrixProxy.h:669
Header file for the MAYBE_UNUSED function template.
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: DenseMatrixProxy.h:177
size_t nonZeros(const Matrix< MT, SO > &matrix)
Returns the total number of non-zero elements in the matrix.
Definition: Matrix.h:584
Header file for the reset shim.
void reset() const
Reset to the default initial value.
Definition: DenseMatrixProxy.h:486
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.The ReturnType_t alias declaration provides ...
Definition: Aliases.h:410
constexpr size_t columns(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of columns of the matrix.
Definition: Matrix.h:514
Proxy backend for dense matrix types.The DenseMatrixProxy class serves as a backend for the Proxy cla...
Definition: DenseMatrixProxy.h:77
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:482
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:416
Base class for dense matrices.The DenseMatrix class is a base class for all dense matrix classes....
Definition: DenseMatrix.h:81
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DenseMatrixProxy.h:86
typename T::Pointer Pointer_t
Alias declaration for nested Pointer type definitions.The Pointer_t alias declaration provides a conv...
Definition: Aliases.h:290
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.The ElementType_t alias declaration provide...
Definition: Aliases.h:170
Header file for the IsSquare type trait.
CompositeType_t< MT > CompositeType
Data type for composite expression templates.
Definition: DenseMatrixProxy.h:87
Constraint on the data type.
Header file for the DisableIf class template.
Pointer data() const
Low-level data access to matrix elements.
Definition: DenseMatrixProxy.h:228
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
void transpose() const
In-place transpose of the represented matrix.
Definition: DenseMatrixProxy.h:625
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:383
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: DenseMatrixProxy.h:98
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:369
Header file for the DenseMatrix base class.
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:300
Pointer_t< MT > Pointer
Pointer to a non-constant matrix value.
Definition: DenseMatrixProxy.h:90
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:275
Header file for the exception macros of the math module.
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DenseMatrixProxy.h:83
void resize(Matrix< MT, SO > &matrix, size_t rows, size_t columns, bool preserve=true)
Changing the size of the matrix.
Definition: Matrix.h:738
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:438
ConstPointer_t< MT > ConstPointer
Pointer to a constant matrix value.
Definition: DenseMatrixProxy.h:91
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:615
void extend(size_t m, size_t n, bool preserve=true) const
Extending the size of the represented matrix.
Definition: DenseMatrixProxy.h:583
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.The OppositeType_t alias declaration provi...
Definition: Aliases.h:270
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DenseMatrixProxy.h:84
typename T::Iterator Iterator_t
Alias declaration for nested Iterator type definitions.The Iterator_t alias declaration provides a co...
Definition: Aliases.h:190
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.The TransposeType_t alias declaration pro...
Definition: Aliases.h:470
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.The CompositeType_t alias declaration pro...
Definition: Aliases.h:90
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:347
ElementType_t< MT > ElementType
Type of the matrix elements.
Definition: DenseMatrixProxy.h:85
void clear() const
Clearing the represented matrix.
Definition: DenseMatrixProxy.h:526
typename T::ConstPointer ConstPointer_t
Alias declaration for nested ConstPointer type definitions.The ConstPointer_t alias declaration provi...
Definition: Aliases.h:130
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DenseMatrixProxy.h:82
size_t spacing() const
Returns the spacing between the beginning of two rows/columns of the represented matrix.
Definition: DenseMatrixProxy.h:402
typename T::ConstReference ConstReference_t
Alias declaration for nested ConstReference type definitions.The ConstReference_t alias declaration p...
Definition: Aliases.h:150
constexpr size_t rows(const Matrix< MT, SO > &matrix) noexcept
Returns the current number of rows of the matrix.
Definition: Matrix.h:498
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:416
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.The ConstIterator_t alias declaration pro...
Definition: Aliases.h:110
ConstIterator_t< MT > ConstIterator
Iterator over constant elements.
Definition: DenseMatrixProxy.h:93
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:554
void ctranspose() const
In-place conjugate transpose of the represented matrix.
Definition: DenseMatrixProxy.h:644
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:606
Header file for the IsResizable type trait.
Reference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DenseMatrixProxy.h:203
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: DenseMatrixProxy.h:101
System settings for the inline keywords.
Header file for the clear shim.
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: DenseMatrixProxy.h:450
constexpr Type & get(StaticVector< Type, N, TF > &v) noexcept
Tuple-like index-based access the contents of a static vector.
Definition: StaticVector.h:2704