added reset()

This commit is contained in:
Ahmet Inan 2020-04-22 14:25:13 +02:00
commit 2a4681aa74

4
mls.hh
View file

@ -22,6 +22,10 @@ class MLS
int poly, test, reg; int poly, test, reg;
public: public:
MLS(int poly = 0b100000000000000001001, int reg = 1) : poly(poly), test(hibit(poly)>>1), reg(reg) {} MLS(int poly = 0b100000000000000001001, int reg = 1) : poly(poly), test(hibit(poly)>>1), reg(reg) {}
void reset(int r = 1)
{
reg = r;
}
bool operator()() bool operator()()
{ {
bool fb = reg & test; bool fb = reg & test;