35 #ifndef _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_ 36 #define _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_ 96 enum :
bool { simdEnabled = VT::simdEnabled };
99 enum :
bool { smpAssignable = VT::smpAssignable };
119 inline size_t size()
const;
122 inline void reset()
const;
123 inline void clear()
const;
124 inline void resize(
size_t n,
bool preserve=
true )
const;
125 inline void extend(
size_t n,
bool preserve=
true )
const;
126 inline void reserve(
size_t n )
const;
133 template<
typename Other >
inline void scale(
const Other& scalar )
const;
162 template<
typename PT
167 if( (~*
this).isRestricted() ) {
171 return (~*
this).get()[index];
187 template<
typename PT
192 if( (~*
this).isRestricted() ) {
196 return (~*
this).get().at( index );
209 template<
typename PT
213 if( (~*
this).isRestricted() ) {
217 return (~*
this).get().data();
228 template<
typename PT
232 if( (~*
this).isRestricted() ) {
236 return (~*
this).get().begin();
246 template<
typename PT
250 return (~*
this).get().cbegin();
261 template<
typename PT
265 if( (~*
this).isRestricted() ) {
269 return (~*
this).get().end();
279 template<
typename PT
283 return (~*
this).get().cend();
301 template<
typename PT
305 return (~*
this).get().size();
315 template<
typename PT
319 return (~*
this).get().capacity();
332 template<
typename PT
336 return (~*
this).get().nonZeros();
348 template<
typename PT
354 reset( (~*
this).
get() );
366 template<
typename PT
372 clear( (~*
this).
get() );
393 template<
typename PT
397 if( (~*
this).isRestricted() ) {
401 (~*
this).
get().resize( n, preserve );
420 template<
typename PT
424 if( (~*
this).isRestricted() ) {
428 (~*
this).
get().extend( n, preserve );
443 template<
typename PT
447 if( (~*
this).isRestricted() ) {
451 (~*
this).
get().reserve( n );
467 template<
typename PT
469 template<
typename Other >
472 if( (~*
this).isRestricted() ) {
476 (~*
this).
get().scale( scalar );
492 template<
typename PT,
typename VT >
496 template<
typename PT,
typename VT >
500 template<
typename PT,
typename VT >
504 template<
typename PT,
typename VT >
508 template<
typename PT,
typename VT >
511 template<
typename PT,
typename VT >
514 template<
typename PT,
typename VT >
517 template<
typename PT,
typename VT >
520 template<
typename PT,
typename VT >
523 template<
typename PT,
typename VT >
536 template<
typename PT
541 return proxy.
begin();
553 template<
typename PT
570 template<
typename PT
587 template<
typename PT
604 template<
typename PT
620 template<
typename PT
639 template<
typename PT
663 template<
typename PT
670 if( proxy.
size() != n ) {
690 template<
typename PT
695 proxy.
resize( n, preserve );
721 template<
typename PT
725 resize_backend( proxy, n, preserve );
739 template<
typename PT
757 template<
typename PT
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
ConstIterator_< VT > ConstIterator
Iterator over constant elements.
Definition: DenseVectorProxy.h:91
Header file for auxiliary alias declarations.
Iterator_< VT > Iterator
Iterator over non-constant elements.
Definition: DenseVectorProxy.h:90
ResultType_< VT > ResultType
Result type for expression template evaluations.
Definition: DenseVectorProxy.h:81
Header file for the UNUSED_PARAMETER function template.
Header file for basic type definitions.
Pointer_< VT > Pointer
Pointer to a non-constant vector value.
Definition: DenseVectorProxy.h:88
ConstPointer_< VT > ConstPointer
Pointer to a constant vector value.
Definition: DenseVectorProxy.h:89
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:588
void resize(size_t n, bool preserve=true) const
Changing the size of the represented vector.
Definition: DenseVectorProxy.h:395
Header file for the IsRowVector type trait.
typename DisableIf< Condition, T >::Type DisableIf_
Auxiliary type for the DisableIf class template.The DisableIf_ alias declaration provides a convenien...
Definition: DisableIf.h:224
Header file for the DenseVector base class.
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:343
size_t capacity() const
Returns the maximum capacity of the represented vector.
Definition: DenseVectorProxy.h:317
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:363
Proxy backend for dense vector types.The DenseVectorProxy class serves as a backend for the Proxy cla...
Definition: DenseVectorProxy.h:76
Pointer data() const
Low-level data access to vector elements.
Definition: DenseVectorProxy.h:211
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
void clear() const
Clearing the represented vector.
Definition: DenseVectorProxy.h:368
Header file for the DisableIf class template.
typename T::Pointer Pointer_
Alias declaration for nested Pointer type definitions.The Pointer_ alias declaration provides a conve...
Definition: Aliases.h:283
Header file for the clear shim.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
#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:350
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
void scale(const Other &scalar) const
Scaling of the vector by the scalar value scalar ( ).
Definition: DenseVectorProxy.h:470
Constraint on the data type.
Header file for the exception macros of the math module.
ConstIterator cbegin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:248
Iterator begin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:230
typename T::Reference Reference_
Alias declaration for nested Reference type definitions.The Reference_ alias declaration provides a c...
Definition: Aliases.h:303
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:608
CompositeType_< VT > CompositeType
Data type for composite expression templates.
Definition: DenseVectorProxy.h:85
ReturnType_< VT > ReturnType
Return type for expression template evaluations.
Definition: DenseVectorProxy.h:84
Reference at(size_t index) const
Checked access to the vector elements.
Definition: DenseVectorProxy.h:190
Iterator end() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:263
void reserve(size_t n) const
Setting the minimum capacity of the represented vector.
Definition: DenseVectorProxy.h:445
Header file for the reset shim.
ConstReference_< VT > ConstReference
Reference to a constant vector value.
Definition: DenseVectorProxy.h:87
TransposeType_< VT > TransposeType
Transpose type for expression template evaluations.
Definition: DenseVectorProxy.h:82
size_t nonZeros() const
Returns the number of non-zero elements in the represented vector.
Definition: DenseVectorProxy.h:334
typename EnableIf< Condition, T >::Type EnableIf_
Auxiliary alias declaration for the EnableIf class template.The EnableIf_ alias declaration provides ...
Definition: EnableIf.h:224
typename T::Iterator Iterator_
Alias declaration for nested Iterator type definitions.The Iterator_ alias declaration provides a con...
Definition: Aliases.h:183
typename T::ConstPointer ConstPointer_
Alias declaration for nested ConstPointer type definitions.The ConstPointer_ alias declaration provid...
Definition: Aliases.h:123
typename T::ConstReference ConstReference_
Alias declaration for nested ConstReference type definitions.The ConstReference_ alias declaration pr...
Definition: Aliases.h:143
typename T::ConstIterator ConstIterator_
Alias declaration for nested ConstIterator type definitions.The ConstIterator_ alias declaration prov...
Definition: Aliases.h:103
#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:61
Reference_< VT > Reference
Reference to a non-constant vector value.
Definition: DenseVectorProxy.h:86
void extend(size_t n, bool preserve=true) const
Extending the size of the represented vector.
Definition: DenseVectorProxy.h:422
size_t size() const
Returns the current size/dimension of the represented vector.
Definition: DenseVectorProxy.h:303
ConstIterator cend() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:281
Reference operator[](size_t index) const
Subscript operator for the direct access to vector elements.
Definition: DenseVectorProxy.h:165
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:423
void UNUSED_PARAMETER(const Args &...)
Suppression of unused parameter warnings.
Definition: Unused.h:81
Header file for the IsResizable type trait.
System settings for the inline keywords.
ElementType_< VT > ElementType
Type of the vector elements.
Definition: DenseVectorProxy.h:83