Expression object for the transposition of a sparse vector.The SVecTransposer class is a wrapper object for the temporary transposition of a sparse vector.
More...
#include <SVecTransposer.h>
Inherits blaze::SparseVector< SVecTransposer< VT, TF >, TF >.
|
typedef SVecTransposer< VT, TF > | This |
| Type of this SVecTransposer instance.
|
|
typedef VT::TransposeType | ResultType |
| Result type for expression template evaluations.
|
|
typedef VT::ResultType | TransposeType |
| Transpose type for expression template evaluations.
|
|
typedef VT::ElementType | ElementType |
| Resulting element type.
|
|
typedef VT::ReturnType | ReturnType |
| Return type for expression template evaluations.
|
|
typedef const This & | CompositeType |
| Data type for composite expression templates.
|
|
typedef VT::Reference | Reference |
| Reference to a non-constant matrix value.
|
|
typedef VT::ConstReference | ConstReference |
| Reference to a constant matrix value.
|
|
typedef VT::Iterator | Iterator |
| Iterator over non-constant elements.
|
|
typedef VT::ConstIterator | ConstIterator |
| Iterator over constant elements.
|
|
typedef VT | VectorType |
| Type of the vector.
|
|
|
VT & | sv_ |
| The sparse vector operand.
|
|
template<typename, bool>
class blaze::SVecTransposer< typename, bool >
Expression object for the transposition of a sparse vector.
The SVecTransposer class is a wrapper object for the temporary transposition of a sparse vector.
template<typename , bool >
Constructor for the SVecTransposer class.
- Parameters
-
sv | The sparse vector operand. |
template<typename , bool >
Appending an element to the sparse vector.
- Parameters
-
index | The index of the new element. The index has to be in the range . |
value | The value of the element to be appended. |
check | true if the new value should be checked for default values, false if not. |
- Returns
- void
This function provides a very efficient way to fill a sparse vector with elements. It appends a new element to the end of the sparse vector without any additional memory allocation. Therefore it is strictly necessary to keep the following preconditions in mind:
- the index of the new element must be strictly larger than the largest index of non-zero elements in the sparse vector
- the current number of non-zero elements must be smaller than the capacity of the vector
Ignoring these preconditions might result in undefined behavior! The optional check parameter specifies whether the new value should be tested for a default value. If the new value is a default value (for instance 0 in case of an integral element type) the value is not appended. Per default the values are not tested.
Note: Although append() does not allocate new memory, it still invalidates all iterators returned by the end() functions!
template<typename , bool >
template<typename VT2 >
Implementation of the transpose assignment of a dense vector.
- Parameters
-
rhs | The right-hand side dense vector to be assigned. |
- Returns
- void
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 , bool >
template<typename VT2 >
Implementation of the transpose assignment of a sparse vector.
- Parameters
-
rhs | The right-hand side sparse vector to be assigned. |
- Returns
- void
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 , bool >
Returns an iterator to the first non-zero element of the sparse vector.
- Returns
- Iterator to the first non-zero element of the sparse vector.
template<typename , bool >
template<typename Other >
Returns whether the vector can alias with the given address alias.
- Parameters
-
alias | The alias to be checked. |
- Returns
- true in case the alias corresponds to this vector, false if not.
template<typename , bool >
Returns an iterator just past the last non-zero element of the sparse vector.
- Returns
- Iterator just past the last non-zero element of the sparse vector.
template<typename , bool >
Calculating a new vector capacity.
- Returns
- The new compressed vector capacity.
This function calculates a new vector capacity based on the current capacity of the sparse vector. Note that the new capacity is restricted to the interval
.
template<typename , bool >
Inserting an element into the sparse vector.
- Parameters
-
index | The index of the search element. The index has to be in the range . |
- Returns
- Iterator to the element in case the index is found, end() iterator otherwise.
This function can be used to check whether a specific element is contained in the sparse vector. It specifically searches for the element with index index. In case the element is found, the function returns an iterator to the element. Otherwise an iterator just past the last non-zero element of the sparse vector (the end() iterator) is returned. Note that the returned sparse vector iterator is subject to invalidation due to inserting operations via the subscript operator or the insert() function!
template<typename , bool >
Inserting an element into the sparse vector.
- Parameters
-
index | The index of the new element. The index has to be in the range . |
value | The value of the element to be inserted. |
- Returns
- Iterator to the inserted element.
- Exceptions
-
std::invalid_argument | Invalid sparse vector access index. |
This function inserts a new element into the sparse vector. However, duplicate elements are not allowed. In case the sparse matrix already contains an element with row index index, a std::invalid_argument exception is thrown.
template<typename , bool >
template<typename Other >
Returns whether the vector is aliased with the given address alias.
- Parameters
-
alias | The alias to be checked. |
- Returns
- true in case the alias corresponds to this vector, false if not.
template<typename , bool >
template<typename Other >
Multiplication assignment operator for the multiplication between a vector and a scalar value (
).
- Parameters
-
rhs | The right-hand side scalar value for the multiplication. |
- Returns
- Reference to this SVecTransposer.
template<typename , bool >
template<typename Other >
Division assignment operator for the division of a vector by a scalar value (
).
- Parameters
-
rhs | The right-hand side scalar value for the division. |
- Returns
- Reference to this SVecTransposer.
Note: A division by zero is only checked by an user assert.
template<typename , bool >
Subscript operator for the direct access to the vector elements.
- Parameters
-
index | Access index. The index has to be in the range . |
- Returns
- Reference to the accessed value.
Conversion operator for non-constant vectors.
- Returns
- Reference of the actual type of the vector.
Conversion operator for constant vectors.
- Returns
- Const reference of the actual type of the vector.
template<typename , bool >
Setting the minimum capacity of the sparse vector.
- Parameters
-
nonzeros | The new minimum capacity of the sparse vector. |
- Returns
- void
This function increases the capacity of the sparse vector to at least nonzeros elements. The current values of the vector elements are preserved.
template<typename , bool >
Resets the vector elements.
- Returns
- void
template<typename , bool >
Returns the current size/dimension of the vector.
- Returns
- The size of the vector.
The documentation for this class was generated from the following files: