\doxysection{gko::\+solver::\+Bicg\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>} Class Template Reference}
\hypertarget{classgko_1_1solver_1_1Bicg}{}\label{classgko_1_1solver_1_1Bicg}\index{gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}}


BICG or the Biconjugate gradient method is a Krylov subspace solver.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+solver/\+bicg.\+hpp$>$}



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


Collaboration diagram for gko::\+solver::\+Bicg\texorpdfstring{$<$}{<} Value\+Type \texorpdfstring{$>$}{>}:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1solver_1_1Bicg__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \doxymbox{\hyperlink{structgko_1_1solver_1_1Bicg_1_1parameters__type}{parameters\+\_\+type}}
\item 
class \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg_1_1Factory}{Factory}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_a90d20dd5842019de8d7fbda11531a515}\label{classgko_1_1solver_1_1Bicg_a90d20dd5842019de8d7fbda11531a515} 
using {\bfseries value\+\_\+type} = Value\+Type
\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_ac22dd96fbe69027ab298181c5fb8e636}\label{classgko_1_1solver_1_1Bicg_ac22dd96fbe69027ab298181c5fb8e636} 
using {\bfseries transposed\+\_\+type} = Bicg$<$Value\+Type$>$
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Bicg$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg_a4ca72815080b15c6e9f962f650bb4828}{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_1solver_1_1Bicg_a05d96cf47842a704a7e921f5611cc8fb}{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 
bool \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg_a0d345566816a98175f332ce315f645e3}{apply\+\_\+uses\+\_\+initial\+\_\+guess}} () const override
\begin{DoxyCompactList}\small\item\em Return true as iterative solvers use the data in x as an initial guess. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_af23d8ccb0e9af3da8e63c07168593014}\label{classgko_1_1solver_1_1Bicg_af23d8ccb0e9af3da8e63c07168593014} 
const \doxymbox{\hyperlink{structgko_1_1solver_1_1Bicg_1_1parameters__type}{parameters\+\_\+type}} \& {\bfseries get\+\_\+parameters} () const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Bicg$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
const Bicg$<$ \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$<$ Bicg$<$ 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_1solver_1_1EnableSolverBase}{gko::\+solver::\+\+Enable\+Solver\+Base$<$ Bicg$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
Enable\+Solver\+Base \& {\bfseries operator=} (const Enable\+Solver\+Base \&other)
\begin{DoxyCompactList}\small\item\em Creates a shallow copy of the provided system matrix, clones it onto this executor if executors don\textquotesingle{}t match. \end{DoxyCompactList}\item 
int {\bfseries get\+\_\+num\+\_\+workspace\+\_\+ops} () const override
\item 
std::\+vector$<$ std::\+string $>$ {\bfseries get\+\_\+workspace\+\_\+op\+\_\+names} () const override
\item 
std::\+vector$<$ int $>$ {\bfseries get\+\_\+workspace\+\_\+scalars} () const override
\begin{DoxyCompactList}\small\item\em Returns the IDs of all scalars (workspace vectors with system dimension-\/independent size, usually 1 x num\+\_\+rhs). \end{DoxyCompactList}\item 
std::\+vector$<$ int $>$ {\bfseries get\+\_\+workspace\+\_\+vectors} () const override
\begin{DoxyCompactList}\small\item\em Returns the IDs of all vectors (workspace vectors with system dimension-\/dependent size, usually system\+\_\+matrix\+\_\+size x num\+\_\+rhs). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1solver_1_1SolverBase}{gko::\+solver::\+\+Solver\+Base$<$ Lin\+Op $>$}}}
\begin{DoxyCompactItemize}
\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1solver_1_1SolverBase_a2270916c6cb8451c275c0bca44c5d09e}{get\+\_\+system\+\_\+matrix}} () const
\begin{DoxyCompactList}\small\item\em Returns the system matrix, with its concrete type, used by the solver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1solver_1_1EnableIterativeBase}{gko::\+solver::\+\+Enable\+Iterative\+Base$<$ Bicg$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
Enable\+Iterative\+Base \& {\bfseries operator=} (const Enable\+Iterative\+Base \&other)
\begin{DoxyCompactList}\small\item\em Creates a shallow copy of the provided stopping criterion, clones it onto this executor if executors don\textquotesingle{}t match. \end{DoxyCompactList}\item 
void \doxymbox{\hyperlink{classgko_1_1solver_1_1EnableIterativeBase_a5e96a31681a2bc03fffb2d76e7a7da12}{set\+\_\+stop\+\_\+criterion\+\_\+factory}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{namespacegko_1_1stop_a61839f234ddbaaf68db337e58e012499}{stop::\+\+Criterion\+Factory}} $>$ new\+\_\+stop\+\_\+factory) override
\begin{DoxyCompactList}\small\item\em Sets the stopping criterion of the solver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1solver_1_1IterativeBase}{gko::\+solver::\+\+Iterative\+Base}}}
\begin{DoxyCompactItemize}
\item 
std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{namespacegko_1_1stop_a61839f234ddbaaf68db337e58e012499}{stop::\+\+Criterion\+Factory}} $>$ \doxymbox{\hyperlink{classgko_1_1solver_1_1IterativeBase_a26beb5ec985d883c22b614a8240d981d}{get\+\_\+stop\+\_\+criterion\+\_\+factory}} () const
\begin{DoxyCompactList}\small\item\em Gets the stopping criterion factory of the solver. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable}{gko::\+solver::\+\+Enable\+Preconditionable$<$ Bicg$<$ default\+\_\+precision $>$ $>$}}}
\begin{DoxyCompactItemize}
\item 
void \doxymbox{\hyperlink{classgko_1_1solver_1_1EnablePreconditionable_ad1f52e213256cd7c50811787dfcf4288}{set\+\_\+preconditioner}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ new\+\_\+precond) override
\begin{DoxyCompactList}\small\item\em Sets the preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable}. \end{DoxyCompactList}\item 
Enable\+Preconditionable \& {\bfseries operator=} (const Enable\+Preconditionable \&other)
\begin{DoxyCompactList}\small\item\em Creates a shallow copy of the provided preconditioner, clones it onto this executor if executors don\textquotesingle{}t match. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1Preconditionable}{gko::\+\+Preconditionable}}}
\begin{DoxyCompactItemize}
\item 
virtual std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1Preconditionable_abde941e32b5fc5007a4afe0f6d3fdfbc}{get\+\_\+preconditioner}} () const
\begin{DoxyCompactList}\small\item\em Returns the preconditioner operator used by the \doxylink{classgko_1_1Preconditionable}{Preconditionable}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_a15fcb4a7096e403f4a86929b9caeb771}\label{classgko_1_1solver_1_1Bicg_a15fcb4a7096e403f4a86929b9caeb771} 
static auto {\bfseries build} () -\/$>$ decltype(\doxymbox{\hyperlink{classgko_1_1EnableDefaultFactory_a1d077101d9e788e6c65f088612d14cc3}{Factory::\+create}}())
\item 
static \doxymbox{\hyperlink{structgko_1_1solver_1_1Bicg_1_1parameters__type}{parameters\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg_a036f00fe804ae20371649d38be13bfc8}{parse}} (const \doxymbox{\hyperlink{classgko_1_1config_1_1pnode}{config::\+pnode}} \&config, const \doxymbox{\hyperlink{classgko_1_1config_1_1registry}{config::\+registry}} \&context, const \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::\+type\+\_\+descriptor}} \&td\+\_\+for\+\_\+child=config::\+make\+\_\+type\+\_\+descriptor$<$ Value\+Type $>$())
\begin{DoxyCompactList}\small\item\em Create the parameters from the property\+\_\+tree. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_aa6955922aa2a86e0ff80aae3c3013788}\label{classgko_1_1solver_1_1Bicg_aa6955922aa2a86e0ff80aae3c3013788} 
class {\bfseries Enable\+Lin\+Op$<$ Bicg $>$}
\item 
\Hypertarget{classgko_1_1solver_1_1Bicg_ab9a7f7fdd79a37b52cc55b75fe7c1da4}\label{classgko_1_1solver_1_1Bicg_ab9a7f7fdd79a37b52cc55b75fe7c1da4} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Bicg, Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\subsubsection*{template$<$typename Value\+Type = default\+\_\+precision$>$\newline
class gko::\+solver::\+\+Bicg$<$ Value\+Type $>$}
BICG or the Biconjugate gradient method is a Krylov subspace solver. 

