35 #ifndef _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEMATRIXPROXY_H_
86 inline Reference
operator()(
size_t i,
size_t j )
const;
88 inline Pointer
data ()
const;
89 inline Pointer
data (
size_t i )
const;
90 inline Iterator
begin (
size_t i )
const;
91 inline ConstIterator
cbegin(
size_t i )
const;
92 inline Iterator
end (
size_t i )
const;
93 inline ConstIterator
cend (
size_t i )
const;
100 inline size_t rows()
const;
104 inline size_t capacity(
size_t i )
const;
106 inline size_t nonZeros(
size_t i )
const;
107 inline void reset()
const;
108 inline void reset(
size_t i )
const;
109 inline void clear()
const;
110 inline void resize(
size_t m,
size_t n,
bool preserve=
true )
const;
111 inline void extend(
size_t m,
size_t n,
bool preserve=
true )
const;
112 inline void reserve(
size_t n )
const;
115 template<
typename Other >
inline void scale(
const Other& scalar )
const;
144 template<
typename PT
149 if( (~*
this).isRestricted() )
150 throw std::invalid_argument(
"Invalid access to restricted element" );
152 return (~*
this).get()(i,j);
168 template<
typename PT
172 if( (~*
this).isRestricted() )
173 throw std::invalid_argument(
"Invalid access to restricted element" );
175 return (~*
this).get().data();
187 template<
typename PT
191 if( (~*
this).isRestricted() )
192 throw std::invalid_argument(
"Invalid access to restricted element" );
194 return (~*
this).get().data(i);
210 template<
typename PT
215 if( (~*
this).isRestricted() )
216 throw std::invalid_argument(
"Invalid access to restricted element" );
218 return (~*
this).get().begin(i);
234 template<
typename PT
239 return (~*
this).get().cbegin(i);
255 template<
typename PT
260 if( (~*
this).isRestricted() )
261 throw std::invalid_argument(
"Invalid access to restricted element" );
263 return (~*
this).get().end(i);
279 template<
typename PT
284 return (~*
this).get().cend(i);
302 template<
typename PT
306 return (~*
this).get().rows();
316 template<
typename PT
320 return (~*
this).get().columns();
335 template<
typename PT
339 return (~*
this).get().spacing();
349 template<
typename PT
353 return (~*
this).get().capacity();
369 template<
typename PT
373 return (~*
this).get().capacity(i);
383 template<
typename PT
387 return (~*
this).get().nonZeros();
403 template<
typename PT
407 return (~*
this).get().nonZeros(i);
419 template<
typename PT
425 reset( (~*
this).
get() );
441 template<
typename PT
447 reset( (~*
this).
get(), i );
459 template<
typename PT
465 clear( (~*
this).
get() );
486 template<
typename PT
490 if( (~*
this).isRestricted() )
491 throw std::invalid_argument(
"Invalid access to restricted element" );
493 (~*
this).
get().resize( m, n, preserve );
513 template<
typename PT
517 if( (~*
this).isRestricted() )
518 throw std::invalid_argument(
"Invalid access to restricted element" );
520 (~*
this).
get().extend( m, n, preserve );
534 template<
typename PT
538 if( (~*
this).isRestricted() )
539 throw std::invalid_argument(
"Invalid access to restricted element" );
541 (~*
this).
get().reserve( n );
551 template<
typename PT
555 if( (~*
this).isRestricted() )
556 throw std::invalid_argument(
"Invalid access to restricted element" );
558 (~*
this).
get().transpose();
569 template<
typename PT
571 template<
typename Other >
574 if( (~*
this).isRestricted() )
575 throw std::invalid_argument(
"Invalid access to restricted element" );
577 (~*
this).
get().scale( scalar );
593 template<
typename PT,
typename MT >
597 template<
typename PT,
typename MT >
601 template<
typename PT,
typename MT >
605 template<
typename PT,
typename MT >
609 template<
typename PT,
typename MT >
612 template<
typename PT,
typename MT >
615 template<
typename PT,
typename MT >
618 template<
typename PT,
typename MT >
621 template<
typename PT,
typename MT >
624 template<
typename PT,
typename MT >
627 template<
typename PT,
typename MT >
630 template<
typename PT,
typename MT >
633 template<
typename PT,
typename MT >
652 template<
typename PT
657 return proxy.
begin(i);
675 template<
typename PT
699 template<
typename PT
723 template<
typename PT
728 return proxy.
cend(i);
740 template<
typename PT
756 template<
typename PT
772 template<
typename PT
794 template<
typename PT
810 template<
typename PT
832 template<
typename PT
850 template<
typename PT
872 template<
typename PT
890 template<
typename PT
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseMatrixProxy.h:80
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:237
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: DenseMatrixProxy.h:304
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:300
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:258
#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
void extend(size_t m, size_t n, bool preserve=true) const
Extending the size of the represented matrix.
Definition: DenseMatrixProxy.h:515
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:821
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix)
Returns the maximum capacity of the matrix.
Definition: Matrix.h:348
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:213
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:386
void scale(const Other &scalar) const
Scaling of the matrix by the scalar value scalar ( ).
Definition: DenseMatrixProxy.h:572
Proxy backend for dense matrix types.The DenseMatrixProxy class serves as a backend for the Proxy cla...
Definition: DenseMatrixProxy.h:71
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:258
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: DenseMatrixProxy.h:318
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: DenseMatrixProxy.h:237
Constraint on the data type.
MT::Iterator Iterator
Iterator over non-constant elements.
Definition: DenseMatrixProxy.h:79
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: DenseMatrixProxy.h:147
void transpose() const
Transposing the represented matrix.
Definition: DenseMatrixProxy.h:553
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:2511
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:337
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:351
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:195
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2509
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:841
void clear() const
Clearing the represented matrix.
Definition: DenseMatrixProxy.h:461
MT::Reference Reference
Reference to a non-constant matrix value.
Definition: DenseMatrixProxy.h:75
Header file for the reset shim.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: DenseMatrixProxy.h:536
Pointer data() const
Low-level data access to matrix elements.
Definition: DenseMatrixProxy.h:170
MT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: DenseMatrixProxy.h:76
MT::Pointer Pointer
Pointer to a non-constant matrix value.
Definition: DenseMatrixProxy.h:77
MT::ConstPointer ConstPointer
Pointer to a constant matrix value.
Definition: DenseMatrixProxy.h:78
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: DenseMatrixProxy.h:488
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: DenseMatrixProxy.h:385
void reset() const
Reset to the default initial value.
Definition: DenseMatrixProxy.h:421
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2508
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:282
System settings for the inline keywords.