Proxy backend for dense vector types.
More...
#include <DenseVectorProxy.h>
Inherits blaze::DenseVector< PT, IsRowVector_v< VT > >.
|
using | ResultType = ResultType_t< VT > |
| Result type for expression template evaluations.
|
|
using | TransposeType = TransposeType_t< VT > |
| Transpose type for expression template evaluations.
|
|
using | ElementType = ElementType_t< VT > |
| Type of the vector elements.
|
|
using | ReturnType = ReturnType_t< VT > |
| Return type for expression template evaluations.
|
|
using | CompositeType = CompositeType_t< VT > |
| Data type for composite expression templates.
|
|
using | Reference = Reference_t< VT > |
| Reference to a non-constant vector value.
|
|
using | ConstReference = ConstReference_t< VT > |
| Reference to a constant vector value.
|
|
using | Pointer = Pointer_t< VT > |
| Pointer to a non-constant vector value.
|
|
using | ConstPointer = ConstPointer_t< VT > |
| Pointer to a constant vector value.
|
|
using | Iterator = Iterator_t< VT > |
| Iterator over non-constant elements.
|
|
using | ConstIterator = ConstIterator_t< VT > |
| Iterator over constant elements.
|
|
using | VectorType = PT |
| Type of the vector.
|
|
|
|
Reference | operator[] (size_t index) const |
| Subscript operator for the direct access to vector elements. More...
|
|
Reference | at (size_t index) const |
| Checked access to the vector elements. More...
|
|
Pointer | data () const |
| Low-level data access to vector elements. More...
|
|
Iterator | begin () const |
| Returns an iterator to the first element of the represented vector. More...
|
|
ConstIterator | cbegin () const |
| Returns an iterator to the first element of the represented vector. More...
|
|
Iterator | end () const |
| Returns an iterator just past the last element of the represented vector. More...
|
|
ConstIterator | cend () const |
| Returns an iterator just past the last element of the represented vector. More...
|
|
|
size_t | size () const |
| Returns the current size/dimension of the represented vector. More...
|
|
size_t | capacity () const |
| Returns the maximum capacity of the represented vector. More...
|
|
size_t | nonZeros () const |
| Returns the number of non-zero elements in the represented vector. More...
|
|
void | reset () const |
| Reset to the default initial value. More...
|
|
void | clear () const |
| Clearing the represented vector. More...
|
|
void | resize (size_t n, bool preserve=true) const |
| Changing the size of the represented vector. More...
|
|
void | extend (size_t n, bool preserve=true) const |
| Extending the size of the represented vector. More...
|
|
void | reserve (size_t n) const |
| Setting the minimum capacity of the represented vector. More...
|
|
|
template<typename Other > |
void | scale (const Other &scalar) const |
| Scaling of the vector by the scalar value scalar ( ). More...
|
|
|
BLAZE_ALWAYS_INLINE constexpr PT & | operator~ () noexcept |
| CRTP-based conversion operation for non-constant vectors. More...
|
|
BLAZE_ALWAYS_INLINE constexpr const PT & | operator~ () const noexcept |
| CRTP-based conversion operation for constant vectors. More...
|
|
constexpr PT & | operator* () noexcept |
| CRTP-based conversion operation for non-constant vectors. More...
|
|
constexpr const PT & | operator* () const noexcept |
| CRTP-based conversion operation for constant vectors. More...
|
|
|
static constexpr bool | simdEnabled = VT::simdEnabled |
| Compilation flag for SIMD optimization.
|
|
static constexpr bool | smpAssignable = VT::smpAssignable |
| Compilation flag for SMP assignments.
|
|
static constexpr bool | transposeFlag |
| Transpose flag of the vector.
|
|
template<typename PT, typename VT>
class blaze::DenseVectorProxy< PT, VT >
Proxy backend for dense vector types.
The DenseVectorProxy class serves as a backend for the Proxy class. It is used in case the data type represented by the proxy is a dense vector and augments the Proxy interface by the complete interface required of dense vectors.
◆ at()
template<typename PT , typename VT >
Checked access to the vector elements.
- Parameters
-
index | Access index. The index has to be in the range . |
- Returns
- Reference to the accessed value.
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
std::out_of_range | Invalid vector access index. |
In contrast to the subscript operator this function always performs a check of the given access index.
◆ begin()
template<typename PT , typename VT >
Returns an iterator to the first element of the represented vector.
- Returns
- Iterator to the first element of the vector.
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
◆ capacity()
template<typename PT , typename VT >
Returns the maximum capacity of the represented vector.
- Returns
- The capacity of the vector.
◆ cbegin()
template<typename PT , typename VT >
Returns an iterator to the first element of the represented vector.
- Returns
- Iterator to the first element of the vector.
◆ cend()
template<typename PT , typename VT >
Returns an iterator just past the last element of the represented vector.
- Returns
- Iterator just past the last element of the vector.
◆ clear()
template<typename PT , typename VT >
Clearing the represented vector.
- Returns
- void
This function clears the vector to its default initial state.
◆ data()
template<typename PT , typename VT >
Low-level data access to vector elements.
- Returns
- Pointer to the internal element storage.
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
This function returns a pointer to the internal storage of the dynamic vector.
◆ end()
template<typename PT , typename VT >
Returns an iterator just past the last element of the represented vector.
- Returns
- Iterator just past the last element of the vector.
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
◆ extend()
template<typename PT , typename VT >
Extending the size of the represented vector.
- Parameters
-
n | Number of additional vector elements. |
preserve | true if the old values of the vector should be preserved, false if not. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
This function extends the size of the vector. Depending on the type of the vector, during this operation new dynamic memory may be allocated in case the capacity of the vector is too small. Therefore this function potentially changes all vector elements. In order to preserve the old vector values, the preserve flag can be set to true. However, note that depending on the type vector new vector elements may not initialized!
◆ nonZeros()
template<typename PT , typename VT >
Returns the number of non-zero elements in the represented vector.
- Returns
- The number of non-zero elements in the vector.
Note that the number of non-zero elements is always less than or equal to the current size of the vector.
◆ operator*() [1/2]
|
constexprnoexceptinherited |
CRTP-based conversion operation for constant vectors.
- Returns
- Const reference of the actual type of the vector.
This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a constant reference to the actual type VT.
◆ operator*() [2/2]
|
constexprnoexceptinherited |
CRTP-based conversion operation for non-constant vectors.
- Returns
- Mutable reference of the actual type of the vector.
This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a mutable reference to the actual type VT.
◆ operator[]()
template<typename PT , typename VT >
Subscript operator for the direct access to vector elements.
- Parameters
-
index | Access index. The index has to be in the range . |
- Returns
- Reference to the accessed value.
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
◆ operator~() [1/2]
|
constexprnoexceptinherited |
CRTP-based conversion operation for constant vectors.
- Returns
- Constant reference of the actual type of the vector.
This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a constant reference to the actual type VT.
◆ operator~() [2/2]
|
constexprnoexceptinherited |
CRTP-based conversion operation for non-constant vectors.
- Returns
- Mutable reference of the actual type of the vector.
This operator performs the CRTP-based type-safe downcast to the actual type VT of the vector. It will return a mutable reference to the actual type VT.
◆ reserve()
template<typename PT , typename VT >
Setting the minimum capacity of the represented vector.
- Parameters
-
n | The new minimum capacity of the vector. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
This function increases the capacity of the vector to at least n elements. The current values of the vector elements are preserved.
◆ reset()
template<typename PT , typename VT >
Reset to the default initial value.
- Returns
- void
This function resets all elements of the vector to the default initial values.
◆ resize()
template<typename PT , typename VT >
Changing the size of the represented vector.
- Parameters
-
n | The new size of the vector. |
preserve | true if the old values of the vector should be preserved, false if not. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
This function changes the size of the vector. Depending on the type of the vector, during this operation new dynamic memory may be allocated in case the capacity of the vector is too small. Note that this function may invalidate all existing views (subvectors, ...) on the vector if it is used to shrink the vector. Additionally, the resize() operation potentially changes all vector elements. In order to preserve the old vector values, the preserve flag can be set to true. However, note that depending on the type of the vector new vector elements may not initialized!
◆ scale()
template<typename PT , typename VT >
template<typename Other >
Scaling of the vector by the scalar value scalar (
).
- Parameters
-
scalar | The scalar value for the vector scaling. |
- Returns
- void
- Exceptions
-
std::invalid_argument | Invalid access to restricted element. |
This function scales the vector by applying the given scalar value scalar to each element of the vector. For built-in and complex
data types it has the same effect as using the multiplication assignment operator.
◆ size()
template<typename PT , typename VT >
Returns the current size/dimension of the represented vector.
- Returns
- The size of the vector.
The documentation for this class was generated from the following file: