35 #ifndef _BLAZE_MATH_PROXY_SPARSEMATRIXPROXY_H_
36 #define _BLAZE_MATH_PROXY_SPARSEMATRIXPROXY_H_
96 inline size_t rows()
const;
99 inline size_t capacity(
size_t i )
const;
101 inline size_t nonZeros(
size_t i )
const;
102 inline void reset()
const;
103 inline void reset(
size_t i )
const;
104 inline void clear()
const;
107 inline void append(
size_t i,
size_t j,
const ElementType& value,
bool check=
false )
const;
108 inline void finalize(
size_t i )
const;
109 inline void erase(
size_t i,
size_t j )
const;
112 inline void resize(
size_t m,
size_t n,
bool preserve=
true )
const;
113 inline void reserve(
size_t n )
const;
114 inline void reserve(
size_t i,
size_t n )
const;
115 inline void trim()
const;
116 inline void trim(
size_t i )
const;
119 template<
typename Other >
inline void scale(
const Other& scalar )
const;
157 template<
typename PT
162 return (~*
this).
get()(i,j);
178 template<
typename PT
183 return (~*
this).get().begin(i);
199 template<
typename PT
204 return (~*
this).get().cbegin(i);
220 template<
typename PT
225 return (~*
this).get().end(i);
241 template<
typename PT
246 return (~*
this).get().cend(i);
264 template<
typename PT
268 return (~*
this).get().rows();
278 template<
typename PT
282 return (~*
this).get().columns();
292 template<
typename PT
296 return (~*
this).get().capacity();
312 template<
typename PT
316 return (~*
this).get().capacity(i);
326 template<
typename PT
330 return (~*
this).get().nonZeros();
346 template<
typename PT
350 return (~*
this).get().nonZeros(i);
362 template<
typename PT
368 reset( (~*
this).
get() );
384 template<
typename PT
390 reset( (~*
this).
get(), i );
402 template<
typename PT
408 clear( (~*
this).
get() );
426 template<
typename PT
431 return (~*
this).get().set( i, j, value );
449 template<
typename PT
454 return (~*
this).get().insert( i, j, value );
485 template<
typename PT
489 (~*
this).
get().append( i, j, value, check );
507 template<
typename PT
511 (~*
this).
get().finalize( i );
525 template<
typename PT
529 (~*
this).
get().erase( i, j );
545 template<
typename PT
550 return (~*
this).get().erase( i, pos );
567 template<
typename PT
572 return (~*
this).get().erase( i, first, last );
592 template<
typename PT
596 (~*
this).
get().resize( m, n, preserve );
611 template<
typename PT
615 (~*
this).
get().reserve( n );
634 template<
typename PT
638 (~*
this).
get().reserve( i, n );
653 template<
typename PT
657 (~*
this).
get().trim();
673 template<
typename PT
677 (~*
this).
get().trim( i );
687 template<
typename PT
691 (~*
this).
get().transpose();
702 template<
typename PT
704 template<
typename Other >
707 (~*
this).
get().scale( scalar );
735 template<
typename PT
740 return (~*
this).get().find( i, j );
760 template<
typename PT
765 return (~*
this).get().lowerBound( i, j );
785 template<
typename PT
790 return (~*
this).get().upperBound( i, j );
806 template<
typename PT,
typename MT >
810 template<
typename PT,
typename MT >
814 template<
typename PT,
typename MT >
818 template<
typename PT,
typename MT >
822 template<
typename PT,
typename MT >
825 template<
typename PT,
typename MT >
828 template<
typename PT,
typename MT >
831 template<
typename PT,
typename MT >
834 template<
typename PT,
typename MT >
837 template<
typename PT,
typename MT >
840 template<
typename PT,
typename MT >
843 template<
typename PT,
typename MT >
846 template<
typename PT,
typename MT >
865 template<
typename PT
870 return proxy.
begin(i);
888 template<
typename PT
912 template<
typename PT
936 template<
typename PT
941 return proxy.
cend(i);
953 template<
typename PT
969 template<
typename PT
985 template<
typename PT
1007 template<
typename PT
1023 template<
typename PT
1045 template<
typename PT
1063 template<
typename PT
1085 template<
typename PT
1103 template<
typename PT
Iterator set(size_t i, size_t j, const ElementType &value) const
Setting an element of the represented sparse matrix.
Definition: SparseMatrixProxy.h:429
void append(size_t i, size_t j, const ElementType &value, bool check=false) const
Appending an element to the specified row/column of the sparse matrix.
Definition: SparseMatrixProxy.h:487
Iterator insert(size_t i, size_t j, const ElementType &value) const
Inserting an element into the represented sparse matrix.
Definition: SparseMatrixProxy.h:452
size_t nonZeros() const
Returns the number of non-zero elements in the represented matrix.
Definition: SparseMatrixProxy.h:328
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
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
MT::Iterator Iterator
Iterator over non-constant elements.
Definition: SparseMatrixProxy.h:77
void reset() const
Reset to the default initial value.
Definition: SparseMatrixProxy.h:364
void erase(size_t i, size_t j) const
Erasing an element from the sparse matrix.
Definition: SparseMatrixProxy.h:527
Header file for the IsColumnMajorMatrix type trait.
Iterator upperBound(size_t i, size_t j) const
Returns an iterator to the first index greater then the given index.
Definition: SparseMatrixProxy.h:788
size_t capacity() const
Returns the maximum capacity of the represented matrix.
Definition: SparseMatrixProxy.h:294
void transpose() const
Transposing the represented matrix.
Definition: SparseMatrixProxy.h:689
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
ConstIterator cend(size_t i) const
Returns an iterator just past the last element of row/column i of the represented matrix...
Definition: SparseMatrixProxy.h:244
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 finalize(size_t i) const
Finalizing the element insertion of a row/column.
Definition: SparseMatrixProxy.h:509
Iterator lowerBound(size_t i, size_t j) const
Returns an iterator to the first index not less then the given index.
Definition: SparseMatrixProxy.h:763
MT::Reference Reference
Reference to a non-constant matrix value.
Definition: SparseMatrixProxy.h:75
Iterator find(size_t i, size_t j) const
Searches for a specific matrix element.
Definition: SparseMatrixProxy.h:738
Base class for sparse matrices.The SparseMatrix class is a base class for all sparse matrix classes...
Definition: Forward.h:107
Header file for the SparseMatrix base class.
Constraint on the data type.
void trim() const
Removing all excessive capacity from all rows/columns.
Definition: SparseMatrixProxy.h:655
Iterator begin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: SparseMatrixProxy.h:181
void reserve(size_t n) const
Setting the minimum capacity of the represented matrix.
Definition: SparseMatrixProxy.h:613
Header file for the clear shim.
#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:2482
MT::ConstReference ConstReference
Reference to a constant matrix value.
Definition: SparseMatrixProxy.h:76
MT::ElementType ElementType
Type of the sparse matrix elements.
Definition: SparseMatrixProxy.h:74
BLAZE_ALWAYS_INLINE void clear(const NonNumericProxy< MT > &proxy)
Clearing the represented element.
Definition: NonNumericProxy.h:854
void scale(const Other &scalar) const
Scaling of the sparse matrix by the scalar value scalar ( ).
Definition: SparseMatrixProxy.h:705
RawReference get() const
Returning the value of the accessed sparse matrix element.
Definition: MatrixAccessProxy.h:360
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
Proxy backend for sparse matrix types.The SparseMatrixProxy class serves as a backend for the Proxy c...
Definition: SparseMatrixProxy.h:70
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2476
ConstIterator cbegin(size_t i) const
Returns an iterator to the first element of row/column i of the represented matrix.
Definition: SparseMatrixProxy.h:202
const Type & ConstReference
Reference to a constant matrix value.
Definition: CompressedMatrix.h:2480
void clear() const
Clearing the represented vector.
Definition: SparseMatrixProxy.h:404
size_t columns() const
Returns the current number of columns of the represented matrix.
Definition: SparseMatrixProxy.h:280
Header file for the reset shim.
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2481
MT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: SparseMatrixProxy.h:78
Reference operator()(size_t i, size_t j) const
Function call operator for the direct access to matrix elements.
Definition: SparseMatrixProxy.h:160
BLAZE_ALWAYS_INLINE void reset(const NonNumericProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: NonNumericProxy.h:833
Iterator end(size_t i) const
Returns an iterator just past the last element of row/column i of the represented matrix...
Definition: SparseMatrixProxy.h:223
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
Header file for basic type definitions.
size_t rows() const
Returns the current number of rows of the represented matrix.
Definition: SparseMatrixProxy.h:266
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2479
System settings for the inline keywords.
#define BLAZE_CONSTRAINT_MUST_BE_SPARSE_MATRIX_TYPE(T)
Constraint on the data type.In case the given data type T is not a sparse, N-dimensional matrix type...
Definition: SparseMatrix.h:79
void resize(size_t m, size_t n, bool preserve=true) const
Changing the size of the represented matrix.
Definition: SparseMatrixProxy.h:594