35 #ifndef _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_ 36 #define _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_ 78 :
public DenseMatrix< PT, IsColumnMajorMatrix_v<MT> >
122 inline size_t rows()
const;
126 inline size_t capacity(
size_t i )
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;
144 template<
typename Other >
inline void scale(
const Other& scalar )
const;
174 template<
typename PT
179 if( (~*
this).isRestricted() ) {
183 return (~*
this).get()(i,j);
200 template<
typename PT
205 if( (~*
this).isRestricted() ) {
209 return (~*
this).get().at(i,j);
226 template<
typename PT
230 if( (~*
this).isRestricted() ) {
234 return (~*
this).get().data();
247 template<
typename PT
251 if( (~*
this).isRestricted() ) {
255 return (~*
this).get().data(i);
272 template<
typename PT
277 if( (~*
this).isRestricted() ) {
281 return (~*
this).get().begin(i);
297 template<
typename PT
302 return (~*
this).get().cbegin(i);
319 template<
typename PT
324 if( (~*
this).isRestricted() ) {
328 return (~*
this).get().end(i);
344 template<
typename PT
349 return (~*
this).get().cend(i);
367 template<
typename PT
371 return (~*
this).get().rows();
381 template<
typename PT
385 return (~*
this).get().columns();
400 template<
typename PT
404 return (~*
this).get().spacing();
414 template<
typename PT
418 return (~*
this).get().capacity();
434 template<
typename PT
438 return (~*
this).get().capacity(i);
448 template<
typename PT
452 return (~*
this).get().nonZeros();
468 template<
typename PT
472 return (~*
this).get().nonZeros(i);
484 template<
typename PT
506 template<
typename PT
524 template<
typename PT
552 template<
typename PT
556 if( (~*
this).isRestricted() ) {
560 (~*
this).
get().resize( m, n, preserve );
581 template<
typename PT
585 if( (~*
this).isRestricted() ) {
589 (~*
this).
get().extend( m, n, preserve );
604 template<
typename PT
608 if( (~*
this).isRestricted() ) {
612 (~*
this).
get().reserve( n );
623 template<
typename PT
627 if( (~*
this).isRestricted() ) {
631 (~*
this).
get().transpose();
642 template<
typename PT
646 if( (~*
this).isRestricted() ) {
650 (~*
this).
get().ctranspose();
666 template<
typename PT
668 template<
typename Other >
671 if( (~*
this).isRestricted() ) {
675 (~*
this).
get().scale( scalar );
691 template<
typename PT,
typename MT >
695 template<
typename PT,
typename MT >
699 template<
typename PT,
typename MT >
703 template<
typename PT,
typename MT >
707 template<
typename PT,
typename MT >
710 template<
typename PT,
typename MT >
713 template<
typename PT,
typename MT >
716 template<
typename PT,
typename MT >
719 template<
typename PT,
typename MT >
722 template<
typename PT,
typename MT >
725 template<
typename PT,
typename MT >
728 template<
typename PT,
typename MT >
731 template<
typename PT,
typename MT >
734 template<
typename PT,
typename MT >
753 template<
typename PT
758 return proxy.
begin(i);
776 template<
typename PT
800 template<
typename PT
824 template<
typename PT
829 return proxy.
cend(i);
841 template<
typename PT
857 template<
typename PT
873 template<
typename PT
895 template<
typename PT
911 template<
typename PT
933 template<
typename PT
959 template<
typename PT
962 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
966 if( proxy.rows() != m || proxy.columns() != n ) {
987 template<
typename PT
990 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
992 proxy.resize( m, n, preserve );
1012 template<
typename PT
1015 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
1021 proxy.resize( m, preserve );
1052 template<
typename PT
1056 resize_backend( proxy, m, n, preserve );
1070 template<
typename PT
1092 template<
typename PT
1110 template<
typename PT
#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