Ginkgo: gko::DiagonalLinOpExtractable Class Reference

| Ginkgo Generated from branch based on main. Ginkgo version 1.11.0 A numerical linear algebra library targeting many-core architectures

Loading...
Searching...
No Matches
gko::DiagonalLinOpExtractable Class Referenceabstract
Linear Operators

The diagonal of a LinOp can be extracted. More...

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

Inheritance diagram for gko::DiagonalLinOpExtractable:
[legend]

## Public Member Functions
virtual std::unique_ptr< LinOp > | extract_diagonal_linop () const =0
| Extracts the diagonal entries of the matrix into a vector.

## Detailed Description

The diagonal of a LinOp can be extracted.

It will be implemented by DiagonalExtractable<ValueType>, so the class does not need to implement it. extract_diagonal_linop returns a linop which 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_linop()

virtual std::unique_ptr< LinOp > gko::DiagonalLinOpExtractable::extract_diagonal_linop | ( |  | ) | const
| pure virtual

Extracts the diagonal entries of the matrix into a vector.

Returns
  linop the linop of diagonal format

Implemented in gko::DiagonalExtractable< ValueType >, and gko::DiagonalExtractable< default_precision >.

The documentation for this class was generated from the following file:

- ginkgo/core/base/lin_op.hpp