35 #ifndef _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
95 enum { vectorizable = MT::vectorizable };
98 enum { smpAssignable = MT::smpAssignable };
104 inline Reference
operator()(
size_t i,
size_t j )
const;
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;
118 inline size_t rows()
const;
122 inline size_t capacity(
size_t i )
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;
134 template<
typename Other >
inline void scale(
const Other& scalar )
const;
163 template<
typename PT
168 if( (~*
this).isRestricted() ) {
172 return (~*
this).get()(i,j);
188 template<
typename PT
192 if( (~*
this).isRestricted() ) {
196 return (~*
this).get().data();
208 template<
typename PT
212 if( (~*
this).isRestricted() ) {
216 return (~*
this).get().data(i);
232 template<
typename PT
237 if( (~*
this).isRestricted() ) {
241 return (~*
this).get().begin(i);
257 template<
typename PT
262 return (~*
this).get().cbegin(i);
278 template<
typename PT
283 if( (~*
this).isRestricted() ) {
287 return (~*
this).get().end(i);
303 template<
typename PT
308 return (~*
this).get().cend(i);
326 template<
typename PT
330 return (~*
this).get().rows();
340 template<
typename PT
344 return (~*
this).get().columns();
359 template<
typename PT
363 return (~*
this).get().spacing();
373 template<
typename PT
377 return (~*
this).get().capacity();
393 template<
typename PT
397 return (~*
this).get().capacity(i);
407 template<
typename PT
411 return (~*
this).get().nonZeros();
427 template<
typename PT
431 return (~*
this).get().nonZeros(i);
443 template<
typename PT
449 reset( (~*
this).
get() );
465 template<
typename PT
471 reset( (~*
this).
get(), i );
483 template<
typename PT
489 clear( (~*
this).
get() );
510 template<
typename PT
514 if( (~*
this).isRestricted() ) {
518 (~*
this).
get().resize( m, n, preserve );
538 template<
typename PT
542 if( (~*
this).isRestricted() ) {
546 (~*
this).
get().extend( m, n, preserve );
560 template<
typename PT
564 if( (~*
this).isRestricted() ) {
568 (~*
this).
get().reserve( n );
578 template<
typename PT
582 if( (~*
this).isRestricted() ) {
586 (~*
this).
get().transpose();
596 template<
typename PT
600 if( (~*
this).isRestricted() ) {
604 (~*
this).
get().ctranspose();
615 template<
typename PT
617 template<
typename Other >
620 if( (~*
this).isRestricted() ) {
624 (~*
this).
get().scale( scalar );
640 template<
typename PT,
typename MT >
644 template<
typename PT,
typename MT >
648 template<
typename PT,
typename MT >
652 template<
typename PT,
typename MT >
656 template<
typename PT,
typename MT >
659 template<
typename PT,
typename MT >
662 template<
typename PT,
typename MT >
665 template<
typename PT,
typename MT >
668 template<
typename PT,
typename MT >
671 template<
typename PT,
typename MT >
674 template<
typename PT,
typename MT >
677 template<
typename PT,
typename MT >
680 template<
typename PT,
typename MT >
683 template<
typename PT,
typename MT >
702 template<
typename PT
707 return proxy.
begin(i);
725 template<
typename PT
749 template<
typename PT
773 template<
typename PT
778 return proxy.
cend(i);
790 template<
typename PT
806 template<
typename PT
822 template<
typename PT
844 template<
typename PT
860 template<
typename PT
882 template<
typename PT
908 template<
typename PT
911 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
915 if( proxy.rows() != m || proxy.columns() != n ) {
936 template<
typename PT
939 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
941 proxy.resize( m, n, preserve );
961 template<
typename PT
964 resize_backend(
const DenseMatrixProxy<PT,MT>& proxy,
size_t m,
size_t n,
bool preserve )
970 proxy.resize( m, preserve );
1001 template<
typename PT
1005 resize_backend( proxy, m, n, preserve );
1019 template<
typename PT
1041 template<
typename PT
1059 template<
typename PT
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.