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.
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!
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.
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.
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.
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.
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!
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.