35 #ifndef _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
36 #define _BLAZE_MATH_PROXY_DENSEVECTORPROXY_H_
95 enum :
bool { simdEnabled = VT::simdEnabled };
98 enum :
bool { smpAssignable = VT::smpAssignable };
104 inline Reference
operator[](
size_t index )
const;
105 inline Reference
at(
size_t index )
const;
107 inline Pointer
data ()
const;
108 inline Iterator
begin ()
const;
109 inline ConstIterator
cbegin()
const;
110 inline Iterator
end ()
const;
111 inline ConstIterator
cend ()
const;
118 inline size_t size()
const;
121 inline void reset()
const;
122 inline void clear()
const;
123 inline void resize(
size_t n,
bool preserve=
true )
const;
124 inline void extend(
size_t n,
bool preserve=
true )
const;
125 inline void reserve(
size_t n )
const;
127 template<
typename Other >
inline void scale(
const Other& scalar )
const;
156 template<
typename PT
161 if( (~*
this).isRestricted() ) {
165 return (~*
this).get()[index];
181 template<
typename PT
186 if( (~*
this).isRestricted() ) {
190 return (~*
this).get().at( index );
203 template<
typename PT
207 if( (~*
this).isRestricted() ) {
211 return (~*
this).get().data();
222 template<
typename PT
226 if( (~*
this).isRestricted() ) {
230 return (~*
this).get().begin();
240 template<
typename PT
244 return (~*
this).get().cbegin();
255 template<
typename PT
259 if( (~*
this).isRestricted() ) {
263 return (~*
this).get().end();
273 template<
typename PT
277 return (~*
this).get().cend();
295 template<
typename PT
299 return (~*
this).get().size();
309 template<
typename PT
313 return (~*
this).get().capacity();
326 template<
typename PT
330 return (~*
this).get().nonZeros();
342 template<
typename PT
348 reset( (~*
this).
get() );
360 template<
typename PT
366 clear( (~*
this).
get() );
387 template<
typename PT
391 if( (~*
this).isRestricted() ) {
395 (~*
this).
get().resize( n, preserve );
414 template<
typename PT
418 if( (~*
this).isRestricted() ) {
422 (~*
this).
get().extend( n, preserve );
437 template<
typename PT
441 if( (~*
this).isRestricted() ) {
445 (~*
this).
get().reserve( n );
457 template<
typename PT
459 template<
typename Other >
462 if( (~*
this).isRestricted() ) {
466 (~*
this).
get().scale( scalar );
482 template<
typename PT,
typename VT >
486 template<
typename PT,
typename VT >
490 template<
typename PT,
typename VT >
494 template<
typename PT,
typename VT >
498 template<
typename PT,
typename VT >
501 template<
typename PT,
typename VT >
504 template<
typename PT,
typename VT >
507 template<
typename PT,
typename VT >
510 template<
typename PT,
typename VT >
513 template<
typename PT,
typename VT >
526 template<
typename PT
531 return proxy.
begin();
543 template<
typename PT
560 template<
typename PT
577 template<
typename PT
594 template<
typename PT
610 template<
typename PT
629 template<
typename PT
653 template<
typename PT
656 resize_backend(
const DenseVectorProxy<PT,VT>& proxy,
size_t n,
bool preserve )
660 if( proxy.size() != n ) {
680 template<
typename PT
683 resize_backend(
const DenseVectorProxy<PT,VT>& proxy,
size_t n,
bool preserve )
685 proxy.resize( n, preserve );
711 template<
typename PT
715 resize_backend( proxy, n, preserve );
729 template<
typename PT
747 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
Header file for auxiliary alias declarations.
Header file for the UNUSED_PARAMETER function template.
ReturnType_< VT > ReturnType
Return type for expression template evaluations.
Definition: DenseVectorProxy.h:83
BLAZE_ALWAYS_INLINE size_t capacity(const Matrix< MT, SO > &matrix) noexcept
Returns the maximum capacity of the matrix.
Definition: Matrix.h:346
Header file for basic type definitions.
size_t nonZeros() const
Returns the number of non-zero elements in the represented vector.
Definition: DenseVectorProxy.h:328
ConstIterator cbegin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:242
BLAZE_ALWAYS_INLINE size_t size(const Vector< VT, TF > &vector) noexcept
Returns the current size/dimension of the vector.
Definition: Vector.h:258
Pointer_< VT > Pointer
Pointer to a non-constant vector value.
Definition: DenseVectorProxy.h:87
Reference at(size_t index) const
Checked access to the vector elements.
Definition: DenseVectorProxy.h:184
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:188
void reset(const DiagonalProxy< MT > &proxy)
Resetting the represented element to the default initial values.
Definition: DiagonalProxy.h:533
Header file for the IsRowVector type trait.
void clear() const
Clearing the represented vector.
Definition: DenseVectorProxy.h:362
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:389
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:384
void extend(size_t n, bool preserve=true) const
Extending the size of the represented vector.
Definition: DenseVectorProxy.h:416
typename T::ResultType ResultType_
Alias declaration for nested ResultType type definitions.The ResultType_ alias declaration provides a...
Definition: Aliases.h:323
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:298
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:232
Pointer data() const
Low-level data access to vector elements.
Definition: DenseVectorProxy.h:205
typename T::ReturnType ReturnType_
Alias declaration for nested ReturnType type definitions.The ReturnType_ alias declaration provides a...
Definition: Aliases.h:343
Proxy backend for dense vector types.The DenseVectorProxy class serves as a backend for the Proxy cla...
Definition: DenseVectorProxy.h:76
typename T::CompositeType CompositeType_
Alias declaration for nested CompositeType type definitions.The CompositeType_ alias declaration prov...
Definition: Aliases.h:83
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:263
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:344
const Element * ConstIterator
Iterator over constant elements.
Definition: CompressedMatrix.h:2647
ConstIterator_< VT > ConstIterator
Iterator over constant elements.
Definition: DenseVectorProxy.h:90
Iterator_< VT > Iterator
Iterator over non-constant elements.
Definition: DenseVectorProxy.h:89
ElementType_< VT > ElementType
Type of the vector elements.
Definition: DenseVectorProxy.h:82
ConstIterator cend() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:275
typename T::ElementType ElementType_
Alias declaration for nested ElementType type definitions.The ElementType_ alias declaration provides...
Definition: Aliases.h:163
size_t capacity() const
Returns the maximum capacity of the represented vector.
Definition: DenseVectorProxy.h:311
CompositeType_< VT > CompositeType
Data type for composite expression templates.
Definition: DenseVectorProxy.h:84
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:159
ResultType_< VT > ResultType
Result type for expression template evaluations.
Definition: DenseVectorProxy.h:80
Constraint on the data type.
Header file for the exception macros of the math module.
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:538
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:254
typename T::Reference Reference_
Alias declaration for nested Reference type definitions.The Reference_ alias declaration provides a c...
Definition: Aliases.h:283
Header file for the EnableIf class template.
void clear(const DiagonalProxy< MT > &proxy)
Clearing the represented element.
Definition: DiagonalProxy.h:553
void scale(const Other &scalar) const
Scaling of the vector by the scalar value scalar ( ).
Definition: DenseVectorProxy.h:460
Iterator end() const
Returns an iterator just past the last element of the represented vector.
Definition: DenseVectorProxy.h:257
Reference_< VT > Reference
Reference to a non-constant vector value.
Definition: DenseVectorProxy.h:85
size_t size() const
Returns the current size/dimension of the represented vector.
Definition: DenseVectorProxy.h:297
Header file for the reset shim.
void reserve(size_t n) const
Setting the minimum capacity of the represented vector.
Definition: DenseVectorProxy.h:439
Element * Iterator
Iterator over non-constant elements.
Definition: CompressedMatrix.h:2646
TransposeType_< VT > TransposeType
Transpose type for expression template evaluations.
Definition: DenseVectorProxy.h:81
ConstReference_< VT > ConstReference
Reference to a constant vector value.
Definition: DenseVectorProxy.h:86
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
ConstPointer_< VT > ConstPointer
Pointer to a constant vector value.
Definition: DenseVectorProxy.h:88
MatrixAccessProxy< This > Reference
Reference to a non-constant matrix value.
Definition: CompressedMatrix.h:2644
typename T::TransposeType TransposeType_
Alias declaration for nested TransposeType type definitions.The TransposeType_ alias declaration prov...
Definition: Aliases.h:403
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.
Iterator begin() const
Returns an iterator to the first element of the represented vector.
Definition: DenseVectorProxy.h:224