added bad() to test sequence

This commit is contained in:
Ahmet Inan 2020-05-29 11:33:37 +02:00
commit 33d34555ae

12
mls.hh
View file

@ -26,6 +26,18 @@ public:
{
reg = r;
}
bool bad(int r = 1)
{
reg = r;
int len = hibit(poly) - 1;
for (int i = 1; i < len; ++i) {
(*this)();
if (reg == r)
return true;
}
(*this)();
return reg != r;
}
bool operator()()
{
bool fb = reg & test;