\doxysection{gko::\+matrix::\+Permutation\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1matrix_1_1Permutation}{}\label{classgko_1_1matrix_1_1Permutation}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}


\doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} is a matrix format that represents a permutation matrix, i.\+e.  




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



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


Collaboration diagram for gko::\+matrix::\+Permutation\texorpdfstring{$<$}{<} Index\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Permutation__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a6cedbbe66d8854f5975219d180f18e37}\label{classgko_1_1matrix_1_1Permutation_a6cedbbe66d8854f5975219d180f18e37} 
using {\bfseries value\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a89637c833af7ae805802226d97cebebf}{default\+\_\+precision}}
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a1669102564251eb6df5465d1d1ba4f99}\label{classgko_1_1matrix_1_1Permutation_a1669102564251eb6df5465d1d1ba4f99} 
using {\bfseries index\+\_\+type} = Index\+Type
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Permutation$<$ int32 $>$ $>$}}}
\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}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a77d5bd3bd5182c9430ed6c56be14e51b}{get\+\_\+permutation}} () noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of permutation. \end{DoxyCompactList}\item 
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_acd703a5b8f1d938f7ecbc9f793f505d7}{get\+\_\+const\+\_\+permutation}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns a pointer to the array of permutation.    \end{DoxyCompactList}\item 
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a576d006fe37902ff0b47050ecb87b416}{get\+\_\+permutation\+\_\+size}} () const noexcept
\begin{DoxyCompactList}\small\item\em Returns the number of elements explicitly stored in the permutation array. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a29fc6728ed79dda46178790bc3b32503}\label{classgko_1_1matrix_1_1Permutation_a29fc6728ed79dda46178790bc3b32503} 
mask\+\_\+type {\bfseries get\+\_\+permute\+\_\+mask} () const
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_ad1fbbe30f0c282aa02558163a6820434}\label{classgko_1_1matrix_1_1Permutation_ad1fbbe30f0c282aa02558163a6820434} 
void {\bfseries set\+\_\+permute\+\_\+mask} (mask\+\_\+type permute\+\_\+mask)
\item 
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_acf8a6a4fb35dbd542f13c588f1d477b7}{compute\+\_\+inverse}} () const
\begin{DoxyCompactList}\small\item\em Returns the inverse permutation. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a58a8819131b43a47893b57e534bc14ef}{compose}} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const Permutation $>$ other) const
\begin{DoxyCompactList}\small\item\em Composes this permutation with another permutation. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_ac0c10521fd66dcd1b249cde334248162}\label{classgko_1_1matrix_1_1Permutation_ac0c10521fd66dcd1b249cde334248162} 
void {\bfseries write} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{gko::\+matrix\+\_\+data}}$<$ value\+\_\+type, index\+\_\+type $>$ \&data) const override
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Permutation$<$ int32 $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
const Permutation$<$ \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \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$<$ Permutation$<$ int32 $>$ $>$}}}
\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}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a1b47c26f7e7ad0be77a6a27a9689f4b5}{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 uninitialized \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} arrays on the specified executor. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a23a59a5ce4d9fc96935f7026e1ab8ebe}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ Index\+Type $>$ permutation\+\_\+indices)
\begin{DoxyCompactList}\small\item\em Creates a \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} matrix from an already allocated (and initialized) row and column permutation arrays. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a7676b48a85a1eb83e15e4df76402be68}\label{classgko_1_1matrix_1_1Permutation_a7676b48a85a1eb83e15e4df76402be68} 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size)
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_aacfa9ccda09caf442dfcb9446ed49ad0}\label{classgko_1_1matrix_1_1Permutation_aacfa9ccda09caf442dfcb9446ed49ad0} 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size, const mask\+\_\+type \&enabled\+\_\+permute)
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a89faa3ccdaeb9799dbc6824963a36815}\label{classgko_1_1matrix_1_1Permutation_a89faa3ccdaeb9799dbc6824963a36815} 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ Index\+Type $>$ permutation\+\_\+indices)
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a9639c8cb8ba99340cd820ea2dae2db4b}\label{classgko_1_1matrix_1_1Permutation_a9639c8cb8ba99340cd820ea2dae2db4b} 
static std::\+unique\+\_\+ptr$<$ Permutation $>$ {\bfseries create} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, const \doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 2 $>$ \&size, \doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ index\+\_\+type $>$ permutation\+\_\+indices, const mask\+\_\+type \&enabled\+\_\+permute)
\item 
static std::\+unique\+\_\+ptr$<$ const Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a9121ea1f0db2ad8e6fee06269d9f4e4c}{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$<$ Index\+Type $>$ \&\&perm\+\_\+idxs, mask\+\_\+type enabled\+\_\+permute=row\+\_\+permute)
\begin{DoxyCompactList}\small\item\em Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} matrix from a constant array. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ const Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation_a2ce3d03723199ec90ac0f394b7e9df2c}{create\+\_\+const}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Index\+Type $>$ \&\&perm\+\_\+idxs)
\begin{DoxyCompactList}\small\item\em Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} matrix from a constant array. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Permutation_a0fa83943059f819c219107718fa634ca}\label{classgko_1_1matrix_1_1Permutation_a0fa83943059f819c219107718fa634ca} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Permutation, Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Index\+Type = int32$>$\newline
class gko::\+matrix::\+\+Permutation$<$ Index\+Type $>$}
\doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} is a matrix format that represents a permutation matrix, i.\+e. 

