Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

FLinearSolverFactory.hpp

00001 #ifndef __FLinearSolverFactory__
00002 #define __FLinearSolverFactory__
00003 
00004 
00005 
00048 #include <stdio.h>
00049 
00050 #include "AbsFLinearSolver.hpp"
00051 
00052 class FLinearSolverFactory
00053 {
00054 public:
00055 
00056 int             n, nmax;
00057 char**  model; 
00058 char**  modelName;
00059 int*            modelContext;
00060 
00061 int             nContext, maxContext;
00062 char**  context;
00063 
00064 public:
00065         
00066 FLinearSolverFactory(int nmodels=50, int ncontext=10);
00067 virtual ~FLinearSolverFactory();
00068 
00069 int numberOfContexts(){ return nContext; }
00070 int numberOfModels(){ return n; }
00071 
00072 int maxContexts(){ return maxContext; }
00073 int maxModels(){ return nmax; }
00074 
00075 void addModel(char* name, char* newModel, int icontext);
00076 void addContext(char* newContext);
00077 
00078 char*           getContextType(int icontext){ return context[icontext]; }
00079 char*           getContext(int imodel){ return context[getModelContext(imodel)]; }
00080 char*           getModel(int imodel){ return model[imodel]; }
00081 char*           getModelName(int imodel){ return modelName[imodel]; }
00082 int             getModelContext(int imodel){ return modelContext[imodel]; }
00083 
00084 virtual AbsFLinearSolver* createSolver(int indexModel=0, int maxIter=10, int m=10, double epsilon=1.0e-4);
00085 
00086 virtual AbsFLinearSolver* createSolverByName(char* name, int maxIter, int m=10, double epsilon=1.0e-4);
00087 
00088 // used for combined solvers: gmresr, gmres*
00089 virtual AbsFLinearSolver* createSolverByName(char* name, int outerIter, int l, 
00090                                                                 int innerIter, int m, double epsilon=1.0e-4);
00091 
00092 // used for gmres*
00093 virtual AbsFLinearSolver* createSolverByName(char* name, int outerIter, int l, 
00094                                                                 AbsFLinearSolver* innerSolver, double epsilon=1.0e-4);
00095 
00096 virtual void showModels();
00097 
00098 virtual void report();
00099 virtual void report(FILE* file){}
00100 };
00101 
00102 
00103 
00104 #endif
SourceForge.net Logo
Restoreinpaint sourceforge project `C++/Java Image Processing, Restoration, Inpainting Project'.

Bernard De Cuyper: Open Project Leader: Concept, design and development.
Bernard De Cuyper & Eddy Fraiha 2002, 2003. Bernard De Cuyper 2004. Open and free, for friendly usage only.
Modifications on Belgium ground of this piece of artistic work, by governement institutions or companies, must be notified to Bernard De Cuyper.
bern_bdc@hotmail.com