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


This class is a utility which efficiently implements the diagonal matrix (a linear operator which scales a vector row wise).  




{\ttfamily \+\#include $<$ginkgo/\+core/\+matrix/\+diagonal.\+hpp$>$}



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


Collaboration diagram for gko::\+matrix::\+Diagonal\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Diagonal__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_af48c9b37ae485401cd1ccb791ecc73c1}\label{classgko_1_1matrix_1_1Diagonal_af48c9b37ae485401cd1ccb791ecc73c1} 
using {\bfseries value\+\_\+type} = Value\+Type
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a2fa3e8f96398dd69d11f6174d79c85b0}\label{classgko_1_1matrix_1_1Diagonal_a2fa3e8f96398dd69d11f6174d79c85b0} 
using {\bfseries index\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a566633415bc403ae3e0969e7287bccbb}\label{classgko_1_1matrix_1_1Diagonal_a566633415bc403ae3e0969e7287bccbb} 
using {\bfseries mat\+\_\+data} = \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$Value\+Type, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}}$>$
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ada71a2fa4638149bf3b42e06c812553b}\label{classgko_1_1matrix_1_1Diagonal_ada71a2fa4638149bf3b42e06c812553b} 
using {\bfseries mat\+\_\+data32} = \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$Value\+Type, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}}$>$
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ad597357f131ddba74701240c74475cc4}\label{classgko_1_1matrix_1_1Diagonal_ad597357f131ddba74701240c74475cc4} 
using {\bfseries device\+\_\+mat\+\_\+data} = \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$Value\+Type, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}}$>$
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a2ef0ee2514edda571fdb8696252f73fd}\label{classgko_1_1matrix_1_1Diagonal_a2ef0ee2514edda571fdb8696252f73fd} 
using {\bfseries device\+\_\+mat\+\_\+data32} = \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\+\_\+matrix\+\_\+data}}$<$Value\+Type, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}}$>$
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a7b23e945e8385826ed8bd7cbf101c843}\label{classgko_1_1matrix_1_1Diagonal_a7b23e945e8385826ed8bd7cbf101c843} 
using {\bfseries absolute\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\+\_\+complex}}$<$Diagonal$>$
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Diagonal$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{gko::\+\+Writable\+To\+Matrix\+Data$<$ default\+\_\+precision, int32 $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries value\+\_\+type}
\item 
using {\bfseries index\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{gko::\+\+Writable\+To\+Matrix\+Data$<$ default\+\_\+precision, int64 $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries value\+\_\+type}
\item 
using {\bfseries index\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{gko::\+\+Readable\+From\+Matrix\+Data$<$ default\+\_\+precision, int32 $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries value\+\_\+type}
\item 
using {\bfseries index\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{gko::\+\+Readable\+From\+Matrix\+Data$<$ default\+\_\+precision, int64 $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries value\+\_\+type}
\item 
using {\bfseries index\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation}{gko::\+\+Enable\+Absolute\+Computation$<$ remove\+\_\+complex$<$ Diagonal$<$ default\+\_\+precision $>$ $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries absolute\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ae4bd12983de99205e870adf707d5f4d8}{transpose}} () const override
\begin{DoxyCompactList}\small\item\em Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a52d222e0925ab14ba3bb5d4842c49c68}{conj\+\_\+transpose}} () const override
\begin{DoxyCompactList}\small\item\em Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the conjugate transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_acec298b0569e2f6d5d21365b0c22e126}\label{classgko_1_1matrix_1_1Diagonal_acec298b0569e2f6d5d21365b0c22e126} 
void {\bfseries convert\+\_\+to} (Diagonal$<$ \doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\+\_\+precision}}$<$ Value\+Type $>$ $>$ \texorpdfstring{$\ast$}{*}result) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a8fa28511b52b378a10b51875382a67d3}\label{classgko_1_1matrix_1_1Diagonal_a8fa28511b52b378a10b51875382a67d3} 
void {\bfseries move\+\_\+to} (Diagonal$<$ \doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\+\_\+precision}}$<$ Value\+Type $>$ $>$ \texorpdfstring{$\ast$}{*}result) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_acdc46e6b235535a4195059665f55c1e4}\label{classgko_1_1matrix_1_1Diagonal_acdc46e6b235535a4195059665f55c1e4} 
void {\bfseries convert\+\_\+to} (\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}$<$ Value\+Type, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \texorpdfstring{$\ast$}{*}result) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a4c8fef0a2ed5d145a4f12ffe77895821}\label{classgko_1_1matrix_1_1Diagonal_a4c8fef0a2ed5d145a4f12ffe77895821} 
void {\bfseries move\+\_\+to} (\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}$<$ Value\+Type, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \texorpdfstring{$\ast$}{*}result) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a305099c7472d7193cc3ce63b00ea5475}\label{classgko_1_1matrix_1_1Diagonal_a305099c7472d7193cc3ce63b00ea5475} 
void {\bfseries convert\+\_\+to} (\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}$<$ Value\+Type, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \texorpdfstring{$\ast$}{*}result) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a7ebaf5eb8811b866978246adb95591ac}\label{classgko_1_1matrix_1_1Diagonal_a7ebaf5eb8811b866978246adb95591ac} 
void {\bfseries move\+\_\+to} (\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}$<$ Value\+Type, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \texorpdfstring{$\ast$}{*}result) override
\item 
std::\+unique\+\_\+ptr$<$ absolute\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_aa94ce42bd04297ff98bf88fe781bb49b}{compute\+\_\+absolute}} () const override
\begin{DoxyCompactList}\small\item\em Gets the Absolute\+Lin\+Op. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ad349aae97a96df89ce2497657c774db7}{compute\+\_\+absolute\+\_\+inplace}} () override
\begin{DoxyCompactList}\small\item\em Compute absolute inplace on each element. \end{DoxyCompactList}\item 
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a521c439edd75040c6ac61c63c812fb97}{get\+\_\+values}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix. \end{DoxyCompactList}\item 
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_ac52112af9277e2348bbeb984ab7bba0d}{get\+\_\+const\+\_\+values}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of values of the matrix.    \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a1b0ac09acf678b127602191f20477cdc}{rapply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\begin{DoxyCompactList}\small\item\em Applies the diagonal matrix from the right side to a matrix b, which means scales the columns of b with the according diagonal entries. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a35de90f46460a480ccb780b17ac5d1d7}{inverse\+\_\+apply}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\begin{DoxyCompactList}\small\item\em Applies the inverse of the diagonal matrix to a matrix b, which means scales the columns of b with the inverse of the according diagonal entries. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a90a4e8aca0dda280d5d063fed815821c}\label{classgko_1_1matrix_1_1Diagonal_a90a4e8aca0dda280d5d063fed815821c} 
void {\bfseries read} (const mat\+\_\+data \&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_abd53b169d1563415aafe5e0a4ef2066a}\label{classgko_1_1matrix_1_1Diagonal_abd53b169d1563415aafe5e0a4ef2066a} 
void {\bfseries read} (const mat\+\_\+data32 \&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_aabad92cba551af7e8bc5d803a0889b42}\label{classgko_1_1matrix_1_1Diagonal_aabad92cba551af7e8bc5d803a0889b42} 
void {\bfseries read} (const device\+\_\+mat\+\_\+data \&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_aa79d649bae1975b935c780b4fd792030}\label{classgko_1_1matrix_1_1Diagonal_aa79d649bae1975b935c780b4fd792030} 
void {\bfseries read} (const device\+\_\+mat\+\_\+data32 \&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_aeba032dc6e819da2a2c8181e8106f464}\label{classgko_1_1matrix_1_1Diagonal_aeba032dc6e819da2a2c8181e8106f464} 
void {\bfseries read} (device\+\_\+mat\+\_\+data \&\&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a145fb611b670f88d0d34b42eb7db8ca5}\label{classgko_1_1matrix_1_1Diagonal_a145fb611b670f88d0d34b42eb7db8ca5} 
void {\bfseries read} (device\+\_\+mat\+\_\+data32 \&\&data) override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ac6a7b546bb0febc1f7f189b78ea17112}\label{classgko_1_1matrix_1_1Diagonal_ac6a7b546bb0febc1f7f189b78ea17112} 
void {\bfseries write} (mat\+\_\+data \&data) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ac4a24ea27f4b7880eb193538b8432cc8}\label{classgko_1_1matrix_1_1Diagonal_ac4a24ea27f4b7880eb193538b8432cc8} 
void {\bfseries write} (mat\+\_\+data32 \&data) const override
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Diagonal$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
const Diagonal$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}} $>$ \texorpdfstring{$\ast$}{*} {\bfseries apply} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Diagonal$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{gko::\+\+Writable\+To\+Matrix\+Data$<$ default\+\_\+precision, int32 $>$}}}
\begin{DoxyCompactItemize}
\item 
virtual void \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData_a96036c3a4bf4c67fa93002808b8b14e2}{write}} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \&data) const=0
\begin{DoxyCompactList}\small\item\em Writes a matrix to a \doxylink{structgko_1_1matrix__data}{matrix\+\_\+data} structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{gko::\+\+Writable\+To\+Matrix\+Data$<$ default\+\_\+precision, int64 $>$}}}
\begin{DoxyCompactItemize}
\item 
virtual void \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData_a96036c3a4bf4c67fa93002808b8b14e2}{write}} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \&data) const=0
\begin{DoxyCompactList}\small\item\em Writes a matrix to a \doxylink{structgko_1_1matrix__data}{matrix\+\_\+data} structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{gko::\+\+Readable\+From\+Matrix\+Data$<$ default\+\_\+precision, int32 $>$}}}
\begin{DoxyCompactItemize}
\item 
virtual void \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData_add5c12e23b3ac3c8fbd607fa5a9656bb}{read}} (const \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \&data)=0
\begin{DoxyCompactList}\small\item\em Reads a matrix from a \doxylink{structgko_1_1matrix__data}{matrix\+\_\+data} structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{gko::\+\+Readable\+From\+Matrix\+Data$<$ default\+\_\+precision, int64 $>$}}}
\begin{DoxyCompactItemize}
\item 
virtual void \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData_add5c12e23b3ac3c8fbd607fa5a9656bb}{read}} (const \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \&data)=0
\begin{DoxyCompactList}\small\item\em Reads a matrix from a \doxylink{structgko_1_1matrix__data}{matrix\+\_\+data} structure. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation}{gko::\+\+Enable\+Absolute\+Computation$<$ remove\+\_\+complex$<$ Diagonal$<$ default\+\_\+precision $>$ $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation_a4cf4eedb2090f486bdef0a8717142b7c}{compute\+\_\+absolute\+\_\+linop}} () const override
\begin{DoxyCompactList}\small\item\em Gets the absolute \doxylink{classgko_1_1LinOp}{Lin\+Op}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} size=0)
\begin{DoxyCompactList}\small\item\em Creates an \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix of the specified size. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a7ea54d3f274958d52e2c78634fa0cdbc}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} size, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$ values)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix from an already allocated (and initialized) array. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Input\+Value\+Type$>$ }\\static std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a48f5f486c58791ba29730411a5bb82d8}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} size, std::\+initializer\+\_\+list$<$ Input\+Value\+Type $>$ values)
\begin{DoxyCompactList}\small\item\em create(std::\+shared\+\_\+ptr$<$const\+Executor$>$, const size\+\_\+type, array$<$value\+\_\+type$>$) \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ const Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a0d20f0d945dc504e4a39e434c3b5a185}{create\+\_\+const}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} size, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Value\+Type $>$ \&\&values)
\begin{DoxyCompactList}\small\item\em Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix from a constant array. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a1dea3b6b0110d43c3edad5033f3054f4}\label{classgko_1_1matrix_1_1Diagonal_a1dea3b6b0110d43c3edad5033f3054f4} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Diagonal, Lin\+Op $>$}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a4df13336280c2189acd768b2c36a893d}\label{classgko_1_1matrix_1_1Diagonal_a4df13336280c2189acd768b2c36a893d} 
class {\bfseries Csr$<$ Value\+Type, int32 $>$}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a56c2ebf8cdf7a7f1f17fc25dd47ea1e9}\label{classgko_1_1matrix_1_1Diagonal_a56c2ebf8cdf7a7f1f17fc25dd47ea1e9} 
class {\bfseries Csr$<$ Value\+Type, int64 $>$}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_aca8d00c0e13e484ce9d83d757371150a}\label{classgko_1_1matrix_1_1Diagonal_aca8d00c0e13e484ce9d83d757371150a} 
class {\bfseries Diagonal$<$ to\+\_\+complex$<$ Value\+Type $>$ $>$}
\item 
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a8f1809ada4287c11af484dc2b17f7cc9}\label{classgko_1_1matrix_1_1Diagonal_a8f1809ada4287c11af484dc2b17f7cc9} 
class {\bfseries Diagonal$<$ previous\+\_\+precision$<$ Value\+Type $>$ $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision$>$\newline
class gko::\+matrix::\+\+Diagonal$<$ Value\+Type $>$}
This class is a utility which efficiently implements the diagonal matrix (a linear operator which scales a vector row wise). 

