20 using namespace Eigen;
25 CConjugateOrthogonalCGSolver::CConjugateOrthogonalCGSolver()
45 SG_DEBUG(
"CConjugateOrthogonalCGSolver::solve(): Entering..\n");
48 REQUIRE(A,
"Operator is NULL!\n");
54 result.set_const(0.0);
87 SG_DEBUG(
"CG iteration %d, residual norm %f\n",
103 if (p_T_times_Ap==0.0)
134 SG_INFO(
"Iteration took %ld times, residual norm=%.20lf, time elapsed=%lf\n",
137 SG_DEBUG(
"CConjugateOrthogonalCGSolver::solve(): Leaving..\n");
Class Time that implements a stopwatch based on either cpu time or wall clock time.
std::complex< float64_t > complex128_t
void begin(const VectorXt &residual)
SGVector< float64_t > m_residuals
virtual const char * get_name() const
const bool end(const VectorXt &residual)
float64_t m_absolute_tolerence
virtual ~CConjugateOrthogonalCGSolver()
float64_t cur_time_diff(bool verbose=false)
template class that is used as an iterator for an iterative linear solver. In the iteration of solvin...
abstract template base for all iterative linear solvers such as conjugate gradient (CG) solvers...
const index_t get_dimension() const
CConjugateOrthogonalCGSolver()
float64_t start(bool verbose=false)
virtual SGVector< complex128_t > solve(CLinearOperator< complex128_t > *A, SGVector< float64_t > b)
virtual SGVector< T > apply(SGVector< T > b) const =0
void set_const(T const_elem)
all of classes and functions are contained in the shogun namespace
index_t m_max_iteration_limit
const bool succeeded(const VectorXt &residual)
const IterInfo get_iter_info() const
float64_t m_relative_tolerence