aboutsummaryrefslogtreecommitdiff
path: root/new_R/man/SyncRNG-class.Rd
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2021-01-14 17:23:56 +0000
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2021-01-14 17:23:56 +0000
commitd49bf79e4b79b3bb3d9031c7fba4c21efc431548 (patch)
tree5d2b35944af343f15ecb7dbd3e74f91a95ca2c3f /new_R/man/SyncRNG-class.Rd
parentUpdate README (diff)
parentbump roxygen (diff)
downloadSyncRNG-d49bf79e4b79b3bb3d9031c7fba4c21efc431548.tar.gz
SyncRNG-d49bf79e4b79b3bb3d9031c7fba4c21efc431548.zip
Merge branch 'R'
# Conflicts: # .gitignore # README.md # new_R/src/syncrng.c
Diffstat (limited to 'new_R/man/SyncRNG-class.Rd')
-rw-r--r--new_R/man/SyncRNG-class.Rd39
1 files changed, 39 insertions, 0 deletions
diff --git a/new_R/man/SyncRNG-class.Rd b/new_R/man/SyncRNG-class.Rd
new file mode 100644
index 0000000..92316da
--- /dev/null
+++ b/new_R/man/SyncRNG-class.Rd
@@ -0,0 +1,39 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/SyncRNG.R
+\docType{class}
+\name{SyncRNG-class}
+\alias{SyncRNG-class}
+\alias{SyncRNG}
+\title{A Reference Class for SyncRNG}
+\description{
+See \link{syncrng-package} for package documentation.
+}
+\section{Fields}{
+
+\describe{
+\item{\code{seed}}{The seed for the random number generator}
+
+\item{\code{state}}{The current state of the RNG, should not be modified by the
+user}
+}}
+
+\section{Methods}{
+
+\describe{
+\item{\code{initialize(..., seed = 0)}}{Initialize the RNG using the C function R_syncrng_seed}
+
+\item{\code{rand()}}{Generate a single random float in the range [0, 1)}
+
+\item{\code{randbelow(n)}}{Generate a random integer below a given number}
+
+\item{\code{randi()}}{Generate a single random 32-bit integer}
+
+\item{\code{shuffle(x)}}{Randomly shuffle a provided array of values}
+}}
+
+\examples{
+s <- SyncRNG(seed=123456)
+for (i in 1:10)
+ cat(s$randi(), '\n')
+
+}