Objects of the \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} class always represent a square matrix, and require one array to store their values.


\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & precision of matrix elements \\
\hline
{\em Index\+Type} & precision of matrix indexes of a CSR matrix the diagonal is applied or converted to. \\
\hline
\end{DoxyTemplParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_aa94ce42bd04297ff98bf88fe781bb49b}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!compute\_absolute@{compute\_absolute}}
\index{compute\_absolute@{compute\_absolute}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{compute\_absolute()}{compute\_absolute()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_aa94ce42bd04297ff98bf88fe781bb49b} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ absolute\+\_\+type $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+compute\+\_\+absolute (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Gets the Absolute\+Lin\+Op. 

\begin{DoxyReturn}{Returns}
a pointer to the new absolute object 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation_a4c042054915430f60124de37545eab65}{gko::\+\+Enable\+Absolute\+Computation$<$ remove\+\_\+complex$<$ Diagonal$<$ default\+\_\+precision $>$ $>$ $>$}}.

\Hypertarget{classgko_1_1matrix_1_1Diagonal_ad349aae97a96df89ce2497657c774db7}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!compute\_absolute\_inplace@{compute\_absolute\_inplace}}
\index{compute\_absolute\_inplace@{compute\_absolute\_inplace}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{compute\_absolute\_inplace()}{compute\_absolute\_inplace()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_ad349aae97a96df89ce2497657c774db7} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+compute\+\_\+absolute\+\_\+inplace (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Compute absolute inplace on each element. 



Implements \doxymbox{\hyperlink{classgko_1_1AbsoluteComputable_a09c6acf477a3457b2b2dc0618b406da2}{gko::\+\+Absolute\+Computable}}.

\Hypertarget{classgko_1_1matrix_1_1Diagonal_a52d222e0925ab14ba3bb5d4842c49c68}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!conj\_transpose@{conj\_transpose}}
\index{conj\_transpose@{conj\_transpose}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{conj\_transpose()}{conj\_transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a52d222e0925ab14ba3bb5d4842c49c68} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+conj\+\_\+transpose (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the conjugate transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. 

\begin{DoxyReturn}{Returns}
a pointer to the new conjugate transposed object 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Transposable_a7c230aacdb222f09ba49baf0bd9e82eb}{gko::\+\+Transposable}}.

\Hypertarget{classgko_1_1matrix_1_1Diagonal_a7ea54d3f274958d52e2c78634fa0cdbc}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!create@{create}}
\index{create@{create}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/3]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a7ea54d3f274958d52e2c78634fa0cdbc} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{size}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ value\+\_\+type $>$}]{values}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix from an already allocated (and initialized) array. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the matrix \\
\hline
{\em values} & array of matrix values\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
If {\ttfamily values} is not an rvalue, not an array of Value\+Type, or is on the wrong executor, an internal copy will be created, and the original array data will not be used in the matrix.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a48f5f486c58791ba29730411a5bb82d8}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!create@{create}}
\index{create@{create}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/3]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a48f5f486c58791ba29730411a5bb82d8} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
template$<$typename Input\+Value\+Type$>$ \\
std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{const \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{size}{, }\item[{std::\+initializer\+\_\+list$<$ Input\+Value\+Type $>$}]{values}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



create(std::\+shared\+\_\+ptr$<$const\+Executor$>$, const size\+\_\+type, array$<$value\+\_\+type$>$) 

create(std::\+shared\+\_\+ptr$<$const\+Executor$>$, const size\+\_\+type, array$<$value\+\_\+type$>$) \Hypertarget{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!create@{create}}
\index{create@{create}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [3/3]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a319ca63549f8ef7acebf666a0663c15d} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{size}{ = {\ttfamily 0}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates an \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix of the specified size. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the matrix\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}


Referenced by \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal_a48f5f486c58791ba29730411a5bb82d8}{create()}}.