Being a generic solver, it is capable of solving general matrices, including non-\/s.\+p.\+d matrices. Though, the memory and the computational requirement of the Bi\+CG solver are higher than of its s.\+p.\+d solver counterpart, it has the capability to solve generic systems.

Bi\+CG is based on the bi-\/\+Lanczos tridiagonalization method and in exact arithmetic should terminate in at most N iterations (2N MV\textquotesingle{}s, with A and A\texorpdfstring{$^\wedge$}{\string^}H). It forms the basis of many of the cheaper methods such as Bi\+CGSTAB and CGS.

Reference:\+ R.\+Fletcher, Conjugate gradient methods for indefinite systems, doi:\+ 10.\+1007/\+\+BFb0080116


\begin{DoxyTemplParams}{Template Parameters}
{\em Value\+Type} & precision of matrix elements \\
\hline
\end{DoxyTemplParams}


\label{doc-func-members}
\Hypertarget{classgko_1_1solver_1_1Bicg_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1solver_1_1Bicg_a0d345566816a98175f332ce315f645e3}\index{gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}!apply\_uses\_initial\_guess@{apply\_uses\_initial\_guess}}
\index{apply\_uses\_initial\_guess@{apply\_uses\_initial\_guess}!gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{apply\_uses\_initial\_guess()}{apply\_uses\_initial\_guess()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1Bicg_a0d345566816a98175f332ce315f645e3} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
bool \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg}{gko::\+solver::\+\+Bicg}}$<$ Value\+Type $>$::\+apply\+\_\+uses\+\_\+initial\+\_\+guess (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [override]}}



