diff --git a/R/random.R b/R/random.R index abe1ccfb..225cd5ba 100644 --- a/R/random.R +++ b/R/random.R @@ -242,8 +242,8 @@ monty_random_exponential_mean <- function(mean, state) { ##' @export ##' @rdname monty_random_exponential -monty_random_n_exponential_mean <- function(n_samples, size, mean) { - cpp_monty_random_n_exponential_mean(n_samples, size, mean) +monty_random_n_exponential_mean <- function(n_samples, mean, state) { + cpp_monty_random_n_exponential_mean(n_samples, mean, state) } @@ -285,8 +285,8 @@ monty_random_beta <- function(a, b, state) { ##' @export ##' @rdname monty_random_beta -monty_random_n_beta <- function(n_samples, size, a, b) { - cpp_monty_random_n_beta(n_samples, size, a, b) +monty_random_n_beta <- function(n_samples, a, b, state) { + cpp_monty_random_n_beta(n_samples, a, b, state) } @@ -337,7 +337,7 @@ monty_random_cauchy <- function(location, scale, state) { ##' @export -##' @rdname monty_random_binomial +##' @rdname monty_random_cauchy monty_random_n_cauchy <- function(n_samples, location, scale, state) { cpp_monty_random_n_cauchy(n_samples, location, scale, state) } @@ -352,7 +352,7 @@ monty_random_n_cauchy <- function(n_samples, location, scale, state) { ##' ##' @param scale Scale ##'' -##' @param n_threads Number of threads to use; see Details +##' ##' @inheritParams monty_random_real ##' @inherit monty_random_real return ##' @@ -370,6 +370,7 @@ monty_random_n_gamma_scale <- function(n_samples, shape, scale, state) { } +##' @param rate Rate ##' @export ##' @rdname monty_random_gamma monty_random_gamma_rate <- function(shape, rate, state) { @@ -412,6 +413,9 @@ monty_random_n_negative_binomial_prob <- function(n_samples, size, prob, } + +##' @param mu The mean (zero or more) +##' ##' @inheritParams monty_random_real ##' @inherit monty_random_real return ##' @@ -444,15 +448,15 @@ monty_random_n_negative_binomial_mu <- function(n_samples, size, mu, state) { ##' @inherit monty_random_real return ##' ##' @export -monty_random_normal <- function(size, mean, sd) { - cpp_monty_random_normal(size, mean, sd) +monty_random_normal <- function(mean, sd, state) { + cpp_monty_random_normal(mean, sd, state) } ##' @export ##' @rdname monty_random_normal -monty_random_n_normal <- function(n_samples, size, mean, sd) { - cpp_monty_random_n_normal(n_samples, size, mean, sd) +monty_random_n_normal <- function(n_samples, mean, sd, state) { + cpp_monty_random_n_normal(n_samples, mean, sd, state) } @@ -468,15 +472,15 @@ monty_random_n_normal <- function(n_samples, size, mean, sd) { ##' @inherit monty_random_real return ##' ##' @export -monty_random_uniform <- function(size, min, max) { - cpp_monty_random_uniform(size, min, max) +monty_random_uniform <- function(min, max, state) { + cpp_monty_random_uniform(min, max, state) } ##' @export ##' @rdname monty_random_uniform -monty_random_n_uniform <- function(n_samples, size, min, max) { - cpp_monty_random_n_uniform(n_samples, size, min, max) +monty_random_n_uniform <- function(n_samples, min, max, state) { + cpp_monty_random_n_uniform(n_samples, min, max, state) } diff --git a/man/monty_random_beta.Rd b/man/monty_random_beta.Rd index ad65a609..8a900d7e 100644 --- a/man/monty_random_beta.Rd +++ b/man/monty_random_beta.Rd @@ -7,7 +7,7 @@ \usage{ monty_random_beta(a, b, state) -monty_random_n_beta(n_samples, size, a, b) +monty_random_n_beta(n_samples, a, b, state) } \arguments{ \item{a, b}{The shape parameters} diff --git a/man/monty_random_binomial.Rd b/man/monty_random_binomial.Rd index d3d3ca3d..c42071e3 100644 --- a/man/monty_random_binomial.Rd +++ b/man/monty_random_binomial.Rd @@ -3,14 +3,11 @@ \name{monty_random_binomial} \alias{monty_random_binomial} \alias{monty_random_n_binomial} -\alias{monty_random_n_cauchy} \title{Sample from binomial distribution} \usage{ monty_random_binomial(size, prob, state) monty_random_n_binomial(n_samples, size, prob, state) - -monty_random_n_cauchy(n_samples, location, scale, state) } \arguments{ \item{size}{The number of trials} diff --git a/man/monty_random_cauchy.Rd b/man/monty_random_cauchy.Rd index 84686c47..809e3d51 100644 --- a/man/monty_random_cauchy.Rd +++ b/man/monty_random_cauchy.Rd @@ -2,9 +2,12 @@ % Please edit documentation in R/random.R \name{monty_random_cauchy} \alias{monty_random_cauchy} +\alias{monty_random_n_cauchy} \title{Sample from Cauchy distribution} \usage{ monty_random_cauchy(location, scale, state) + +monty_random_n_cauchy(n_samples, location, scale, state) } \arguments{ \item{location}{Location of the distribution (the same as the @@ -14,6 +17,10 @@ median and mode)} half-maximum (HWHM)} \item{state}{The random number state, from \link{monty_random_create}} + +\item{n_samples}{The number of samples to take, \strong{per stream}. +When using the multiple-sample interface, all other parameters +are held constant (per stream).} } \value{ A vector of random numbers, the same length as the number diff --git a/man/monty_random_exponential.Rd b/man/monty_random_exponential.Rd index 9c184b3d..fa8ef6e7 100644 --- a/man/monty_random_exponential.Rd +++ b/man/monty_random_exponential.Rd @@ -13,7 +13,7 @@ monty_random_n_exponential_rate(n_samples, rate, state) monty_random_exponential_mean(mean, state) -monty_random_n_exponential_mean(n_samples, size, mean) +monty_random_n_exponential_mean(n_samples, mean, state) } \arguments{ \item{rate}{The rate of the exponential} diff --git a/man/monty_random_gamma.Rd b/man/monty_random_gamma.Rd index ed8d8af0..e51e868a 100644 --- a/man/monty_random_gamma.Rd +++ b/man/monty_random_gamma.Rd @@ -28,7 +28,7 @@ monty_random_n_gamma_rate(n_samples, shape, rate, state) When using the multiple-sample interface, all other parameters are held constant (per stream).} -\item{n_threads}{Number of threads to use; see Details} +\item{rate}{Rate} } \value{ A vector of random numbers, the same length as the number diff --git a/man/monty_random_negative_binomial.Rd b/man/monty_random_negative_binomial.Rd index 98b20994..567b3c67 100644 --- a/man/monty_random_negative_binomial.Rd +++ b/man/monty_random_negative_binomial.Rd @@ -27,6 +27,8 @@ and 1)} \item{n_samples}{The number of samples to take, \strong{per stream}. When using the multiple-sample interface, all other parameters are held constant (per stream).} + +\item{mu}{The mean (zero or more)} } \value{ A vector of random numbers, the same length as the number diff --git a/man/monty_random_normal.Rd b/man/monty_random_normal.Rd index bb05c58c..a76f010d 100644 --- a/man/monty_random_normal.Rd +++ b/man/monty_random_normal.Rd @@ -5,15 +5,17 @@ \alias{monty_random_n_normal} \title{Sample from normal distribution} \usage{ -monty_random_normal(size, mean, sd) +monty_random_normal(mean, sd, state) -monty_random_n_normal(n_samples, size, mean, sd) +monty_random_n_normal(n_samples, mean, sd, state) } \arguments{ \item{mean}{The mean of the normal distribution} \item{sd}{The standard deviation of the normal distribution} +\item{state}{The random number state, from \link{monty_random_create}} + \item{n_samples}{The number of samples to take, \strong{per stream}. When using the multiple-sample interface, all other parameters are held constant (per stream).} diff --git a/man/monty_random_uniform.Rd b/man/monty_random_uniform.Rd index 6f708863..4a84f50f 100644 --- a/man/monty_random_uniform.Rd +++ b/man/monty_random_uniform.Rd @@ -5,15 +5,17 @@ \alias{monty_random_n_uniform} \title{Sample from uniform distribution} \usage{ -monty_random_uniform(size, min, max) +monty_random_uniform(min, max, state) -monty_random_n_uniform(n_samples, size, min, max) +monty_random_n_uniform(n_samples, min, max, state) } \arguments{ \item{min}{The minimum value of the uniform distribution} \item{max}{The maximum value of the uniform distribution} +\item{state}{The random number state, from \link{monty_random_create}} + \item{n_samples}{The number of samples to take, \strong{per stream}. When using the multiple-sample interface, all other parameters are held constant (per stream).}