#ifndef spareM_h #define spareM_h #include "../Basics/basic.h" #include "Matrix.h" tcT class spareM { public: spareM (); spareM (const int m, const int nbMaxCoef); void newCoef (const int i, const int j, const T v); // selectors int m() const; int n() const; // indexation T operator () (const int i, const int j) const; // rows traversal boolean first (const int i, int& j, T& v); boolean next (const int i, int& j, T& v); friend ostream& operator << (ostream& s, const spareM& a); private: int coefPtr, rowPtr, N; Matrix val; Matrix ind, beg, cnt, finger; }; // tcT ostream& operator << (ostream& s, const spareM& a); #endif