1: #ifndef TAOLINEARSOLVER_H 2: #define TAOLINEARSOLVER_H 4: #include "tao_basictypes.h" 6: class TaoIndexSet; 7: class TaoVec; 8: class TaoMat; 10: /** 11: An abstract class representing the implementation of a Linear Solver 12: */ 14: class TaoLinearSolver { 16: protected: 17: 18: public: 19: TaoLinearSolver() { }; 20: virtual ~TaoLinearSolver() { }; 22: /* These two methods are very important */ 23: virtual int PreSolve(TaoMat *); 24: virtual int Solve(TaoVec *, TaoVec *, TaoTruth *); 26: /* Some solvers need this method */ 27: virtual int SolveTrustRegion(TaoVec *, TaoVec *, double, TaoTruth *); 28: virtual int SetTolerances(double rtol, double atol, double dtol, int maxits); 30: /* These methods are nice to have but not necessary */ 31: virtual int SetOptions(); 32: virtual int GetNumberIterations(int *); 33: virtual int View(); 34: }; 36: #endif