/users/wolffm/guskov/Source/SparseMatrix.hh

Go to the documentation of this file.
00001 #ifndef SPARSEMATRIX_DEF
00002 #define SPARSEMATRIX_DEF
00003 
00004 //#include "Common.hh"
00005 
00006 #include <map>
00007 #include <vector>
00008 #include <assert.h>
00009 
00010 
00011 typedef std::map<unsigned int, double> Line;
00012 typedef std::vector<Line*>             Matrix;
00013 
00014 
00015 //class SparseMatrix;
00016 
00017 
00024 class SparseMatrix
00025 {
00026   private:
00027     
00029     unsigned int N;
00030 
00032     Matrix matrix;
00033 
00034   public:
00035 
00037     friend void mult( const SparseMatrix &A, const double *v, double *w );
00038 
00040     SparseMatrix() : N(0) {}
00041 
00043     SparseMatrix(const unsigned int n);
00044     
00046     ~SparseMatrix();
00047 
00049     unsigned int getSize() const
00050     { return N; }
00051   
00053     double& operator() (const unsigned int i, const unsigned int j);
00054 
00055 };
00056 
00062 void mult( const SparseMatrix &A, const double *v, double *w );
00063 
00064 
00065 
00066 
00067 #endif

Generated on Fri Jun 15 17:24:59 2007 for GuskovRemeshing by  doxygen 1.5.2