DiagonalExtractable< ValueType > Class Template Reference#
|
Reference API
|
#include <ginkgo/core/base/lin_op.hpp>
Public Types | |
| using | value_type = ValueType |
Public Member Functions | |
| std::unique_ptr< LinOp > | extract_diagonal_linop () const override |
| virtual std::unique_ptr< matrix::Diagonal< ValueType > > | extract_diagonal () const =0 |
Detailed Description
class gko::DiagonalExtractable< ValueType >
The diagonal of a LinOp implementing this interface can be extracted. extract_diagonal extracts the elements whose col and row index are the same and stores the result in a min(nrows, ncols) x 1 dense matrix.
Member Function Documentation
◆ extract_diagonal()
|
pure virtual |
Extracts the diagonal entries of the matrix into a vector.
- Parameters
-
diag the vector into which the diagonal will be written
Implemented in gko::matrix::Coo< ValueType, IndexType >, gko::matrix::Csr< ValueType, IndexType >, gko::matrix::Dense< ValueType >, gko::matrix::Dense< value_type >, gko::matrix::Dense< ValueType >, gko::matrix::Ell< ValueType, IndexType >, gko::matrix::Fbcsr< ValueType, IndexType >, gko::matrix::Hybrid< ValueType, IndexType >, and gko::matrix::Sellp< ValueType, IndexType >.
◆ extract_diagonal_linop()
|
overridevirtual |
Extracts the diagonal entries of the matrix into a vector.
- Returns
- linop the linop of diagonal format
Implements gko::DiagonalLinOpExtractable.
The documentation for this class was generated from the following file:
- ginkgo/core/base/lin_op.hpp
Generated by