SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
ConjugateGradientSolver.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 2013 Soumyajit De
00008  */
00009 
00010 #ifndef CONJUGATE_GRADIENT_SOLVER_H_
00011 #define CONJUGATE_GRADIENT_SOLVER_H_
00012 
00013 #include <shogun/lib/config.h>
00014 
00015 #ifdef HAVE_EIGEN3
00016 #include <shogun/mathematics/linalg/linsolver/IterativeLinearSolver.h>
00017 
00018 namespace shogun
00019 {
00020 template<class T> class CLinearOperator;
00021 template<class T> class SGVector;
00022 
00028 class CConjugateGradientSolver : public CIterativeLinearSolver<float64_t, float64_t>
00029 {
00030 
00031 public:
00033     CConjugateGradientSolver();
00034 
00036     CConjugateGradientSolver(bool store_residuals);
00037 
00039     virtual ~CConjugateGradientSolver();
00040 
00048     virtual SGVector<float64_t> solve(CLinearOperator<float64_t>* A,
00049         SGVector<float64_t> b);
00050 
00052     virtual const char* get_name() const
00053     {
00054         return "ConjugateGradientSolver";
00055     }
00056 
00057 };
00058 
00059 }
00060 
00061 #endif // HAVE_EIGEN3
00062 #endif // CONJUGATE_GRADIENT_SOLVER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation