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.
|
|
|
| SVecTransposer (VT &sv) |
| Constructor for the SVecTransposer class.
|
|
Reference | operator[] (size_t index) |
| Subscript operator for the direct access to the vector elements.
|
|
ConstIterator | begin () const |
| Returns an iterator to the first non-zero element of the sparse vector.
|
|
ConstIterator | end () const |
| Returns an iterator just past the last non-zero element of the sparse vector.
|
|
size_t | size () const |
| Returns the current size/dimension of the vector.
|
|
void | reset () |
| Resets the vector elements.
|
|
ElementType & | insert (size_t index, const ElementType &value) |
| Inserting an element into the sparse vector.
|
|
Iterator | find (size_t index) |
| Inserting an element into the sparse vector.
|
|
void | reserve (size_t nonzeros) |
| Setting the minimum capacity of the sparse vector.
|
|
void | append (size_t index, const ElementType &value) |
| Appending an element to the sparse vector.
|
|
template<typename Other > |
bool | isAliased (const Other *alias) const |
| Returns whether the vector is aliased with the given address alias.
|
|
template<typename VT2 > |
void | assign (const DenseVector< VT2, TF > &rhs) |
| Implementation of the transpose assignment of a dense vector.
|
|
template<typename VT2 > |
void | assign (const SparseVector< VT2, TF > &rhs) |
| Implementation of the transpose assignment of a sparse vector.
|
|
VectorType & | operator~ () |
| Conversion operator for non-constant vectors.
|
|
const VectorType & | operator~ () const |
| Conversion operator for constant vectors.
|
|
|
VT & | sv_ |
| The sparse vector operand.
|
|
template<typename VT, bool TF>
class blaze::SVecTransposer< VT, TF >
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 VT, bool TF>
Constructor for the SVecTransposer class.
- Parameters
-
sv | The sparse vector operand. |
template<typename VT, bool TF>
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. |
- 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 check or 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!
Note: Although append() does not allocate new memory, it still invalidates all iterators returned by the end() functions!
template<typename VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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 VT, bool TF>
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.
template<typename VT, bool TF>
Conversion operator for non-constant vectors.
- Returns
- Reference of the actual type of the vector.
template<typename VT, bool TF>
Conversion operator for constant vectors.
- Returns
- Const reference of the actual type of the vector.
template<typename VT, bool TF>
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 VT, bool TF>
Resets the vector elements.
- Returns
- void
template<typename VT, bool TF>
Returns the current size/dimension of the vector.
- Returns
- The size of the vector.
The documentation for this class was generated from the following file: