00001 #ifndef __Sp2FloatSMatrix_H__ 00002 #define __Sp2FloatSMatrix_H__ 00003 00004 00024 #include <stdio.h> 00025 #include "FloatVector.hpp" 00026 00027 #include "Sp1FloatSMatrix.hpp" 00028 00029 class Sp2FloatSMatrix : public Sp1FloatSMatrix 00030 { 00031 public: 00032 00033 Sp2FloatSMatrix(int w, int nmax):Sp1FloatSMatrix(w,nmax){} 00034 Sp2FloatSMatrix(const Sp2FloatSMatrix& m):Sp1FloatSMatrix(m){} 00035 Sp2FloatSMatrix operator=(const Sp2FloatSMatrix& m); 00036 virtual ~Sp2FloatSMatrix(){} 00037 00038 virtual void addItem(int x,int y, float value=0); 00039 00040 // u= A*v including implicit transposition 00041 virtual FloatVector* mult_Av(FloatVector* v, FloatVector* result=0); 00042 00043 // sub vector usage 00044 // u= A*v 00045 FloatVector* mult_Av(FloatVector* v, int col0, int row0, bool incremental=false, FloatVector* result=0); 00046 00047 // incomplete factorisation 00048 virtual AFloatMatrix* ilu0(); 00049 virtual AFloatMatrix* iluth(double threshold=0.001); 00050 00051 }; 00052 00053 #endif 00054 00055 00056