|
enum | { smpAssignable = MT::smpAssignable
} |
| Compilation flag for SMP assignments. More...
|
|
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 SMatTransposer< MT, SO > | MatrixType |
| Type of the matrix.
|
|
|
| SMatTransposer (MT &sm) |
| Constructor for the SMatTransposer class. More...
|
|
ConstReference | operator() (size_t i, size_t j) const |
| 2D-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...
|
|
template<typename Other > |
EnableIf< IsNumeric< Other >, SMatTransposer >::Type & | operator*= (Other rhs) |
| Multiplication assignment operator for the multiplication between a matrix and a scalar value ( ). More...
|
|
template<typename Other > |
EnableIf< IsNumeric< Other >, SMatTransposer >::Type & | operator/= (Other rhs) |
| Division assignment operator for the division of a matrix by a scalar value ( ). More...
|
|
size_t | rows () const |
| Returns the current number of rows of the matrix. More...
|
|
size_t | columns () const |
| Returns the current number of columns of the matrix. More...
|
|
size_t | capacity () const |
| Returns the maximum capacity of the matrix. More...
|
|
size_t | capacity (size_t i) const |
| 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...
|
|
template<typename Other > |
bool | canAlias (const Other *alias) const |
| Returns whether the matrix can alias with the given address alias. More...
|
|
template<typename Other > |
bool | isAliased (const Other *alias) const |
| Returns whether the matrix is aliased with the given address alias. More...
|
|
bool | canSMPAssign () const |
| Returns whether the matrix can be used in SMP assignments. More...
|
|
template<typename MT2 > |
void | assign (const SparseMatrix< MT2, false > &rhs) |
| Implementation of the transpose assignment of a row-major sparse matrix. More...
|
|
template<typename MT2 > |
void | assign (const SparseMatrix< MT2, true > &rhs) |
| Implementation of the transpose assignment of a column-major sparse matrix. More...
|
|
BLAZE_ALWAYS_INLINE MatrixType & | operator~ () |
| Conversion operator for non-constant matrices. More...
|
|
BLAZE_ALWAYS_INLINE const MatrixType & | operator~ () const |
| 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>
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>
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 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>