35 #ifndef _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
86 inline Reference
operator[](
size_t index )
const;
88 inline Pointer
data ()
const;
89 inline Iterator
begin ()
const;
90 inline ConstIterator
cbegin()
const;
91 inline Iterator
end ()
const;
92 inline ConstIterator
cend ()
const;
99 inline size_t size()
const;
102 inline void reset()
const;
103 inline void clear()
const;
104 inline void resize(
size_t n,
bool preserve=
true )
const;
105 inline void extend(
size_t n,
bool preserve=
true )
const;
106 inline void reserve(
size_t n )
const;
108 template<
typename Other >
inline void scale(
const Other& scalar )
const;
136 template<
typename PT
141 if( (~*
this).isRestricted() )
142 throw std::invalid_argument(
"Invalid access to restricted element" );
144 return (~*
this).get()[index];
156 template<
typename PT
160 if( (~*
this).isRestricted() )
161 throw std::invalid_argument(
"Invalid access to restricted element" );
163 return (~*
this).get().data();
173 template<
typename PT
177 if( (~*
this).isRestricted() )
178 throw std::invalid_argument(
"Invalid access to restricted element" );
180 return (~*
this).get().begin();
190 template<
typename PT
194 return (~*
this).get().cbegin();
204 template<
typename PT
208 if( (~*
this).isRestricted() )
209 throw std::invalid_argument(
"Invalid access to restricted element" );
211 return (~*
this).get().end();
221 template<
typename PT
225 return (~*
this).get().cend();
243 template<
typename PT
247 return (~*
this).get().size();
257 template<
typename PT
261 return (~*
this).get().capacity();
274 template<
typename PT
278 return (~*
this).get().nonZeros();
290 template<
typename PT
296 reset( (~*
this).
get() );
308 template<
typename PT
314 clear( (~*
this).
get() );
334 template<
typename PT
338 if( (~*
this).isRestricted() )
339 throw std::invalid_argument(
"Invalid access to restricted element" );
341 (~*
this).
get().resize( n, preserve );
359 template<
typename PT
363 if( (~*
this).isRestricted() )
364 throw std::invalid_argument(
"Invalid access to restricted element" );
366 (~*
this).
get().extend( n, preserve );
380 template<
typename PT
384 if( (~*
this).isRestricted() )
385 throw std::invalid_argument(
"Invalid access to restricted element" );
387 (~*
this).
get().reserve( n );
398 template<
typename PT
400 template<
typename Other >
403 if( (~*
this).isRestricted() )
404 throw std::invalid_argument(
"Invalid access to restricted element" );
406 (~*
this).
get().scale( scalar );
422 template<
typename PT,
typename VT >
426 template<
typename PT,
typename VT >
430 template<
typename PT,
typename VT >
434 template<
typename PT,
typename VT >
438 template<
typename PT,
typename VT >
441 template<
typename PT,
typename VT >
444 template<
typename PT,
typename VT >
447 template<
typename PT,
typename VT >
450 template<
typename PT,
typename VT >
463 template<
typename PT
468 return proxy.
begin();
480 template<
typename PT
497 template<
typename PT
514 template<
typename PT
531 template<
typename PT
547 template<
typename PT
566 template<
typename PT
584 template<
typename PT
602 template<
typename PT
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 nonZeros() const
Returns the number of non-zero elements in the represented vector.
Definition: DenseVectorProxy.h:276
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:264
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
ConstIterator cbegin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:192
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
Header file for the IsRowVector type trait.
void clear() const
Clearing the represented vector.
Definition: DenseVectorProxy.h:310
Header file for the DenseVector base class.
void resize(size_t n, bool preserve=true) const
Changing the size of the represented vector.
Definition: DenseVectorProxy.h:336
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 extend(size_t n, bool preserve=true) const
Extending the size of the represented vector.
Definition: DenseVectorProxy.h:361
VT::ConstReference ConstReference
Reference to a constant vector value.
Definition: DenseVectorProxy.h:76
Pointer data() const
Low-level data access to vector elements.
Definition: DenseVectorProxy.h:158
VT::ConstPointer ConstPointer
Pointer to a constant vector value.
Definition: DenseVectorProxy.h:78
VT::Iterator Iterator
Iterator over non-constant elements.
Definition: DenseVectorProxy.h:79
Proxy backend for dense vector types.The DenseVectorProxy class serves as a backend for the Proxy cla...
Definition: DenseVectorProxy.h:71
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
void reset() const
Reset to the default initial value.
Definition: DenseVectorProxy.h:292
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2511
ConstIterator cend() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:223
size_t capacity() const
Returns the maximum capacity of the represented vector.
Definition: DenseVectorProxy.h:259
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:70
Reference operator[](size_t index) const
Subscript operator for the direct access to vector elements.
Definition: DenseVectorProxy.h:139
VT::Pointer Pointer
Pointer to a non-constant vector value.
Definition: DenseVectorProxy.h:77
Constraint on the data type.
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 scale(const Other &scalar) const
Scaling of the vector by the scalar value scalar ( ).
Definition: DenseVectorProxy.h:401
Iterator end() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:206
size_t size() const
Returns the current size/dimension of the represented vector.
Definition: DenseVectorProxy.h:245
VT::Reference Reference
Reference to a non-constant vector value.
Definition: DenseVectorProxy.h:75
Header file for the reset shim.
void reserve(size_t n) const
Setting the minimum capacity of the represented vector.
Definition: DenseVectorProxy.h:382
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2510
#define BLAZE_CONSTRAINT_MUST_BE_DENSE_VECTOR_TYPE(T)
Constraint on the data type.In case the given data type T is not a dense, N-dimensional vector type...
Definition: DenseVector.h:79
VT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseVectorProxy.h:80
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2508
System settings for the inline keywords.
Iterator begin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:175