I have a large sparse binary matrix, and I have to apply the Gauss method , so I need to do a lot of logical (XOR) operations on the rows.
In order to save space, I thought to use the bitset structure, but it has to be given a fixed dimension even in the prototype, whereas I wanted to include it in a class like this
class BinMat{
public:
BinMat(int n,int m){
..
}
/* ..
*/
private:
int row;
int col;
std::bitset** a;
};
is there a workaround, or similar structure in c++ that let me do such operations efficiently?