SHOGUN  v3.0.0
 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 
16 namespace shogun
17 {
18 
24 template<class T, class ST=T> class CIterativeLinearSolver : public CLinearSolver<T, ST>
25 {
26 
27 public:
30 
32  CIterativeLinearSolver(bool store_residuals);
33 
35  virtual ~CIterativeLinearSolver();
36 
45 
47  void set_iteration_limit(index_t iteration_limit)
48  {
49  m_max_iteration_limit=iteration_limit;
51  {
54  }
55  }
56 
59  {
60  return m_max_iteration_limit;
61  }
62 
64  void set_relative_tolerence(float64_t relative_tolerence)
65  {
66  m_relative_tolerence=relative_tolerence;
67  }
68 
71  {
72  return m_relative_tolerence;
73  }
74 
76  void set_absolute_tolerence(float64_t absolute_tolerence)
77  {
78  m_absolute_tolerence=absolute_tolerence;
79  }
80 
83  {
84  return m_absolute_tolerence;
85  }
86 
89  {
90  return m_residuals;
91  }
92 
94  virtual const char* get_name() const
95  {
96  return "IterativeLinearSolver";
97  }
98 
99 protected:
100 
103 
106 
109 
112 
115 private:
117  void init();
118 
119 };
120 
121 }
122 
123 #endif // ITERATIVE_LINEAR_SOLVER_H_

SHOGUN Machine Learning Toolbox - Documentation