a matrix where each row and column has exactly one entry. The matrix can only be applied to \doxylink{classgko_1_1matrix_1_1Dense}{Dense} inputs, where it represents a row permutation:\+ $A\textnormal{\textquotesingle} = PA$ means $A\textnormal{\textquotesingle}(i, j) = A(p[i], j)$.


\begin{DoxyTemplParams}{Template Parameters}
{\em Index\+Type} & precision of permutation array indices. \\
\hline
\end{DoxyTemplParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Permutation_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Permutation_a58a8819131b43a47893b57e534bc14ef}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!compose@{compose}}
\index{compose@{compose}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{compose()}{compose()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a58a8819131b43a47893b57e534bc14ef} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+compose (\begin{DoxyParamCaption}\item[{\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const Permutation$<$ Index\+Type $>$ $>$}]{other}{}\end{DoxyParamCaption}) const}



Composes this permutation with another permutation. 

The resulting permutation fulfills {\ttfamily result\+[i]\+ = this\+[other\+[i]\+]\+} or {\ttfamily result = other \texorpdfstring{$\ast$}{*} this} from the matrix perspective, which is equivalent to first permuting by {\ttfamily this} and then by {\ttfamily other}:\+ Combining permutations $P_1$ and $P_2$ with {\ttfamily P = P\+\_\+1.\+combine(\+P\+\_\+2)} performs the operation permute(\+A, P) = permute(permute(\+A, P\+\_\+1), P\+\_\+2).


