00001 #ifndef __F_SSOR_CG_LS_H__ 00002 #define __F_SSOR_CG_LS_H__ 00003 00004 00034 #include <stdio.h> 00035 #include "F_IterativeLS.hpp" 00036 00037 class AFProductSeqSMatrix; 00038 00039 class F_SSOR_CG_LS : public F_IterativeLS 00040 { 00041 private: 00042 00043 double alpha; 00044 double beta; 00045 00046 bool fixedOmega; 00047 double omega; 00048 AFProductSeqSMatrix* C; // SSOR factorisation 00049 00050 FloatVector* g; 00051 FloatVector* p; 00052 FloatVector* d; 00053 00054 FloatVector* h; 00055 00056 protected: 00057 00058 virtual AFProductSeqSMatrix* factorize(AFSymMatrix* A); 00059 00060 virtual FloatVector* singleSolve(AFloatMatrix* A, FloatVector* b, FloatVector* x=0); 00061 00062 public: 00063 F_SSOR_CG_LS(int maxIterations, double epsilon):F_IterativeLS(maxIterations, epsilon) 00064 { g=p=h=d= 0; C=0; fixedOmega= false; omega=1.0; } 00065 F_SSOR_CG_LS(int maxIterations, double anOmega, double epsilon):F_IterativeLS(maxIterations, epsilon) 00066 { g=p=h=d= 0; C=0; fixedOmega= true; omega= anOmega;} 00067 virtual ~F_SSOR_CG_LS(){} 00068 00069 virtual FloatVector* solve(AFloatMatrix* m, FloatVector* b, FloatVector* dest); 00070 }; 00071 00072 #endif 00073