|
template<typename VT , bool TF> |
BLAZE_ALWAYS_INLINE size_t | blaze::size (const Vector< VT, TF > &vector) |
| Returns the current size/dimension of the vector. More...
|
|
template<typename VT , bool TF> |
BLAZE_ALWAYS_INLINE size_t | blaze::capacity (const Vector< VT, TF > &vector) |
| Returns the maximum capacity of the vector. More...
|
|
template<typename VT , bool TF> |
BLAZE_ALWAYS_INLINE size_t | blaze::nonZeros (const Vector< VT, TF > &vector) |
| Returns the number of non-zero elements in the vector. More...
|
|
template<typename VT , bool TF> |
BLAZE_ALWAYS_INLINE void | blaze::resize (Vector< VT, TF > &vector, size_t n, bool preserve) |
| Changing the size of the vector. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2> |
BLAZE_ALWAYS_INLINE void | blaze::assign (Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) |
| Default implementation of the assignment of a vector to a vector. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2> |
BLAZE_ALWAYS_INLINE void | blaze::addAssign (Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) |
| Default implementation of the addition assignment of a vector to a vector. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2> |
BLAZE_ALWAYS_INLINE void | blaze::subAssign (Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) |
| Default implementation of the subtraction assignment of a vector to a vector. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2> |
BLAZE_ALWAYS_INLINE void | blaze::multAssign (Vector< VT1, TF1 > &lhs, const Vector< VT2, TF2 > &rhs) |
| Default implementation of the multiplication assignment of a vector to a vector. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2> |
BLAZE_ALWAYS_INLINE bool | blaze::isSame (const Vector< VT1, TF1 > &a, const Vector< VT2, TF2 > &b) |
| Returns whether the two given vectors represent the same observable state. More...
|
|
|
template<typename T1 , typename T2 > |
const MultTrait< typename
T1::ElementType, typename
T2::ElementType >::Type | blaze::operator, (const Vector< T1, false > &lhs, const Vector< T2, false > &rhs) |
| Multiplication operator for the scalar product (inner product) of two vectors ( ). More...
|
|
template<typename T1 , typename T2 > |
const MultTrait< typename
T1::ElementType, typename
T2::ElementType >::Type | blaze::operator, (const Vector< T1, false > &lhs, const Vector< T2, true > &rhs) |
| Multiplication operator for the scalar product (inner product) of two vectors ( ). More...
|
|
template<typename T1 , typename T2 > |
const MultTrait< typename
T1::ElementType, typename
T2::ElementType >::Type | blaze::operator, (const Vector< T1, true > &lhs, const Vector< T2, false > &rhs) |
| Multiplication operator for the scalar product (inner product) of two vectors ( ). More...
|
|
template<typename T1 , typename T2 > |
const MultTrait< typename
T1::ElementType, typename
T2::ElementType >::Type | blaze::operator, (const Vector< T1, true > &lhs, const Vector< T2, true > &rhs) |
| Multiplication operator for the scalar product (inner product) of two vectors ( ). More...
|
|
template<typename VT , bool TF> |
std::ostream & | blaze::operator<< (std::ostream &os, const Vector< VT, TF > &v) |
| Global output operator for dense and sparse vectors. More...
|
|
template<typename VT1 , bool TF1, typename VT2 , bool TF2>
BLAZE_ALWAYS_INLINE void blaze::addAssign |
( |
Vector< VT1, TF1 > & |
lhs, |
|
|
const Vector< VT2, TF2 > & |
rhs |
|
) |
| |
Default implementation of the addition assignment of a vector to a vector.
- Parameters
-
lhs | The target left-hand side vector. |
rhs | The right-hand side vector to be added. |
- Returns
- void
This function implements the default addition assignment of a vector to a vector.
This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.
template<typename VT1 , bool TF1, typename VT2 , bool TF2>
BLAZE_ALWAYS_INLINE void blaze::assign |
( |
Vector< VT1, TF1 > & |
lhs, |
|
|
const Vector< VT2, TF2 > & |
rhs |
|
) |
| |
Default implementation of the assignment of a vector to a vector.
- Parameters
-
lhs | The target left-hand side vector. |
rhs | The right-hand side vector to be assigned. |
- Returns
- void
This function implements the default assignment of a vector to another vector.
This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.
template<typename VT1 , bool TF1, typename VT2 , bool TF2>
BLAZE_ALWAYS_INLINE bool blaze::isSame |
( |
const Vector< VT1, TF1 > & |
a, |
|
|
const Vector< VT2, TF2 > & |
b |
|
) |
| |
Returns whether the two given vectors represent the same observable state.
- Parameters
-
a | The first vector to be tested for its state. |
b | The second vector to be tested for its state. |
- Returns
- true in case the two vectors share a state, false otherwise.
The isSame function provides an abstract interface for testing if the two given vectors represent the same observable state. This happens for instance in case a
and b
refer to the same vector or in case a
and b
are aliases for the same vector. In case both vectors represent the same observable state, the function returns true, other it returns false.
VectorType vec1( 4UL );
VectorType vec2( 4UL );
SubvectorType sub1 =
subvector( vec1, 0UL, 4UL );
SubvectorType sub2 =
subvector( vec1, 1UL, 2UL );
SubvectorType sub3 =
subvector( vec1, 1UL, 2UL );
template<typename VT1 , bool TF1, typename VT2 , bool TF2>
BLAZE_ALWAYS_INLINE void blaze::multAssign |
( |
Vector< VT1, TF1 > & |
lhs, |
|
|
const Vector< VT2, TF2 > & |
rhs |
|
) |
| |
Default implementation of the multiplication assignment of a vector to a vector.
- Parameters
-
lhs | The target left-hand side vector. |
rhs | The right-hand side vector to be multiplied. |
- Returns
- void
This function implements the default multiplication assignment of a vector to a vector.
This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.
template<typename VT , bool TF>
Changing the size of the vector.
- Parameters
-
vector | The given vector to be resized. |
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 | Vector cannot be resized. |
This function provides a unified interface to resize dense and sparse vectors. In contrast to the resize()
member function, which is only available on resizable vector types, this function can be used on both resizable and non-resizable vectors. In case the given vector type VT is resizable (i.e. provides a resize()
function), the type-specific resize()
member function is called. Depending on the type VT, this may result in the allocation of new dynamic memory and the invalidation of existing views (subvectors, ...). In case VT is non-resizable (i.e. does not provide a resize()
function) and if the specified size is not identical to the current size of the vector, a std::invalid_argument exception is thrown.
template<typename VT1 , bool TF1, typename VT2 , bool TF2>
BLAZE_ALWAYS_INLINE void blaze::subAssign |
( |
Vector< VT1, TF1 > & |
lhs, |
|
|
const Vector< VT2, TF2 > & |
rhs |
|
) |
| |
Default implementation of the subtraction assignment of a vector to a vector.
- Parameters
-
lhs | The target left-hand side vector. |
rhs | The right-hand side vector to be subtracted. |
- Returns
- void
This function implements the default subtraction assignment of a vector to a vector.
This function must NOT be called explicitly! It is used internally for the performance optimized evaluation of expression templates. Calling this function explicitly might result in erroneous results and/or in compilation errors. Instead of using this function use the assignment operator.