24 using namespace Eigen;
 
   29 CLanczosEigenSolver::CLanczosEigenSolver()
 
   42 void CLanczosEigenSolver::init()
 
   44     m_max_iteration_limit=1000;
 
   45     m_relative_tolerence=1E-6;
 
   46     m_absolute_tolerence=1E-6;
 
   48     SG_ADD(&m_max_iteration_limit, 
"max_iteration_limit",
 
   51     SG_ADD(&m_relative_tolerence, 
"relative_tolerence",
 
   54     SG_ADD(&m_absolute_tolerence, 
"absolute_tolerence",
 
   68         SG_DEBUG(
"Minimum/maximum eigenvalues are already computed, exiting\n");
 
   80     v_i=VectorXd::Random(v_.vlen);
 
   85         m_relative_tolerence, m_absolute_tolerence);
 
   88     std::vector<float64_t> alpha;
 
   91     std::vector<float64_t> beta;
 
   97     for (it.
begin(v_i); !it.
end(v_i); ++it)
 
   99         SG_DEBUG(
"CG iteration %d, residual norm %f\n",
 
  113         w_i-=alpha_i*v_i+beta_i*v;
 
  119         alpha.push_back(alpha_i);
 
  120         beta.push_back(beta_i);
 
  130     std::vector<float64_t> alpha_orig=alpha;
 
  131     std::vector<float64_t> beta_orig=beta;
 
  136         wrap_dstemr(
'N', 
'I', alpha.size(), &alpha[0], &beta[0],
 
  137             0.0, 0.0, 1, 1, &M, w.vector, NULL, 1, 1, NULL, 0.0, &info);
 
  141             SG_INFO(
"Iteration took %ld times, residual norm=%.20lf\n",
 
  148             SG_WARNING(
"Some error occured while computing eigenvalues!\n");
 
  154         wrap_dstemr(
'N', 
'I', alpha_orig.size(), &alpha_orig[0], &beta_orig[0],
 
  155             0.0, 0.0, w.vlen, w.vlen, &M, w.vector, NULL, 1, 1, NULL, 0.0, &info);
 
  159             SG_INFO(
"Iteration took %ld times, residual norm=%.20lf\n",
 
  165             SG_WARNING(
"Some error occured while computing eigenvalues!\n");
 
  172 #endif // HAVE_EIGEN3 
  173 #endif // HAVE_LAPACK 
void begin(const VectorXt &residual)
 
const index_t get_dimension() const 
 
float64_t m_min_eigenvalue
 
float64_t m_max_eigenvalue
 
const bool end(const VectorXt &residual)
 
void wrap_dstemr(char jobz, char range, int n, double *diag, double *subdiag, double vl, double vu, int il, int iu, int *m, double *w, double *z__, int ldz, int nzc, int *isuppz, int tryrac, int *info)
 
template class that is used as an iterator for an iterative linear solver. In the iteration of solvin...
 
virtual ~CLanczosEigenSolver()
 
const IterInfo get_iter_info() const 
 
virtual SGVector< T > apply(SGVector< T > b) const =0
 
Abstract base class that provides an abstract compute method for computing eigenvalues of a real valu...
 
all of classes and functions are contained in the shogun namespace 
 
CLinearOperator< float64_t > * m_linear_operator