35#ifndef _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
36#define _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
77 :
public DenseMatrix< PT, IsColumnMajorMatrix_v<MT> >
121 inline size_t rows()
const;
125 inline size_t capacity(
size_t i )
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;
143 template<
typename Other >
inline void scale(
const Other& scalar )
const;
191 if( (**this).isRestricted() ) {
195 return (**this).get()(i,j);
217 if( (**this).isRestricted() ) {
221 return (**this).get().at(i,j);
242 if( (**this).isRestricted() ) {
246 return (**this).get().data();
263 if( (**this).isRestricted() ) {
267 return (**this).get().data(i);
289 if( (**this).isRestricted() ) {
293 return (**this).get().begin(i);
314 return (**this).get().cbegin(i);
336 if( (**this).isRestricted() ) {
340 return (**this).get().end(i);
361 return (**this).get().cend(i);
383 return (**this).get().rows();
397 return (**this).get().columns();
416 return (**this).get().spacing();
430 return (**this).get().capacity();
450 return (**this).get().capacity(i);
464 return (**this).get().nonZeros();
484 return (**this).get().nonZeros(i);
502 reset( (**this).get() );
524 reset( (**this).get(), i );
542 clear( (**this).get() );
568 if( (**this).isRestricted() ) {
572 (**this).get().resize( m, n, preserve );
597 if( (**this).isRestricted() ) {
601 (**this).get().extend( m, n, preserve );
620 if( (**this).isRestricted() ) {
624 (**this).get().reserve( n );
639 if( (**this).isRestricted() ) {
643 (**this).get().transpose();
658 if( (**this).isRestricted() ) {
662 (**this).get().ctranspose();
680template<
typename Other >
683 if( (**this).isRestricted() ) {
687 (**this).get().scale( scalar );
703template<
typename PT,
typename MT >
707template<
typename PT,
typename MT >
711template<
typename PT,
typename MT >
715template<
typename PT,
typename MT >
719template<
typename PT,
typename MT >
722template<
typename PT,
typename MT >
725template<
typename PT,
typename MT >
728template<
typename PT,
typename MT >
731template<
typename PT,
typename MT >
734template<
typename PT,
typename MT >
737template<
typename PT,
typename MT >
761 return proxy.
begin(i);
832 return proxy.
cend(i);
965 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
969 if( proxy.rows() != m || proxy.columns() != n ) {
993 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
995 proxy.resize( m, n, preserve );
1015template<
typename PT
1018 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
1024 proxy.resize( m, preserve );
1055template<
typename PT
1059 resize_backend( proxy, m, n, preserve );
Header file for auxiliary alias declarations.
typename T::ConstReference ConstReference_t
Alias declaration for nested ConstReference type definitions.
Definition: Aliases.h:170
typename T::CompositeType CompositeType_t
Alias declaration for nested CompositeType type definitions.
Definition: Aliases.h:110
typename T::Pointer Pointer_t
Alias declaration for nested Pointer type definitions.
Definition: Aliases.h:330
typename T::ReturnType ReturnType_t
Alias declaration for nested ReturnType type definitions.
Definition: Aliases.h:470
typename T::ResultType ResultType_t
Alias declaration for nested ResultType type definitions.
Definition: Aliases.h:450
typename T::ElementType ElementType_t
Alias declaration for nested ElementType type definitions.
Definition: Aliases.h:190
typename T::Iterator Iterator_t
Alias declaration for nested Iterator type definitions.
Definition: Aliases.h:210
typename T::OppositeType OppositeType_t
Alias declaration for nested OppositeType type definitions.
Definition: Aliases.h:310
typename T::ConstIterator ConstIterator_t
Alias declaration for nested ConstIterator type definitions.
Definition: Aliases.h:130
typename T::Reference Reference_t
Alias declaration for nested Reference type definitions.
Definition: Aliases.h:390
typename T::TransposeType TransposeType_t
Alias declaration for nested TransposeType type definitions.
Definition: Aliases.h:550
typename T::ConstPointer ConstPointer_t
Alias declaration for nested ConstPointer type definitions.
Definition: Aliases.h:150
Header file for the EnableIf class template.
Header file for the IsColumnMajorMatrix type trait.
Header file for the IsResizable type trait.
Header file for the IsSquare type trait.
Header file for the MAYBE_UNUSED function template.
Proxy backend for dense matrix types.
Definition: DenseMatrixProxy.h:78
ElementType_t< MT > ElementType
Type of the matrix elements.
Definition: DenseMatrixProxy.h:84
void clear() const
Clearing the represented matrix.
Definition: DenseMatrixProxy.h:538
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:395
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:334
TransposeType_t< MT > TransposeType
Transpose type for expression template evaluations.
Definition: DenseMatrixProxy.h:83
ResultType_t< MT > ResultType
Result type for expression template evaluations.
Definition: DenseMatrixProxy.h:81
void reset() const
Reset to the default initial value.
Definition: DenseMatrixProxy.h:498
void extend(size_t m, size_t n, bool preserve=true) const
Extending the size of the represented matrix.
Definition: DenseMatrixProxy.h:595
Pointer data() const
Low-level data access to matrix elements.
Definition: DenseMatrixProxy.h:240
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:381
Pointer_t< MT > Pointer
Pointer to a non-constant matrix value.
Definition: DenseMatrixProxy.h:89
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:618
Reference_t< MT > Reference
Reference to a non-constant matrix value.
Definition: DenseMatrixProxy.h:87
static constexpr bool simdEnabled
Compilation flag for SIMD optimization.
Definition: DenseMatrixProxy.h:97
Reference at(size_t i, size_t j) const
Checked access to the matrix elements.
Definition: DenseMatrixProxy.h:215
void transpose() const
In-place 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:359
static constexpr bool smpAssignable
Compilation flag for SMP assignments.
Definition: DenseMatrixProxy.h:100
size_t spacing() const
Returns the spacing between the beginning of two rows/columns of the represented matrix.
Definition: DenseMatrixProxy.h:414
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:287
ConstIterator_t< MT > ConstIterator
Iterator over constant elements.
Definition: DenseMatrixProxy.h:92
CompositeType_t< MT > CompositeType
Data type for composite expression templates.
Definition: DenseMatrixProxy.h:86
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: DenseMatrixProxy.h:189
Iterator_t< MT > Iterator
Iterator over non-constant elements.
Definition: DenseMatrixProxy.h:91
ConstPointer_t< MT > ConstPointer
Pointer to a constant matrix value.
Definition: DenseMatrixProxy.h:90
void scale(const Other &scalar) const
Scaling of the matrix by the scalar value scalar ( ).
Definition: DenseMatrixProxy.h:681
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:566
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: DenseMatrixProxy.h:462
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:428
ReturnType_t< MT > ReturnType
Return type for expression template evaluations.
Definition: DenseMatrixProxy.h:85
ConstReference_t< MT > ConstReference
Reference to a constant matrix value.
Definition: DenseMatrixProxy.h:88
void ctranspose() const
In-place conjugate transpose of the represented matrix.
Definition: DenseMatrixProxy.h:656
OppositeType_t< MT > OppositeType
Result type with opposite storage order for expression template evaluations.
Definition: DenseMatrixProxy.h:82
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:312
Base class for dense matrices.
Definition: DenseMatrix.h:82
Constraint on the data type.
Header file for the DenseMatrix base class.
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_MATRIX_TYPE(T)
Constraint on the data type.
Definition: DenseMatrix.h:61
BLAZE_ALWAYS_INLINE void resize(const DenseMatrixProxy< PT, MT > &proxy, size_t m, size_t n, bool preserve)
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:1057
BLAZE_ALWAYS_INLINE DenseMatrixProxy< PT, MT >::Iterator begin(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:759
BLAZE_ALWAYS_INLINE size_t rows(const DenseMatrixProxy< PT, MT > &proxy)
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:846
BLAZE_ALWAYS_INLINE DenseMatrixProxy< PT, MT >::ConstIterator cbegin(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:782
BLAZE_ALWAYS_INLINE DenseMatrixProxy< PT, MT >::Iterator end(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns an iterator just past the last element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:806
BLAZE_ALWAYS_INLINE DenseMatrixProxy< PT, MT >::ConstIterator cend(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns an iterator just past the last element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:830
BLAZE_ALWAYS_INLINE size_t capacity(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns the current capacity of the specified row/column of the represented matrix.
Definition: DenseMatrixProxy.h:900
BLAZE_ALWAYS_INLINE size_t nonZeros(const DenseMatrixProxy< PT, MT > &proxy, size_t i)
Returns the number of non-zero elements in the specified row/column of the represented matrix.
Definition: DenseMatrixProxy.h:938
BLAZE_ALWAYS_INLINE size_t columns(const DenseMatrixProxy< PT, MT > &proxy)
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:862
constexpr void clear(Matrix< MT, SO > &matrix)
Clearing the given matrix.
Definition: Matrix.h:960
constexpr void reset(Matrix< MT, SO > &matrix)
Resetting the given matrix.
Definition: Matrix.h:806
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.
Definition: Exception.h:235
Header file for the exception macros of the math module.
Header file for the clear shim.
Header file for the reset shim.
System settings for the inline keywords.
Header file for basic type definitions.