SHOGUN  v3.0.0
EigenSolver.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or modify
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 EIGEN_SOLVER_H_
11 #define EIGEN_SOLVER_H_
12
13 #include <shogun/lib/config.h>
14 #include <shogun/base/Parameter.h>
15
16
17 namespace shogun
18 {
19
24 class CEigenSolver : public CSGObject
25 {
26 public:
29  : CSGObject()
30  {
31  init();
32  }
33
41  : CSGObject()
42  {
43  init();
44
45  m_linear_operator=linear_operator;
47  }
49  virtual ~CEigenSolver()
50  {
52  }
53
58  virtual void compute() = 0;
59
61  void set_min_eigenvalue(float64_t min_eigenvalue)
62  {
63  m_min_eigenvalue=min_eigenvalue;
64  m_is_computed_min=true;
65  }
66
69  {
70  return m_min_eigenvalue;
71  }
72
74  void set_max_eigenvalue(float64_t max_eigenvalue)
75  {
76  m_max_eigenvalue=max_eigenvalue;
77  m_is_computed_max=true;
78  }
79
82  {
83  return m_max_eigenvalue;
84  }
85
87  virtual const char* get_name() const
88  {
89  return "EigenSolver";
90  }
91 protected:
94
97
100
103
106
107 private:
109  void init()
110  {
111  m_min_eigenvalue=0.0;
112  m_max_eigenvalue=0.0;
113  m_linear_operator=NULL;
114  m_is_computed_min=false;
115  m_is_computed_max=false;
116
118  "Minimum eigenvalue of a real valued self-adjoint linear operator",
120
122  "Maximum eigenvalue of a real valued self-adjoint linear operator",
124
128