\Hypertarget{classgko_1_1matrix_1_1Diagonal_a0d20f0d945dc504e4a39e434c3b5a185}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!create\_const@{create\_const}}
\index{create\_const@{create\_const}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const()}{create\_const()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a0d20f0d945dc504e4a39e434c3b5a185} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ const Diagonal $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+create\+\_\+const (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{size}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Value\+Type $>$ \&\&}]{values}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Diagonal}{Diagonal} matrix from a constant array. 


\begin{DoxyParams}{Parameters}
{\em exec} & the executor to create the matrix on \\
\hline
{\em size} & the size of the square matrix \\
\hline
{\em values} & the value array of the matrix \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the constant matrix wrapping the input array (if it resides on the same executor as the matrix) or a copy of the array on the correct executor. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ac52112af9277e2348bbeb984ab7bba0d}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!get\_const\_values@{get\_const\_values}}
\index{get\_const\_values@{get\_const\_values}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_values()}{get\_const\_values()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_ac52112af9277e2348bbeb984ab7bba0d} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
const value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+get\+\_\+const\+\_\+values (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix.    

\begin{DoxyReturn}{Returns}
the pointer to the array of values   
\end{DoxyReturn}
\begin{DoxyNote}{Note}
This is the constant version of the function, which can be significantly more memory efficient than the non-\/constant version, so always prefer this version. 
\end{DoxyNote}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a521c439edd75040c6ac61c63c812fb97}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!get\_values@{get\_values}}
\index{get\_values@{get\_values}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{get\_values()}{get\_values()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a521c439edd75040c6ac61c63c812fb97} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
value\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+get\+\_\+values (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of values of the matrix. 

\begin{DoxyReturn}{Returns}
the pointer to the array of values 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a35de90f46460a480ccb780b17ac5d1d7}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!inverse\_apply@{inverse\_apply}}
\index{inverse\_apply@{inverse\_apply}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{inverse\_apply()}{inverse\_apply()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a35de90f46460a480ccb780b17ac5d1d7} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+inverse\+\_\+apply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$}]{x}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Applies the inverse of the diagonal matrix to a matrix b, which means scales the columns of b with the inverse of the according diagonal entries. 


