From 027af5acca4e07b4ff802bd7e6df43cbc7e36fcb Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 5 Apr 2020 22:58:09 -0400 Subject: [PATCH] Allow LFSR to be instantiated with a given value. --- Numeric/LFSR.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Numeric/LFSR.hpp b/Numeric/LFSR.hpp index 9802bb893..408ee6725 100644 --- a/Numeric/LFSR.hpp +++ b/Numeric/LFSR.hpp @@ -37,6 +37,9 @@ template <> struct LSFRPolynomial { */ template ::value> class LFSR { public: + /*! + Constructs an LFSR with a random initial value. + */ LFSR() { // Randomise the value, ensuring it doesn't end up being 0. while(!value_) { @@ -48,6 +51,13 @@ template