Expression object for the transposition of a sparse matrix.The SMatTransposer class is a wrapper object for the temporary transposition of a sparse matrix.
More...
#include <SMatTransposer.h>
Inherits blaze::SparseMatrix< SMatTransposer< MT, SO >, SO >.
|
typedef SMatTransposer< MT, SO > | This |
| Type of this SMatTransposer instance.
|
|
typedef MT::TransposeType | ResultType |
| Result type for expression template evaluations.
|
|
typedef MT | OppositeType |
| Result type with opposite storage order for expression template evaluations.
|
|
typedef MT::ResultType | TransposeType |
| Transpose type for expression template evaluations.
|
|
typedef MT::ElementType | ElementType |
| Resulting element type.
|
|
typedef MT::ReturnType | ReturnType |
| Return type for expression template evaluations.
|
|
typedef const This & | CompositeType |
| Data type for composite expression templates.
|
|
typedef MT::Reference | Reference |
| Reference to a non-constant matrix value.
|
|
typedef MT::ConstReference | ConstReference |
| Reference to a constant matrix value.
|
|
typedef MT::Iterator | Iterator |
| Iterator over non-constant elements.
|
|
typedef MT::ConstIterator | ConstIterator |
| Iterator over constant elements.
|
|
typedef MT | MatrixType |
| Type of the matrix.
|
|
|
MT & | sm_ |
| The sparse matrix operand.
|
|
template<typename, bool>
class blaze::SMatTransposer< typename, bool >
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 , bool >
Constructor for the SMatTransposer class.
- Parameters
-
sm | The sparse matrix operand. |
template<typename , bool >
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 , bool >
template<typename MT2 >
Implementation of the transpose assignment of a row-major sparse matrix.
- Parameters
-
rhs | The right-hand side sparse 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 , bool >
template<typename MT2 >
Implementation of the transpose assignment of a column-major sparse matrix.
- Parameters
-
rhs | The right-hand side sparse 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 , bool >
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 , bool >
template<typename Other >
Returns whether the matrix can alias with the given address alias.
- Parameters
-
alias | The alias to be checked. |
- Returns
- true in case the alias corresponds to this matrix, false if not.
template<typename , bool >
Returns the current number of columns of the matrix.
- Returns
- The number of columns of the matrix.
template<typename , bool >
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 , bool >
Finalizing the element insertion of a row/column.
- Parameters
-
i | The index of the row/column to be finalized . |
- Returns
- void
This function is part of the low-level interface to efficiently fill the matrix with elements. After completion of row/column i via the append() function, this function can be called to finalize row/column i and prepare the next row/column for insertion process via append().
Note: Although finalize() does not allocate new memory, it still invalidates all iterators returned by the end() functions!
template<typename , bool >
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 , bool >
template<typename Other >
Returns whether the matrix is aliased with the given address alias.
- Parameters
-
alias | The alias to be checked. |
- Returns
- true in case the alias corresponds to this matrix, false if not.
template<typename , bool >
2D-access to the matrix elements.
- Parameters
-
i | Access index for the row. The index has to be in the range . |
j | Access index for the column. The index has to be in the range . |
- Returns
- Reference to the accessed value.
Conversion operator for non-constant matrices.
- Returns
- Reference of the actual type of the matrix.
Conversion operator for constant matrices.
- Returns
- Constant reference of the actual type of the matrix.
template<typename , bool >
Setting the minimum capacity of the sparse matrix.
- Parameters
-
nonzeros | The new minimum capacity of the sparse matrix. |
- Returns
- void
This function increases the capacity of the sparse matrix to at least nonzeros elements. The current values of the matrix elements and the individual capacities of the matrix rows are preserved.
template<typename , bool >
template<typename , bool >
Resets the matrix elements.
- Returns
- void
template<typename , bool >
Returns the current number of rows of the matrix.
- Returns
- The number of rows of the matrix.
The documentation for this class was generated from the following files: