\doxysection{gko::\+Diagonal\+Extractable\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1DiagonalExtractable}{}\label{classgko_1_1DiagonalExtractable}\index{gko::DiagonalExtractable$<$ ValueType $>$@{gko::DiagonalExtractable$<$ ValueType $>$}}


The diagonal of a \doxylink{classgko_1_1LinOp}{Lin\+Op} implementing this interface can be extracted.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+base/\+lin\+\_\+op.\+hpp$>$}



Inheritance diagram for gko::\+Diagonal\+Extractable\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1DiagonalExtractable__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+Diagonal\+Extractable\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=230pt]{classgko_1_1DiagonalExtractable__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1DiagonalExtractable_a060bfca6e1f069313977e2b87f22e814}\label{classgko_1_1DiagonalExtractable_a060bfca6e1f069313977e2b87f22e814} 
using {\bfseries value\+\_\+type} = Value\+Type
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable_a7d41c0cb7b317402ea61bc145b82a9db}{extract\+\_\+diagonal\+\_\+linop}} () const override
\begin{DoxyCompactList}\small\item\em Extracts the diagonal entries of the matrix into a vector. \end{DoxyCompactList}\item 
virtual std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{matrix::\+\+Diagonal}}$<$ Value\+Type $>$ $>$ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable_aad6b7e3977359d5a3beab6b27bbb64c4}{extract\+\_\+diagonal}} () const =0
\begin{DoxyCompactList}\small\item\em Extracts the diagonal entries of the matrix into a vector. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type$>$\newline
class gko::\+\+Diagonal\+Extractable$<$ Value\+Type $>$}
The diagonal of a \doxylink{classgko_1_1LinOp}{Lin\+Op} 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. 

\label{doc-func-members}
\Hypertarget{classgko_1_1DiagonalExtractable_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1DiagonalExtractable_aad6b7e3977359d5a3beab6b27bbb64c4}\index{gko::DiagonalExtractable$<$ ValueType $>$@{gko::DiagonalExtractable$<$ ValueType $>$}!extract\_diagonal@{extract\_diagonal}}
\index{extract\_diagonal@{extract\_diagonal}!gko::DiagonalExtractable$<$ ValueType $>$@{gko::DiagonalExtractable$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{extract\_diagonal()}{extract\_diagonal()}}
{\footnotesize\ttfamily \label{classgko_1_1DiagonalExtractable_aad6b7e3977359d5a3beab6b27bbb64c4} 
template$<$typename Value\+Type$>$ \\
virtual std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{matrix::\+\+Diagonal}}$<$ Value\+Type $>$ $>$ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable}{gko::\+\+Diagonal\+Extractable}}$<$ Value\+Type $>$::\+extract\+\_\+diagonal (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Extracts the diagonal entries of the matrix into a vector. 


\begin{DoxyParams}{Parameters}
{\em diag} & the vector into which the diagonal will be written \\
\hline
\end{DoxyParams}


Implemented in \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af12b1d22ad6851193c0f17e52d650180}{gko::\+matrix::\+\+Coo$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af12b1d22ad6851193c0f17e52d650180}{gko::\+matrix::\+\+Coo$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_a75ddc647a3998ca75e15ac8cd29c24ce}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_a75ddc647a3998ca75e15ac8cd29c24ce}{gko::\+matrix::\+\+Csr$<$ value\+\_\+type, index\+\_\+type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr_a75ddc647a3998ca75e15ac8cd29c24ce}{gko::\+matrix::\+\+Csr$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ Value\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ absolute\+\_\+type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ remove\+\_\+complex$<$ Value\+Type $>$ $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ to\+\_\+complex$<$ Value\+Type $>$ $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ value\+\_\+type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense_af5e567991ffd5a1928dc27cddb21d5f8}{gko::\+matrix::\+\+Dense$<$ Value\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Ell_a61bddeccf89f00e80ee1e8d538094b7c}{gko::\+matrix::\+\+Ell$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Ell_a61bddeccf89f00e80ee1e8d538094b7c}{gko::\+matrix::\+\+Ell$<$ value\+\_\+type, index\+\_\+type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Ell_a61bddeccf89f00e80ee1e8d538094b7c}{gko::\+matrix::\+\+Ell$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fbcsr_aa630d6007d70bd9abc78ebac71ad24b6}{gko::\+matrix::\+\+Fbcsr$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fbcsr_aa630d6007d70bd9abc78ebac71ad24b6}{gko::\+matrix::\+\+Fbcsr$<$ Value\+Type, Index\+Type $>$}}, \doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid_a779434a67614e111b4b1cb5e449e22bd}{gko::\+matrix::\+\+Hybrid$<$ Value\+Type, Index\+Type $>$}}, and \doxymbox{\hyperlink{classgko_1_1matrix_1_1Sellp_aeeedbc7fb3f2f015b5c58e63adfef43f}{gko::\+matrix::\+\+Sellp$<$ Value\+Type, Index\+Type $>$}}.

\Hypertarget{classgko_1_1DiagonalExtractable_a7d41c0cb7b317402ea61bc145b82a9db}\index{gko::DiagonalExtractable$<$ ValueType $>$@{gko::DiagonalExtractable$<$ ValueType $>$}!extract\_diagonal\_linop@{extract\_diagonal\_linop}}
\index{extract\_diagonal\_linop@{extract\_diagonal\_linop}!gko::DiagonalExtractable$<$ ValueType $>$@{gko::DiagonalExtractable$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{extract\_diagonal\_linop()}{extract\_diagonal\_linop()}}
{\footnotesize\ttfamily \label{classgko_1_1DiagonalExtractable_a7d41c0cb7b317402ea61bc145b82a9db} 
template$<$typename Value\+Type$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable}{gko::\+\+Diagonal\+Extractable}}$<$ Value\+Type $>$::\+extract\+\_\+diagonal\+\_\+linop (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Extracts the diagonal entries of the matrix into a vector. 

\begin{DoxyReturn}{Returns}
linop the linop of diagonal format 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1DiagonalLinOpExtractable_a02ab47f56934bb00c994fe03c9204369}{gko::\+\+Diagonal\+Lin\+Op\+Extractable}}.



The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+base/\+lin\+\_\+op.\+hpp\end{DoxyCompactItemize}
