00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 #ifndef CSC_MATRIX_H
00025 #define CSC_MATRIX_H
00026 
00046 class CSC_Matrix {
00047 public:
00048 
00050   CSC_Matrix(int columns, int length);
00051   ~CSC_Matrix(void);
00052 
00054   void insertElement(int column, int row, float value);
00055 
00057   int closeInsert(void);
00058 
00060   void reset(void);
00061 
00063   void reset(int columnNumber);
00064 
00066   void nextElement(void);
00067 
00069   int column(void);
00070 
00072   int row(void);
00073 
00075   float element(void);
00076 
00078   int length(void);
00079 
00081   void editElement(float value);
00082 
00084   void purgeMatrix(void);
00085 
00087   void salvageMatrix(void);
00088 
00090   int *CSC_row;
00091 
00093   int *CSC_column;
00094 
00096   float *CSC_matrix;
00097 
00099   int columns(void);
00100 
00101 private:
00102   void insertRowElement(int row, float value);
00103   void checkColumns(int columns);
00104 
00105   int position;
00106   int columnPointer;
00107   int nextColumnPointer;
00108   int previousRow;
00109 
00110   int columnCount;
00111 
00112 };
00113 
00114 
00115 #endif