|
| SMatTransposer (MT &sm) noexcept |
| Constructor for the SMatTransposer class. More...
|
|
ConstReference | operator() (size_t i, size_t j) const |
| 2D-access to the matrix elements. More...
|
|
ConstReference | at (size_t i, size_t j) const |
| Checked access to the matrix elements. More...
|
|
Iterator | begin (size_t i) |
| Returns an iterator to the first non-zero element of row/column i. More...
|
|
ConstIterator | begin (size_t i) const |
| Returns an iterator to the first non-zero element of row/column i. More...
|
|
ConstIterator | cbegin (size_t i) const |
| Returns an iterator to the first non-zero element of row/column i. More...
|
|
Iterator | end (size_t i) |
| Returns an iterator just past the last non-zero element of row/column i. More...
|
|
ConstIterator | end (size_t i) const |
| Returns an iterator just past the last non-zero element of row/column i. More...
|
|
ConstIterator | cend (size_t i) const |
| Returns an iterator just past the last non-zero element of row/column i. More...
|
|
size_t | rows () const noexcept |
| Returns the current number of rows of the matrix. More...
|
|
size_t | columns () const noexcept |
| Returns the current number of columns of the matrix. More...
|
|
size_t | capacity () const noexcept |
| Returns the maximum capacity of the matrix. More...
|
|
size_t | capacity (size_t i) const noexcept |
| Returns the current capacity of the specified row/column. More...
|
|
size_t | nonZeros () const |
| Returns the number of non-zero elements in the matrix. More...
|
|
size_t | nonZeros (size_t i) const |
| Returns the number of non-zero elements in the specified row/column. More...
|
|
void | reset () |
| Resets the matrix elements. More...
|
|
Iterator | insert (size_t i, size_t j, const ElementType &value) |
| Inserting an element into the sparse matrix. More...
|
|
void | reserve (size_t nonzeros) |
| Setting the minimum capacity of the sparse matrix. More...
|
|
void | reserve (size_t i, size_t nonzeros) |
| Setting the minimum capacity of a specific row/column of the sparse matrix. More...
|
|
void | append (size_t i, size_t j, const ElementType &value, bool check=false) |
| Appending an element to the specified row/column of the sparse matrix. More...
|
|
void | finalize (size_t i) |
| Finalizing the element insertion of a row/column. More...
|
|
bool | isIntact () const noexcept |
| Returns whether the invariants of the matrix are intact. More...
|
|
template<typename Other > |
bool | canAlias (const Other *alias) const noexcept |
| Returns whether the matrix can alias with the given address alias. More...
|
|
template<typename Other > |
bool | isAliased (const Other *alias) const noexcept |
| Returns whether the matrix is aliased with the given address alias. More...
|
|
bool | canSMPAssign () const noexcept |
| Returns whether the matrix can be used in SMP assignments. More...
|
|
template<typename MT2 , bool SO2> |
void | assign (const Matrix< MT2, SO2 > &rhs) |
| Implementation of the transpose assignment of a matrix. More...
|
|
BLAZE_ALWAYS_INLINE MatrixType & | operator~ () noexcept |
| Conversion operator for non-constant matrices. More...
|
|
BLAZE_ALWAYS_INLINE const MatrixType & | operator~ () const noexcept |
| Conversion operator for constant matrices. More...
|
|
template<typename MT, bool SO>
class blaze::SMatTransposer< MT, SO >
Expression object for the transposition of a sparse matrix.
The SMatTransposer class is a wrapper object for the temporary transposition of a sparse matrix.
template<typename MT , bool SO>
Appending an element to the specified row/column of the sparse matrix.
- Parameters
-
i | The row index of the new element. The index has to be in the range . |
j | The column 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 matrix with elements. It appends a new element to the end of the specified row/column 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 specified row/column of the sparse matrix
- the current number of non-zero elements in row/column i must be smaller than the capacity of row/column i.
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 MT , bool SO>
template<typename MT2 , bool SO2>
Implementation of the transpose assignment of a matrix.
- Parameters
-
rhs | The right-hand side matrix 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 MT , bool SO>
Returns an iterator to the first non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator to the first non-zero element of row/column i.
This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.
template<typename MT , bool SO>
Returns an iterator to the first non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator to the first non-zero element of row/column i.
This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.
template<typename MT , bool SO>
Returns an iterator to the first non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator to the first non-zero element of row/column i.
This function returns a row/column iterator to the first non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator to the first non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator to the first non-zero element of column i.
template<typename MT , bool SO>
Returns an iterator just past the last non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator just past the last non-zero element of row/column i.
This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.
template<typename MT , bool SO>
Returns an iterator just past the last non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator just past the last non-zero element of row/column i.
This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.
template<typename MT , bool SO>
Returns an iterator just past the last non-zero element of row/column i.
- Parameters
-
- Returns
- Iterator just past the last non-zero element of row/column i.
This function returns an row/column iterator just past the last non-zero element of row/column i. In case the storage order is set to rowMajor the function returns an iterator just past the last non-zero element of row i, in case the storage flag is set to columnMajor the function returns an iterator just past the last non-zero element of column i.
template<typename MT , bool SO>
Inserting an element into the sparse matrix.
- Parameters
-
i | The row index of the new element. The index has to be in the range . |
j | The column 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 newly inserted element.
- Exceptions
-
std::invalid_argument | Invalid sparse matrix access index. |
This function insert a new element into the sparse matrix. However, duplicate elements are not allowed. In case the sparse matrix already contains an element with row index i and column index j, a std::invalid_argument exception is thrown.
template<typename MT , bool SO>