Ginkgo  Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
Public Types | Public Member Functions | List of all members
gko::DiagonalExtractable< ValueType > Class Template Referenceabstract

The diagonal of a LinOp implementing this interface can be extracted. More...

#include <ginkgo/core/base/lin_op.hpp>

Inheritance diagram for gko::DiagonalExtractable< ValueType >:
[legend]
Collaboration diagram for gko::DiagonalExtractable< ValueType >:
[legend]

Public Types

using value_type = ValueType
 

Public Member Functions

std::unique_ptr< LinOpextract_diagonal_linop () const override
 Extracts the diagonal entries of the matrix into a vector. More...
 
virtual std::unique_ptr< matrix::Diagonal< ValueType > > extract_diagonal () const =0
 Extracts the diagonal entries of the matrix into a vector. More...
 

Detailed Description

template<typename ValueType>
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()

template<typename ValueType >
virtual std::unique_ptr<matrix::Diagonal<ValueType> > gko::DiagonalExtractable< ValueType >::extract_diagonal ( ) const
pure virtual

◆ extract_diagonal_linop()

template<typename ValueType >
std::unique_ptr<LinOp> gko::DiagonalExtractable< ValueType >::extract_diagonal_linop ( ) const
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: