mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
added reset()
This commit is contained in:
parent
1e7a25e1a8
commit
2a4681aa74
1 changed files with 4 additions and 0 deletions
4
mls.hh
4
mls.hh
|
|
@ -22,6 +22,10 @@ class MLS
|
|||
int poly, test, reg;
|
||||
public:
|
||||
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 fb = reg & test;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue