SHOGUN  3.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IterativeShiftedLinearFamilySolver.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_SHIFTED_LINEAR_FAMILY_SOLVER_H_
11 #define ITERATIVE_SHIFTED_LINEAR_FAMILY_SOLVER_H_
12 
13 #include <shogun/lib/config.h>
15 
16 namespace shogun
17 {
18 template <class T> class SGVector;
19 template <class RetType, class OperandType> class CLinearOperator;
20 
34 template<class T, class ST=T> class CIterativeShiftedLinearFamilySolver : public CIterativeLinearSolver<T, T>
35 {
36 
37 public:
40 
42  CIterativeShiftedLinearFamilySolver(bool store_residuals);
43 
46 
56 
69  SGVector<T> b, SGVector<ST> shifts, SGVector<ST> weights) = 0;
70 
72  virtual const char* get_name() const
73  {
74  return "IterativeShiftedLinearFamilySolver";
75  }
76 
77 protected:
92  void compute_zeta_sh_new(const SGVector<ST>& zeta_sh_old,
93  const SGVector<ST>& zeta_sh_cur, const SGVector<ST>& shifts,
94  const T& beta_old, const T& beta_cur, const T& alpha, SGVector<ST>& zeta_sh_new);
95 
105  void compute_beta_sh(const SGVector<ST>& zeta_sh_new,
106  const SGVector<ST>& zeta_sh_cur, const T& beta_cur, SGVector<ST>& beta_sh);
107 
119  void compute_alpha_sh(const SGVector<ST>& zeta_sh_cur,
120  const SGVector<ST>& zeta_sh_old, const SGVector<ST>& beta_sh_old,
121  const T& beta_old, const T& alpha, SGVector<ST>& alpha_sh);
122 
123 };
124 
125 }
126 
127 #endif // ITERATIVE_SHIFTED_LINEAR_FAMILY_SOLVER_H_

SHOGUN Machine Learning Toolbox - Documentation