35 #ifndef _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
94 enum { vectorizable = VT::vectorizable };
97 enum { smpAssignable = VT::smpAssignable };
103 inline Reference
operator[](
size_t index )
const;
105 inline Pointer
data ()
const;
106 inline Iterator
begin ()
const;
107 inline ConstIterator
cbegin()
const;
108 inline Iterator
end ()
const;
109 inline ConstIterator
cend ()
const;
116 inline size_t size()
const;
119 inline void reset()
const;
120 inline void clear()
const;
121 inline void resize(
size_t n,
bool preserve=
true )
const;
122 inline void extend(
size_t n,
bool preserve=
true )
const;
123 inline void reserve(
size_t n )
const;
125 template<
typename Other >
inline void scale(
const Other& scalar )
const;
153 template<
typename PT
158 if( (~*
this).isRestricted() ) {
162 return (~*
this).get()[index];
174 template<
typename PT
178 if( (~*
this).isRestricted() ) {
182 return (~*
this).get().data();
192 template<
typename PT
196 if( (~*
this).isRestricted() ) {
200 return (~*
this).get().begin();
210 template<
typename PT
214 return (~*
this).get().cbegin();
224 template<
typename PT
228 if( (~*
this).isRestricted() ) {
232 return (~*
this).get().end();
242 template<
typename PT
246 return (~*
this).get().cend();
264 template<
typename PT
268 return (~*
this).get().size();
278 template<
typename PT
282 return (~*
this).get().capacity();
295 template<
typename PT
299 return (~*
this).get().nonZeros();
311 template<
typename PT
317 reset( (~*
this).
get() );
329 template<
typename PT
335 clear( (~*
this).
get() );
355 template<
typename PT
359 if( (~*
this).isRestricted() ) {
363 (~*
this).
get().resize( n, preserve );
381 template<
typename PT
385 if( (~*
this).isRestricted() ) {
389 (~*
this).
get().extend( n, preserve );
403 template<
typename PT
407 if( (~*
this).isRestricted() ) {
411 (~*
this).
get().reserve( n );
422 template<
typename PT
424 template<
typename Other >
427 if( (~*
this).isRestricted() ) {
431 (~*
this).
get().scale( scalar );
447 template<
typename PT,
typename VT >
451 template<
typename PT,
typename VT >
455 template<
typename PT,
typename VT >
459 template<
typename PT,
typename VT >
463 template<
typename PT,
typename VT >
466 template<
typename PT,
typename VT >
469 template<
typename PT,
typename VT >
472 template<
typename PT,
typename VT >
475 template<
typename PT,
typename VT >
478 template<
typename PT,
typename VT >
491 template<
typename PT
496 return proxy.
begin();
508 template<
typename PT
525 template<
typename PT
542 template<
typename PT
559 template<
typename PT
575 template<
typename PT
594 template<
typename PT
618 template<
typename PT
621 resize_backend(
const DenseVectorProxy<PT,VT>& proxy,
size_t n,
bool preserve )
625 if( proxy.size() != n ) {
645 template<
typename PT
648 resize_backend(
const DenseVectorProxy<PT,VT>& proxy,
size_t n,
bool preserve )
650 proxy.resize( n, preserve );
676 template<
typename PT
680 resize_backend( proxy, n, preserve );
694 template<
typename PT
712 template<
typename PT
VT::CompositeType CompositeType
Data type for composite expression templates.
Definition: DenseVectorProxy.h:83
#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 nonZeros() const
Returns the number of non-zero elements in the represented vector.
Definition: DenseVectorProxy.h:297
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector)
Returns the current size/dimension of the vector.
Definition: Vector.h:252
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
ConstIterator cbegin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:212
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
Header file for the IsRowVector type trait.
void clear() const
Clearing the represented vector.
Definition: DenseVectorProxy.h:331
void UNUSED_PARAMETER(const T1 &)
Suppression of unused parameter warnings.
Definition: Unused.h:81
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:357
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 extend(size_t n, bool preserve=true) const
Extending the size of the represented vector.
Definition: DenseVectorProxy.h:383
VT::TransposeType TransposeType
Transpose type for expression template evaluations.
Definition: DenseVectorProxy.h:80
VT::ConstReference ConstReference
Reference to a constant vector value.
Definition: DenseVectorProxy.h:85
Pointer data() const
Low-level data access to vector elements.
Definition: DenseVectorProxy.h:176
VT::ConstPointer ConstPointer
Pointer to a constant vector value.
Definition: DenseVectorProxy.h:87
VT::Iterator Iterator
Iterator over non-constant elements.
Definition: DenseVectorProxy.h:88
Proxy backend for dense vector types.The DenseVectorProxy class serves as a backend for the Proxy cla...
Definition: DenseVectorProxy.h:75
Header file for the DisableIf class template.
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:313
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2592
ConstIterator cend() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:244
size_t capacity() const
Returns the maximum capacity of the represented vector.
Definition: DenseVectorProxy.h:280
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:156
VT::Pointer Pointer
Pointer to a non-constant vector value.
Definition: DenseVectorProxy.h:86
CompressedMatrix< Type, false > TransposeType
Transpose type for expression template evaluations.
Definition: CompressedMatrix.h:2585
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: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 scale(const Other &scalar) const
Scaling of the vector by the scalar value scalar ( ).
Definition: DenseVectorProxy.h:425
Iterator end() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:226
const Type & ReturnType
Return type for expression template evaluations.
Definition: CompressedMatrix.h:2587
VT::ReturnType ReturnType
Return type for expression template evaluations.
Definition: DenseVectorProxy.h:82
size_t size() const
Returns the current size/dimension of the represented vector.
Definition: DenseVectorProxy.h:266
VT::Reference Reference
Reference to a non-constant vector value.
Definition: DenseVectorProxy.h:84
Header file for the reset shim.
void reserve(size_t n) const
Setting the minimum capacity of the represented vector.
Definition: DenseVectorProxy.h:405
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2591
#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::ResultType ResultType
Result type for expression template evaluations.
Definition: DenseVectorProxy.h:79
VT::ConstIterator ConstIterator
Iterator over constant elements.
Definition: DenseVectorProxy.h:89
This ResultType
Result type for expression template evaluations.
Definition: CompressedMatrix.h:2583
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2589
Header file for exception macros.
Header file for the IsResizable type trait.
System settings for the inline keywords.
Iterator begin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:194
VT::ElementType ElementType
Type of the vector elements.
Definition: DenseVectorProxy.h:81