\begin{DoxyParams}{Parameters}
{\em b} & the input vector(s) on which the inverse of the diagonal matrix is applied \\
\hline
{\em x} & the output vector(s) where the result is stored \\
\hline
\end{DoxyParams}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_a1b0ac09acf678b127602191f20477cdc}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!rapply@{rapply}}
\index{rapply@{rapply}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{rapply()}{rapply()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_a1b0ac09acf678b127602191f20477cdc} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
void \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+rapply (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$}]{b}{, }\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$}]{x}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Applies the diagonal matrix from the right side to a matrix b, which means scales the columns of b with the according diagonal entries. 


\begin{DoxyParams}{Parameters}
{\em b} & the input vector(s) on which the diagonal matrix is applied \\
\hline
{\em x} & the output vector(s) where the result is stored \\
\hline
\end{DoxyParams}
\Hypertarget{classgko_1_1matrix_1_1Diagonal_ae4bd12983de99205e870adf707d5f4d8}\index{gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}!transpose@{transpose}}
\index{transpose@{transpose}!gko::matrix::Diagonal$<$ ValueType $>$@{gko::matrix::Diagonal$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{transpose()}{transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Diagonal_ae4bd12983de99205e870adf707d5f4d8} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Diagonal}{gko::\+matrix::\+\+Diagonal}}$<$ Value\+Type $>$::\+transpose (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. 

\begin{DoxyReturn}{Returns}
a pointer to the new transposed object 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Transposable_adf04fdf2ed79b117edbef42520bfe8fa}{gko::\+\+Transposable}}.



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