Return true as iterative solvers use the data in x as an initial guess. 

\begin{DoxyReturn}{Returns}
true as iterative solvers use the data in x as an initial guess. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1solver_1_1Bicg_a05d96cf47842a704a7e921f5611cc8fb}\index{gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}!conj\_transpose@{conj\_transpose}}
\index{conj\_transpose@{conj\_transpose}!gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{conj\_transpose()}{conj\_transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1Bicg_a05d96cf47842a704a7e921f5611cc8fb} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg}{gko::\+solver::\+\+Bicg}}$<$ 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_1solver_1_1Bicg_a036f00fe804ae20371649d38be13bfc8}\index{gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}!parse@{parse}}
\index{parse@{parse}!gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{parse()}{parse()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1Bicg_a036f00fe804ae20371649d38be13bfc8} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
\doxymbox{\hyperlink{structgko_1_1solver_1_1Bicg_1_1parameters__type}{parameters\+\_\+type}} \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg}{gko::\+solver::\+\+Bicg}}$<$ Value\+Type $>$::\+parse (\begin{DoxyParamCaption}\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1pnode}{config::\+pnode}} \&}]{config}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1registry}{config::\+registry}} \&}]{context}{, }\item[{const \doxymbox{\hyperlink{classgko_1_1config_1_1type__descriptor}{config::\+type\+\_\+descriptor}} \&}]{td\+\_\+for\+\_\+child}{ = {\ttfamily config:\+:\+make\+\_\+type\+\_\+descriptor$<$~ValueType~$>$()}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Create the parameters from the property\+\_\+tree. 

Because this is directly tied to the specific type, the value/\+index type settings within config are ignored and type\+\_\+descriptor is only used for children configs.


\begin{DoxyParams}{Parameters}
{\em config} & the property tree for setting \\
\hline
{\em context} & the registry \\
\hline
{\em td\+\_\+for\+\_\+child} & the type descriptor for children configs. The default uses the value type of this class.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
parameters 
\end{DoxyReturn}
\Hypertarget{classgko_1_1solver_1_1Bicg_a4ca72815080b15c6e9f962f650bb4828}\index{gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}!transpose@{transpose}}
\index{transpose@{transpose}!gko::solver::Bicg$<$ ValueType $>$@{gko::solver::Bicg$<$ ValueType $>$}}
\doxysubsubsection{\texorpdfstring{transpose()}{transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1solver_1_1Bicg_a4ca72815080b15c6e9f962f650bb4828} 
template$<$typename Value\+Type = default\+\_\+precision$>$ \\
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1solver_1_1Bicg}{gko::\+solver::\+\+Bicg}}$<$ 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 file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+solver/\+bicg.\+hpp\end{DoxyCompactItemize}
