SHOGUN
v3.2.0
|
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 LINEAR_SOLVER_H_ 00011 #define LINEAR_SOLVER_H_ 00012 00013 #include <shogun/lib/config.h> 00014 #include <shogun/base/SGObject.h> 00015 00016 namespace shogun 00017 { 00018 template<class T> class SGVector; 00019 template<class T> class CLinearOperator; 00020 00025 template<class T, class ST=T> class CLinearSolver : public CSGObject 00026 { 00027 public: 00029 CLinearSolver() 00030 : CSGObject() 00031 { 00032 } 00033 00035 virtual ~CLinearSolver() 00036 { 00037 } 00038 00046 virtual SGVector<T> solve(CLinearOperator<T>* A, SGVector<ST> b) = 0; 00047 00049 virtual const char* get_name() const 00050 { 00051 return "LinearSolver"; 00052 } 00053 00054 }; 00055 } 00056 00057 #endif // LINEAR_SOLVER_H_