\doxysection{coo.\+hpp}
\hypertarget{coo_8hpp_source}{}\label{coo_8hpp_source}\index{ginkgo/core/matrix/coo.hpp@{ginkgo/core/matrix/coo.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{//\ SPDX-\/FileCopyrightText:\ 2017\ -\/\ 2025\ The\ Ginkgo\ authors}}
\DoxyCodeLine{00002\ \textcolor{comment}{//}}
\DoxyCodeLine{00003\ \textcolor{comment}{//\ SPDX-\/License-\/Identifier:\ BSD-\/3-\/Clause}}
\DoxyCodeLine{00004\ }
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#ifndef\ GKO\_PUBLIC\_CORE\_MATRIX\_COO\_HPP\_}}
\DoxyCodeLine{00006\ \textcolor{preprocessor}{\#define\ GKO\_PUBLIC\_CORE\_MATRIX\_COO\_HPP\_}}
\DoxyCodeLine{00007\ }
\DoxyCodeLine{00008\ }
\DoxyCodeLine{00009\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/array.hpp>}}
\DoxyCodeLine{00010\ \textcolor{preprocessor}{\#include\ <ginkgo/core/base/lin\_op.hpp>}}
\DoxyCodeLine{00011\ }
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00013\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko}{gko}}\ \{}
\DoxyCodeLine{00019\ \textcolor{keyword}{namespace\ }\doxymbox{\hyperlink{namespacegko_1_1matrix}{matrix}}\ \{}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00023\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}};}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType>}
\DoxyCodeLine{00026\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}};}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00029\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1CooBuilder}{CooBuilder}};}
\DoxyCodeLine{00030\ }
\DoxyCodeLine{00031\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType,\ \textcolor{keyword}{typename}\ IndexType>}
\DoxyCodeLine{00032\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}};}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00049\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ ValueType\ =\ default\_precision,\ \textcolor{keyword}{typename}\ IndexType\ =\ \textcolor{keywordtype}{int}32>}
\DoxyCodeLine{00050\ \textcolor{keyword}{class\ }Coo\ :\ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Coo<ValueType,\ IndexType>>,}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Coo<next\_precision<ValueType>,\ IndexType>>,}
\DoxyCodeLine{00052\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Coo<next\_precision<ValueType,\ 2>,\ IndexType>>,}
\DoxyCodeLine{00054\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00055\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00056\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Coo<next\_precision<ValueType,\ 3>,\ IndexType>>,}
\DoxyCodeLine{00057\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00058\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Csr<ValueType,\ IndexType>>,}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ ConvertibleTo<Dense<ValueType>>,}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1DiagonalExtractable}{DiagonalExtractable}}<ValueType>,}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ IndexType>,}
\DoxyCodeLine{00062\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1WritableToMatrixData}{WritableToMatrixData}}<ValueType,\ IndexType>,}
\DoxyCodeLine{00063\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1Transposable}{Transposable}},}
\DoxyCodeLine{00064\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{public}\ \doxymbox{\hyperlink{classgko_1_1EnableAbsoluteComputation}{EnableAbsoluteComputation}}<}
\DoxyCodeLine{00065\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ remove\_complex<Coo<ValueType,\ IndexType>>>\ \{}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1EnablePolymorphicObject}{EnablePolymorphicObject}}<Coo,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}>;}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr}}<ValueType,\ IndexType>;}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense}}<ValueType>;}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1CooBuilder}{CooBuilder}}<ValueType,\ IndexType>;}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Coo<\doxymbox{\hyperlink{namespacegko_a4ad20e5381a84928753efde0b2bc7f85}{to\_complex}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }\doxymbox{\hyperlink{classgko_1_1matrix_1_1Hybrid}{Hybrid}}<ValueType,\ IndexType>;}
\DoxyCodeLine{00072\ \ \ \ \ GKO\_ASSERT\_SUPPORTED\_VALUE\_AND\_INDEX\_TYPE;}
\DoxyCodeLine{00073\ }
\DoxyCodeLine{00074\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00075\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Coo>::convert\_to;}
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1EnableLinOp}{EnableLinOp}}<Coo>::move\_to;}
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Coo<next\_precision<ValueType>,\ IndexType>>::convert\_to;}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Coo<next\_precision<ValueType>,\ IndexType>>::move\_to;}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::convert\_to;}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}>::move\_to;}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::convert\_to;}
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}>::move\_to;}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keyword}{using\ }\doxymbox{\hyperlink{classgko_1_1ReadableFromMatrixData}{ReadableFromMatrixData}}<ValueType,\ IndexType>::read;}
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keyword}{using\ }value\_type\ =\ ValueType;}
\DoxyCodeLine{00086\ \ \ \ \ \textcolor{keyword}{using\ }index\_type\ =\ IndexType;}
\DoxyCodeLine{00087\ \ \ \ \ \textcolor{keyword}{using\ }transposed\_type\ =\ Coo<ValueType,\ IndexType>;}
\DoxyCodeLine{00088\ \ \ \ \ \textcolor{keyword}{using\ }mat\_data\ =\ \doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{keyword}{using\ }device\_mat\_data\ =\ \doxymbox{\hyperlink{classgko_1_1device__matrix__data}{device\_matrix\_data<ValueType,\ IndexType>}};}
\DoxyCodeLine{00090\ \ \ \ \ \textcolor{keyword}{using\ }absolute\_type\ =\ \doxymbox{\hyperlink{namespacegko_a107302a750bfa82a2107c77293f791c9}{remove\_complex<Coo>}};}
\DoxyCodeLine{00091\ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Coo<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType>,\ IndexType>;}
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00096\ }
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ ||\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00100\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Coo<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 2>,\ IndexType>;}
\DoxyCodeLine{00101\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ Coo<next\_precision<ValueType,\ 2>,\ IndexType>>::convert\_to;}
\DoxyCodeLine{00103\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Coo<next\_precision<ValueType,\ 2>,\ IndexType>>::move\_to;}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00106\ \ \ \ \ \ \ \ \ Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00107\ }
\DoxyCodeLine{00108\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 2>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00109\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00110\ }
\DoxyCodeLine{00111\ \textcolor{preprocessor}{\#if\ GINKGO\_ENABLE\_HALF\ \&\&\ GINKGO\_ENABLE\_BFLOAT16}}
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keyword}{friend}\ \textcolor{keyword}{class\ }Coo<\doxymbox{\hyperlink{namespacegko_ada2119004771922e8f7fcb6910a0363c}{previous\_precision}}<ValueType,\ 3>,\ IndexType>;}
\DoxyCodeLine{00113\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ Coo<next\_precision<ValueType,\ 3>,\ IndexType>>::convert\_to;}
\DoxyCodeLine{00115\ \ \ \ \ \textcolor{keyword}{using\ }ConvertibleTo<Coo<next\_precision<ValueType,\ 3>,\ IndexType>>::move\_to;}
\DoxyCodeLine{00116\ }
\DoxyCodeLine{00117\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00119\ }
\DoxyCodeLine{00120\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(Coo<\doxymbox{\hyperlink{namespacegko_aee37f85b217e5e26fe64207d41fa4bac}{next\_precision<ValueType,\ 3>}},\ IndexType>*\ result)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00121\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00122\ }
\DoxyCodeLine{00123\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ other)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00124\ }
\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Csr}{Csr<ValueType,\ IndexType>}}*\ other)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00126\ }
\DoxyCodeLine{00127\ \ \ \ \ \textcolor{keywordtype}{void}\ convert\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ other)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00128\ }
\DoxyCodeLine{00129\ \ \ \ \ \textcolor{keywordtype}{void}\ move\_to(\doxymbox{\hyperlink{classgko_1_1matrix_1_1Dense}{Dense<ValueType>}}*\ other)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00130\ }
\DoxyCodeLine{00131\ \ \ \ \ \textcolor{keywordtype}{void}\ read(\textcolor{keyword}{const}\ mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00132\ }
\DoxyCodeLine{00133\ \ \ \ \ \textcolor{keywordtype}{void}\ read(\textcolor{keyword}{const}\ device\_mat\_data\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00134\ }
\DoxyCodeLine{00135\ \ \ \ \ \textcolor{keywordtype}{void}\ read(device\_mat\_data\&\&\ data)\ \textcolor{keyword}{override};}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00137\ \ \ \ \ \textcolor{keywordtype}{void}\ write(mat\_data\&\ data)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00138\ }
\DoxyCodeLine{00139\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a2430e61f85b0d5b71a15281f2480d9ce}{transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00140\ }
\DoxyCodeLine{00141\ \ \ \ \ std::unique\_ptr<LinOp>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a77810f90e29b3745f352a4c42c44bcfc}{conj\_transpose}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00143\ \ \ \ \ std::unique\_ptr<Diagonal<ValueType>>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af12b1d22ad6851193c0f17e52d650180}{extract\_diagonal}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00144\ }
\DoxyCodeLine{00145\ \ \ \ \ std::unique\_ptr<absolute\_type>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ac40e048a11f6eaa698e01fa59dbc82e8}{compute\_absolute}}()\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00147\ \ \ \ \ \textcolor{keywordtype}{void}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_aa3be345b0334650e50857c21837e0e07}{compute\_absolute\_inplace}}()\ \textcolor{keyword}{override};}
\DoxyCodeLine{00148\ }
\DoxyCodeLine{00154\ \ \ \ \ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af6903756353277547ac24da81b9b9eba}{get\_values}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ values\_.get\_data();\ \}}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00163\ \ \ \ \ \textcolor{keyword}{const}\ value\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_aadb3e83f3f76e9b3e7a5532eced05c86}{get\_const\_values}}()\ const\ noexcept}
\DoxyCodeLine{00164\ \ \ \ \ \{}
\DoxyCodeLine{00165\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_const\_data();}
\DoxyCodeLine{00166\ \ \ \ \ \}}
\DoxyCodeLine{00167\ }
\DoxyCodeLine{00173\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a1da460bd20cc25ce1ae512b6a45243d1}{get\_col\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_data();\ \}}
\DoxyCodeLine{00174\ }
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a2fc6fb6cc3b8dcaa58034f12ff1b6929}{get\_const\_col\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00183\ \ \ \ \ \{}
\DoxyCodeLine{00184\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ col\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00185\ \ \ \ \ \}}
\DoxyCodeLine{00186\ }
\DoxyCodeLine{00192\ \ \ \ \ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af15ca89ba01c50f7d496b6b6ff866700}{get\_row\_idxs}}()\ noexcept\ \{\ \textcolor{keywordflow}{return}\ row\_idxs\_.get\_data();\ \}}
\DoxyCodeLine{00193\ }
\DoxyCodeLine{00201\ \ \ \ \ \textcolor{keyword}{const}\ index\_type*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ac283078aaa7e8bd72c8dde837d142c44}{get\_const\_row\_idxs}}()\ const\ noexcept}
\DoxyCodeLine{00202\ \ \ \ \ \{}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ row\_idxs\_.get\_const\_data();}
\DoxyCodeLine{00204\ \ \ \ \ \}}
\DoxyCodeLine{00205\ }
\DoxyCodeLine{00211\ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_aece531e069f8490fd8d2b3ab58f72d09}{get\_num\_stored\_elements}}()\ const\ noexcept}
\DoxyCodeLine{00212\ \ \ \ \ \{}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ values\_.get\_size();}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00226\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a7a5b0223520dabfb95dc4efcc602292b}{apply2}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x);}
\DoxyCodeLine{00227\ }
\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ac3829de9d2b933db4fee6e2f55d99fda}{apply2}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00232\ }
\DoxyCodeLine{00242\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a9819e6c9ca0808040b6d24aaa84ac272}{apply2}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ alpha,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,}
\DoxyCodeLine{00243\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x);}
\DoxyCodeLine{00244\ }
\DoxyCodeLine{00248\ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a6b4ee181f90be626ae48ac092823d81b}{apply2}}(\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ alpha,\ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<const\ LinOp>}}\ b,}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\_param<LinOp>}}\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00250\ }
\DoxyCodeLine{00260\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Coo>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ae0b4003c65c6ddaf6eb5119bfe22572e}{create}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00261\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},}
\DoxyCodeLine{00262\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ \{\});}
\DoxyCodeLine{00263\ }
\DoxyCodeLine{00284\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<Coo>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_af4c0f3034a7fb703cc4593a2cdb2a0fe}{create}}(std::shared\_ptr<const\ Executor>\ exec,}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values,}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs,}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_idxs);}
\DoxyCodeLine{00289\ }
\DoxyCodeLine{00294\ \ \ \ \ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ InputValueType,\ \textcolor{keyword}{typename}\ InputColumnIndexType,}
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{typename}\ InputRowIndexType>}
\DoxyCodeLine{00296\ \ \ \ \ GKO\_DEPRECATED(}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}explicitly\ construct\ the\ gko::array\ argument\ instead\ of\ passing\ "{}}}
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}initializer\ lists"{}})}
\DoxyCodeLine{00299\ \ \ \ \ static\ \doxymbox{\hyperlink{namespacestd}{std}}::unique\_ptr<Coo>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ae0b4003c65c6ddaf6eb5119bfe22572e}{create}}(}
\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::shared\_ptr<const\ \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}}>\ exec,\ const\ \doxymbox{\hyperlink{structgko_1_1dim}{dim}}<2>\&\ size,}
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputValueType>\ values,}
\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputColumnIndexType>\ col\_idxs,}
\DoxyCodeLine{00303\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacestd}{std}}::initializer\_list<InputRowIndexType>\ row\_idxs)}
\DoxyCodeLine{00304\ \ \ \ \ \{}
\DoxyCodeLine{00305\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_ae0b4003c65c6ddaf6eb5119bfe22572e}{create}}(exec,\ size,\ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\{exec,\ std::move(values)\},}
\DoxyCodeLine{00306\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\{exec,\ std::move(col\_idxs)\},}
\DoxyCodeLine{00307\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\{exec,\ std::move(row\_idxs)\});}
\DoxyCodeLine{00308\ \ \ \ \ \}}
\DoxyCodeLine{00309\ }
\DoxyCodeLine{00323\ \ \ \ \ \textcolor{keyword}{static}\ std::unique\_ptr<const\ Coo>\ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Coo_a39145d7cd1d44050aa7076b96280b04d}{create\_const}}(}
\DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00325\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<ValueType>\&\&\ values,}
\DoxyCodeLine{00326\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<IndexType>\&\&\ col\_idxs,}
\DoxyCodeLine{00327\ \ \ \ \ \ \ \ \ gko::detail::const\_array\_view<IndexType>\&\&\ row\_idxs);}
\DoxyCodeLine{00328\ }
\DoxyCodeLine{00329\ \textcolor{keyword}{protected}:}
\DoxyCodeLine{00330\ \ \ \ \ Coo(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size\ =\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\{\},}
\DoxyCodeLine{00331\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ num\_nonzeros\ =\ \{\});}
\DoxyCodeLine{00332\ }
\DoxyCodeLine{00333\ \ \ \ \ Coo(std::shared\_ptr<const\ Executor>\ exec,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\&\ size,}
\DoxyCodeLine{00334\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values,\ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs,}
\DoxyCodeLine{00335\ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_idxs);}
\DoxyCodeLine{00336\ }
\DoxyCodeLine{00344\ \ \ \ \ \textcolor{keywordtype}{void}\ resize(\doxymbox{\hyperlink{structgko_1_1dim}{dim<2>}}\ new\_size,\ \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\_type}}\ nnz);}
\DoxyCodeLine{00345\ }
\DoxyCodeLine{00346\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00347\ }
\DoxyCodeLine{00348\ \ \ \ \ \textcolor{keywordtype}{void}\ apply\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ alpha,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ beta,}
\DoxyCodeLine{00349\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const\ override};}
\DoxyCodeLine{00350\ }
\DoxyCodeLine{00351\ \ \ \ \ \textcolor{keywordtype}{void}\ apply2\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00352\ }
\DoxyCodeLine{00353\ \ \ \ \ \textcolor{keywordtype}{void}\ apply2\_impl(\textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ alpha,\ \textcolor{keyword}{const}\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ b,\ \doxymbox{\hyperlink{classgko_1_1LinOp}{LinOp}}*\ x)\ \textcolor{keyword}{const};}
\DoxyCodeLine{00354\ }
\DoxyCodeLine{00355\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00356\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<value\_type>}}\ values\_;}
\DoxyCodeLine{00357\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ col\_idxs\_;}
\DoxyCodeLine{00358\ \ \ \ \ \doxymbox{\hyperlink{classgko_1_1array}{array<index\_type>}}\ row\_idxs\_;}
\DoxyCodeLine{00359\ \};}
\DoxyCodeLine{00360\ }
\DoxyCodeLine{00361\ }
\DoxyCodeLine{00362\ \}\ \ \textcolor{comment}{//\ namespace\ matrix}}
\DoxyCodeLine{00363\ \}\ \ \textcolor{comment}{//\ namespace\ gko}}
\DoxyCodeLine{00364\ }
\DoxyCodeLine{00365\ }
\DoxyCodeLine{00366\ \textcolor{preprocessor}{\#endif\ \ }\textcolor{comment}{//\ GKO\_PUBLIC\_CORE\_MATRIX\_COO\_HPP\_}}

\end{DoxyCode}
