SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LanczosEigenSolver.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 3 of the License, or
5  * (at your option) any later version.
6  *
7  * Written (W) 2013 Soumyajit De
8  */
9 
10 #ifndef LANCZOS_EIGEN_SOLVER_H_
11 #define LANCZOS_EIGEN_SOLVER_H_
12 
13 #include <shogun/lib/config.h>
14 
15 #ifdef HAVE_LAPACK
16 #ifdef HAVE_EIGEN3
18 
19 namespace shogun
20 {
21 template<class T> class CLinearOperator;
22 
27 {
28 public:
31 
39 
41  virtual ~CLanczosEigenSolver();
42 
46  virtual void compute();
47 
49  void set_max_iteration_limit(int64_t max_iteration_limit)
50  {
51  m_max_iteration_limit=max_iteration_limit;
52  }
53 
55  const int64_t get_max_iteration_limit() const
56  {
57  return m_max_iteration_limit;
58  }
59 
61  void set_relative_tolerence(float64_t relative_tolerence)
62  {
63  m_relative_tolerence=relative_tolerence;
64  }
65 
68  {
69  return m_relative_tolerence;
70  }
71 
73  void set_absolute_tolerence(float64_t absolute_tolerence)
74  {
75  m_absolute_tolerence=absolute_tolerence;
76  }
77 
80  {
81  return m_absolute_tolerence;
82  }
83 
85  virtual const char* get_name() const
86  {
87  return "LanczosEigenSolver";
88  }
89 
90 private:
92  int64_t m_max_iteration_limit;
93 
95  float64_t m_relative_tolerence;
96 
98  float64_t m_absolute_tolerence;
99 
101  void init();
102 
103 };
104 
105 }
106 
107 #endif // HAVE_EIGEN3
108 #endif // HAVE_LAPACK
109 #endif // LANCZOS_EIGEN_SOLVER_H_
const float64_t get_relative_tolerence() const
const float64_t get_absolute_tolerence() const
Class that computes eigenvalues of a real valued, self-adjoint linear operator using Lanczos algorith...
virtual const char * get_name() const
void set_absolute_tolerence(float64_t absolute_tolerence)
double float64_t
Definition: common.h:50
void set_max_iteration_limit(int64_t max_iteration_limit)
Abstract base class that provides an abstract compute method for computing eigenvalues of a real valu...
Definition: EigenSolver.h:24
all of classes and functions are contained in the shogun namespace
Definition: class_list.h:18
Abstract template base class that represents a linear operator, e.g. a matrix.
void set_relative_tolerence(float64_t relative_tolerence)
const int64_t get_max_iteration_limit() const

SHOGUN Machine Learning Toolbox - Documentation