From 2a4681aa74027eaa6225852a059fce5142dbecaa Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Wed, 22 Apr 2020 14:25:13 +0200 Subject: [PATCH] added reset() --- mls.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mls.hh b/mls.hh index b1a3f19..15ad1de 100644 --- a/mls.hh +++ b/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;