Skip to content

Commit

Permalink
documentation and rebuilt site
Browse files Browse the repository at this point in the history
  • Loading branch information
benyamindsmith committed Oct 23, 2024
1 parent 4120e5a commit d5fecc2
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 15 deletions.
4 changes: 2 additions & 2 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ lfsr_fib <- function(seed, n, bitsize, taps) {
.Call(`_randngen_lfsr_fib`, seed, n, bitsize, taps)
}

#' Galois Linear Feedback Shift Register
#' Galois Linear Feedback Shift Register (LFSR)
#'
#' Named after the French mathematician Évariste Galois, an LFSR in Galois configuration, which is also known as modular, internal XORs, or one-to-many LFSR, is an alternate structure that can generate the same output stream as a conventional LFSR (but offset in time).[5] In the Galois configuration, when the system is clocked, bits that are not taps are shifted one position to the right unchanged. The taps, on the other hand, are XORed with the output bit before they are stored in the next position. The new output bit is the next input bit. The effect of this is that when the output bit is zero, all the bits in the register shift to the right unchanged, and the input bit becomes zero. When the output bit is one, the bits in the tap positions all flip (if they are 0, they become 1, and if they are 1, they become 0), and then the entire register is shifted to the right and the input bit becomes 1.
#'
Expand All @@ -202,7 +202,7 @@ lfsr_galois <- function(seed, n, bitsize, taps) {
.Call(`_randngen_lfsr_galois`, seed, n, bitsize, taps)
}

#' Xorshift Linear Feedback Shift Register
#' Xorshift Linear Feedback Shift Register (LFSR)
#'
#' For more information, check out the \href{https://en.wikipedia.org/wiki/Linear-feedback_shift_register}{Wikipedia Page}.
lfsr_xorshift <- function(seed, n, bitsize, taps) {
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 3.1.11
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
last_built: 2024-10-22T20:54Z
last_built: 2024-10-23T04:30Z

10 changes: 6 additions & 4 deletions docs/reference/blumb_blumb_shub.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/reference/lfsr_galois-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 39 additions & 2 deletions docs/reference/lfsr_galois.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lfsr_galois.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/lfsr_xorshift.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/lfsr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ using namespace Rcpp;



//' Galois Linear Feedback Shift Register
//' Galois Linear Feedback Shift Register (LFSR)
//'
//' Named after the French mathematician Évariste Galois, an LFSR in Galois configuration, which is also known as modular, internal XORs, or one-to-many LFSR, is an alternate structure that can generate the same output stream as a conventional LFSR (but offset in time).[5] In the Galois configuration, when the system is clocked, bits that are not taps are shifted one position to the right unchanged. The taps, on the other hand, are XORed with the output bit before they are stored in the next position. The new output bit is the next input bit. The effect of this is that when the output bit is zero, all the bits in the register shift to the right unchanged, and the input bit becomes zero. When the output bit is one, the bits in the tap positions all flip (if they are 0, they become 1, and if they are 1, they become 0), and then the entire register is shifted to the right and the input bit becomes 1.
//'
Expand Down Expand Up @@ -104,7 +104,7 @@ using namespace Rcpp;
}


//' Xorshift Linear Feedback Shift Register
//' Xorshift Linear Feedback Shift Register (LFSR)
//'
//' For more information, check out the \href{https://en.wikipedia.org/wiki/Linear-feedback_shift_register}{Wikipedia Page}.
// [[Rcpp::export]]
Expand Down

0 comments on commit d5fecc2

Please sign in to comment.