-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbangM.h
31 lines (24 loc) · 685 Bytes
/
bitbangM.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef BITBANGM_H
#define BITBANGM_H
/* This file describes the API of an boolean symmetric matrix */
#include "bigint/BigIntegerLibrary.hh"
#include <iostream>
class CBBMatrix {
private:
int _N;
BigUnsigned _M;
BigUnsigned* _bitmasks;
BigUnsigned _last_value;
int get_mask_idx(const int i, const int j);
public:
CBBMatrix(int N);
~CBBMatrix();
int length();
void print(std::ostream& io);
bool next_value();
void jump_to_next_change_in(const int i, const int j);
bool get_value(const int i, const int j);
void set_value(const int i, const int j, const bool value);
void set_value(const int i, const int j, const int value);
};
#endif /* BITBANGM_H */