SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IterativeLinearSolver.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 ITERATIVE_LINEAR_SOLVER_H_
11 #define ITERATIVE_LINEAR_SOLVER_H_
12 
13 #include <shogun/lib/config.h>
15 #include <shogun/lib/SGVector.h>
16 
17 namespace shogun
18 {
19 
25 template<class T, class ST=T> class CIterativeLinearSolver : public CLinearSolver<T, ST>
26 {
27 
28 public:
31 
33  CIterativeLinearSolver(bool store_residuals);
34 
36  virtual ~CIterativeLinearSolver();
37 
46 
48  void set_iteration_limit(index_t iteration_limit)
49  {
50  m_max_iteration_limit=iteration_limit;
52  {
55  }
56  }
57 
60  {
61  return m_max_iteration_limit;
62  }
63 
65  void set_relative_tolerence(float64_t relative_tolerence)
66  {
67  m_relative_tolerence=relative_tolerence;
68  }
69 
72  {
73  return m_relative_tolerence;
74  }
75 
77  void set_absolute_tolerence(float64_t absolute_tolerence)
78  {
79  m_absolute_tolerence=absolute_tolerence;
80  }
81 
84  {
85  return m_absolute_tolerence;
86  }
87 
90  {
91  return m_residuals;
92  }
93 
95  virtual const char* get_name() const
96  {
97  return "IterativeLinearSolver";
98  }
99 
100 protected:
101 
104 
107 
110 
113 
116 private:
118  void init();
119 
120 };
121 
122 }
123 
124 #endif // ITERATIVE_LINEAR_SOLVER_H_

SHOGUN Machine Learning Toolbox - Documentation