\begin{DoxyParams}{Parameters}
{\em other} & the other permutation \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the combined permutation 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Permutation_acf8a6a4fb35dbd542f13c588f1d477b7}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!compute\_inverse@{compute\_inverse}}
\index{compute\_inverse@{compute\_inverse}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{compute\_inverse()}{compute\_inverse()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_acf8a6a4fb35dbd542f13c588f1d477b7} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+compute\+\_\+inverse (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const}



Returns the inverse permutation. 

\begin{DoxyReturn}{Returns}
a newly created \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} object storing the inverse permutation of this \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation}. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Permutation_a23a59a5ce4d9fc96935f7026e1ab8ebe}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!create@{create}}
\index{create@{create}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a23a59a5ce4d9fc96935f7026e1ab8ebe} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{classgko_1_1array}{array}}$<$ Index\+Type $>$}]{permutation\+\_\+indices}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} matrix from an already allocated (and initialized) row and column permutation arrays. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix \\
\hline
{\em size} & size of the permutation array. \\
\hline
{\em permutation\+\_\+indices} & array of permutation array \\
\hline
{\em enabled\+\_\+permute} & mask for the type of permutation to apply.\\
\hline
\end{DoxyParams}
\begin{DoxyNote}{Note}
If {\ttfamily permutation\+\_\+indices} is not an rvalue, not an array of Index\+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_1Permutation_a1b47c26f7e7ad0be77a6a27a9689f4b5}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!create@{create}}
\index{create@{create}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a1b47c26f7e7ad0be77a6a27a9689f4b5} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+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 uninitialized \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} arrays on the specified executor. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the \doxylink{classgko_1_1LinOp}{Lin\+Op}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Permutation_a2ce3d03723199ec90ac0f394b7e9df2c}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!create\_const@{create\_const}}
\index{create\_const@{create\_const}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const()}{create\_const()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a2ce3d03723199ec90ac0f394b7e9df2c} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ const Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+create\+\_\+const (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{gko::\+detail::\+const\+\_\+array\+\_\+view$<$ Index\+Type $>$ \&\&}]{perm\+\_\+idxs}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} 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 perm\+\_\+idxs} & the permutation index array of the matrix \\
\hline
{\em enabled\+\_\+permute} & the mask describing the type of permutation \\
\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_1Permutation_a9121ea1f0db2ad8e6fee06269d9f4e4c}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!create\_const@{create\_const}}
\index{create\_const@{create\_const}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{create\_const()}{create\_const()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a9121ea1f0db2ad8e6fee06269d9f4e4c} 
template$<$typename Index\+Type = int32$>$ \\
std::\+unique\+\_\+ptr$<$ const Permutation $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+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$<$ Index\+Type $>$ \&\&}]{perm\+\_\+idxs}{, }\item[{mask\+\_\+type}]{enabled\+\_\+permute}{ = {\ttfamily row\+\_\+permute}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates a constant (immutable) \doxylink{classgko_1_1matrix_1_1Permutation}{Permutation} 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 perm\+\_\+idxs} & the permutation index array of the matrix \\
\hline
{\em enabled\+\_\+permute} & the mask describing the type of permutation \\
\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_1Permutation_acd703a5b8f1d938f7ecbc9f793f505d7}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!get\_const\_permutation@{get\_const\_permutation}}
\index{get\_const\_permutation@{get\_const\_permutation}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_const\_permutation()}{get\_const\_permutation()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_acd703a5b8f1d938f7ecbc9f793f505d7} 
template$<$typename Index\+Type = int32$>$ \\
const index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+get\+\_\+const\+\_\+permutation (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of permutation.    

\begin{DoxyReturn}{Returns}
the pointer to the row permutation array.   
\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_1Permutation_a77d5bd3bd5182c9430ed6c56be14e51b}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!get\_permutation@{get\_permutation}}
\index{get\_permutation@{get\_permutation}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_permutation()}{get\_permutation()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a77d5bd3bd5182c9430ed6c56be14e51b} 
template$<$typename Index\+Type = int32$>$ \\
index\+\_\+type \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+get\+\_\+permutation (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [noexcept]}}



Returns a pointer to the array of permutation. 

\begin{DoxyReturn}{Returns}
the pointer to the row permutation array. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Permutation_a576d006fe37902ff0b47050ecb87b416}\index{gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}!get\_permutation\_size@{get\_permutation\_size}}
\index{get\_permutation\_size@{get\_permutation\_size}!gko::matrix::Permutation$<$ IndexType $>$@{gko::matrix::Permutation$<$ IndexType $>$}}
\doxysubsubsection{\texorpdfstring{get\_permutation\_size()}{get\_permutation\_size()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Permutation_a576d006fe37902ff0b47050ecb87b416} 
template$<$typename Index\+Type = int32$>$ \\
\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1matrix_1_1Permutation}{gko::\+matrix::\+\+Permutation}}$<$ Index\+Type $>$::\+get\+\_\+permutation\+\_\+size (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [noexcept]}}



Returns the number of elements explicitly stored in the permutation array. 

\begin{DoxyReturn}{Returns}
the number of elements explicitly stored in the permutation array. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+matrix/\+csr.\+hpp\item 
ginkgo/\+core/\+matrix/\+permutation.\+hpp\end{DoxyCompactItemize}
