//---------------------------------------------------------------------------

#ifndef CovMatrixH
#define CovMatrixH
//---------------------------------------------------------------------------

class CovMatrix {
	private:
		unsigned int rownum;
		unsigned int colnum;
		bool **matrix;		// columns are covering terms, rows terms to be covered
		vector<unsigned int> costs;		// costs of the columns. The less, the better. Set to 1 by default

	public:
		CovMatrix( const unsigned int _rows, const unsigned int _cols );
		~CovMatrix(void);

			// Setters and getters
		unsigned int GetRowNum(void) const { return rownum; };
		unsigned int GetColNum(void) const { return colnum; };
		bool GetValue( const unsigned int row, const unsigned int col ) const { return matrix[row][col]; };
		void SetValue( const unsigned int row, const unsigned int col, const bool val ) { matrix[row][col] = val; };
		unsigned int GetCost( const unsigned int col ) const { return costs[col]; };
		void SetCost( const unsigned int col, const unsigned int val ) { costs[col] = val; };

		void DumpMatrix( const char *fn ) const;
};

#endif
