New format
This commit is contained in:
parent
664571ae9c
commit
3a009dca10
|
@ -5,7 +5,7 @@
|
|||
#' @param n the number of prime numbers to get, starting from 3
|
||||
#' @export getPrimes
|
||||
getPrimes <- function(n) {
|
||||
.Call('halton_getPrimes', PACKAGE = 'halton', n)
|
||||
.Call('_halton_getPrimes', PACKAGE = 'halton', n)
|
||||
}
|
||||
|
||||
#' Generate a halton sequence from a base number
|
||||
|
@ -14,7 +14,7 @@ getPrimes <- function(n) {
|
|||
#' @param burn the number of elements to "burn" from the beginning of the halton sequence, defualts to 30
|
||||
#' @export hseq
|
||||
hseq <- function(H, prime = 3L, burn = 30L) {
|
||||
.Call('halton_hseq', PACKAGE = 'halton', H, prime, burn)
|
||||
.Call('_halton_hseq', PACKAGE = 'halton', H, prime, burn)
|
||||
}
|
||||
|
||||
#' Generate uniformly distributed numbers using a Halton sequence
|
||||
|
@ -25,7 +25,7 @@ hseq <- function(H, prime = 3L, burn = 30L) {
|
|||
#' @param burn the number of elements to "burn" from the beginning of the halton sequence, defualts to 30
|
||||
#' @export hunif
|
||||
hunif <- function(H, min = 0, max = 1, prime = 3L, burn = 30L) {
|
||||
.Call('halton_hunif', PACKAGE = 'halton', H, min, max, prime, burn)
|
||||
.Call('_halton_hunif', PACKAGE = 'halton', H, min, max, prime, burn)
|
||||
}
|
||||
|
||||
#' Simulate draws from a normal distribution using a halton sequence
|
||||
|
@ -36,7 +36,7 @@ hunif <- function(H, min = 0, max = 1, prime = 3L, burn = 30L) {
|
|||
#' @param burn the number of elements to "burn" from the beginning of the halton sequence, defualts to 30
|
||||
#' @export hnorm
|
||||
hnorm <- function(H, mean = 0.0, sd = 1.0, prime = 3L, burn = 30L) {
|
||||
.Call('halton_hnorm', PACKAGE = 'halton', H, mean, sd, prime, burn)
|
||||
.Call('_halton_hnorm', PACKAGE = 'halton', H, mean, sd, prime, burn)
|
||||
}
|
||||
|
||||
#' Simulate draws from a gamma distribution using a halton sequence
|
||||
|
@ -47,7 +47,7 @@ hnorm <- function(H, mean = 0.0, sd = 1.0, prime = 3L, burn = 30L) {
|
|||
#' @param burn the number of elements to "burn" from the beginning of the halton sequence, defualts to 30
|
||||
#' @export hgamma
|
||||
hgamma <- function(H, shape = 0, scale = 1, prime = 3L, burn = 30L) {
|
||||
.Call('halton_hgamma', PACKAGE = 'halton', H, shape, scale, prime, burn)
|
||||
.Call('_halton_hgamma', PACKAGE = 'halton', H, shape, scale, prime, burn)
|
||||
}
|
||||
|
||||
#' Simulate draws from a Log-Normal distribution using a halton sequence
|
||||
|
@ -58,7 +58,7 @@ hgamma <- function(H, shape = 0, scale = 1, prime = 3L, burn = 30L) {
|
|||
#' @param burn the number of elements to "burn" from the beginning of the halton sequence, defualts to 30
|
||||
#' @export hlnorm
|
||||
hlnorm <- function(H, mean = 0.5, sd = 0.25, prime = 3L, burn = 30L) {
|
||||
.Call('halton_hlnorm', PACKAGE = 'halton', H, mean, sd, prime, burn)
|
||||
.Call('_halton_hlnorm', PACKAGE = 'halton', H, mean, sd, prime, burn)
|
||||
}
|
||||
|
||||
#' Multivariate normal inversion.
|
||||
|
@ -67,7 +67,7 @@ hlnorm <- function(H, mean = 0.5, sd = 0.25, prime = 3L, burn = 30L) {
|
|||
#' @param sigma the covariance matrix
|
||||
#' @export mvhnormInv
|
||||
mvhnormInv <- function(H, means, sigma, burn = 30L) {
|
||||
.Call('halton_mvhnormInv', PACKAGE = 'halton', H, means, sigma, burn)
|
||||
.Call('_halton_mvhnormInv', PACKAGE = 'halton', H, means, sigma, burn)
|
||||
}
|
||||
|
||||
#' Multivariate normal.
|
||||
|
@ -76,10 +76,10 @@ mvhnormInv <- function(H, means, sigma, burn = 30L) {
|
|||
#' @param sigma the covariance matrix
|
||||
#' @export mvhnorm
|
||||
mvhnorm <- function(H, means, sigma, burn = 30L) {
|
||||
.Call('halton_mvhnorm', PACKAGE = 'halton', H, means, sigma, burn)
|
||||
.Call('_halton_mvhnorm', PACKAGE = 'halton', H, means, sigma, burn)
|
||||
}
|
||||
|
||||
# Register entry points for exported C++ functions
|
||||
methods::setLoadAction(function(ns) {
|
||||
.Call('halton_RcppExport_registerCCallable', PACKAGE = 'halton')
|
||||
.Call('_halton_RcppExport_registerCCallable', PACKAGE = 'halton')
|
||||
})
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace halton {
|
|||
require("halton", Rcpp::Named("quietly") = true);
|
||||
typedef int(*Ptr_validate)(const char*);
|
||||
static Ptr_validate p_validate = (Ptr_validate)
|
||||
R_GetCCallable("halton", "halton_RcppExport_validate");
|
||||
R_GetCCallable("halton", "_halton_RcppExport_validate");
|
||||
if (!p_validate(sig)) {
|
||||
throw Rcpp::function_not_exported(
|
||||
"C++ function with signature '" + std::string(sig) + "' not found in halton");
|
||||
|
@ -30,12 +30,12 @@ namespace halton {
|
|||
static Ptr_getPrimes p_getPrimes = NULL;
|
||||
if (p_getPrimes == NULL) {
|
||||
validateSignature("arma::vec(*getPrimes)(int)");
|
||||
p_getPrimes = (Ptr_getPrimes)R_GetCCallable("halton", "halton_getPrimes");
|
||||
p_getPrimes = (Ptr_getPrimes)R_GetCCallable("halton", "_halton_getPrimes");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_getPrimes(Rcpp::wrap(n));
|
||||
rcpp_result_gen = p_getPrimes(Shield<SEXP>(Rcpp::wrap(n)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -49,12 +49,12 @@ namespace halton {
|
|||
static Ptr_hseq p_hseq = NULL;
|
||||
if (p_hseq == NULL) {
|
||||
validateSignature("NumericVector(*hseq)(int,int,int)");
|
||||
p_hseq = (Ptr_hseq)R_GetCCallable("halton", "halton_hseq");
|
||||
p_hseq = (Ptr_hseq)R_GetCCallable("halton", "_halton_hseq");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_hseq(Rcpp::wrap(H), Rcpp::wrap(prime), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_hseq(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(prime)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -68,12 +68,12 @@ namespace halton {
|
|||
static Ptr_hunif p_hunif = NULL;
|
||||
if (p_hunif == NULL) {
|
||||
validateSignature("NumericVector(*hunif)(int,double,double,int,int)");
|
||||
p_hunif = (Ptr_hunif)R_GetCCallable("halton", "halton_hunif");
|
||||
p_hunif = (Ptr_hunif)R_GetCCallable("halton", "_halton_hunif");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_hunif(Rcpp::wrap(H), Rcpp::wrap(min), Rcpp::wrap(max), Rcpp::wrap(prime), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_hunif(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(min)), Shield<SEXP>(Rcpp::wrap(max)), Shield<SEXP>(Rcpp::wrap(prime)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -87,12 +87,12 @@ namespace halton {
|
|||
static Ptr_hnorm p_hnorm = NULL;
|
||||
if (p_hnorm == NULL) {
|
||||
validateSignature("NumericVector(*hnorm)(int,double,double,int,int)");
|
||||
p_hnorm = (Ptr_hnorm)R_GetCCallable("halton", "halton_hnorm");
|
||||
p_hnorm = (Ptr_hnorm)R_GetCCallable("halton", "_halton_hnorm");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_hnorm(Rcpp::wrap(H), Rcpp::wrap(mean), Rcpp::wrap(sd), Rcpp::wrap(prime), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_hnorm(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(prime)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -106,12 +106,12 @@ namespace halton {
|
|||
static Ptr_hgamma p_hgamma = NULL;
|
||||
if (p_hgamma == NULL) {
|
||||
validateSignature("NumericVector(*hgamma)(int,double,double,int,int)");
|
||||
p_hgamma = (Ptr_hgamma)R_GetCCallable("halton", "halton_hgamma");
|
||||
p_hgamma = (Ptr_hgamma)R_GetCCallable("halton", "_halton_hgamma");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_hgamma(Rcpp::wrap(H), Rcpp::wrap(shape), Rcpp::wrap(scale), Rcpp::wrap(prime), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_hgamma(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(shape)), Shield<SEXP>(Rcpp::wrap(scale)), Shield<SEXP>(Rcpp::wrap(prime)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -125,12 +125,12 @@ namespace halton {
|
|||
static Ptr_hlnorm p_hlnorm = NULL;
|
||||
if (p_hlnorm == NULL) {
|
||||
validateSignature("NumericVector(*hlnorm)(int,double,double,int,int)");
|
||||
p_hlnorm = (Ptr_hlnorm)R_GetCCallable("halton", "halton_hlnorm");
|
||||
p_hlnorm = (Ptr_hlnorm)R_GetCCallable("halton", "_halton_hlnorm");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_hlnorm(Rcpp::wrap(H), Rcpp::wrap(mean), Rcpp::wrap(sd), Rcpp::wrap(prime), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_hlnorm(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(mean)), Shield<SEXP>(Rcpp::wrap(sd)), Shield<SEXP>(Rcpp::wrap(prime)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -144,12 +144,12 @@ namespace halton {
|
|||
static Ptr_mvhnormInv p_mvhnormInv = NULL;
|
||||
if (p_mvhnormInv == NULL) {
|
||||
validateSignature("NumericMatrix(*mvhnormInv)(int,arma::rowvec,arma::mat,int)");
|
||||
p_mvhnormInv = (Ptr_mvhnormInv)R_GetCCallable("halton", "halton_mvhnormInv");
|
||||
p_mvhnormInv = (Ptr_mvhnormInv)R_GetCCallable("halton", "_halton_mvhnormInv");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_mvhnormInv(Rcpp::wrap(H), Rcpp::wrap(means), Rcpp::wrap(sigma), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_mvhnormInv(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(means)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
@ -163,12 +163,12 @@ namespace halton {
|
|||
static Ptr_mvhnorm p_mvhnorm = NULL;
|
||||
if (p_mvhnorm == NULL) {
|
||||
validateSignature("arma::mat(*mvhnorm)(int,arma::rowvec,arma::mat,int)");
|
||||
p_mvhnorm = (Ptr_mvhnorm)R_GetCCallable("halton", "halton_mvhnorm");
|
||||
p_mvhnorm = (Ptr_mvhnorm)R_GetCCallable("halton", "_halton_mvhnorm");
|
||||
}
|
||||
RObject rcpp_result_gen;
|
||||
{
|
||||
RNGScope RCPP_rngScope_gen;
|
||||
rcpp_result_gen = p_mvhnorm(Rcpp::wrap(H), Rcpp::wrap(means), Rcpp::wrap(sigma), Rcpp::wrap(burn));
|
||||
rcpp_result_gen = p_mvhnorm(Shield<SEXP>(Rcpp::wrap(H)), Shield<SEXP>(Rcpp::wrap(means)), Shield<SEXP>(Rcpp::wrap(sigma)), Shield<SEXP>(Rcpp::wrap(burn)));
|
||||
}
|
||||
if (rcpp_result_gen.inherits("interrupted-error"))
|
||||
throw Rcpp::internal::InterruptedException();
|
||||
|
|
|
@ -11,7 +11,7 @@ using namespace Rcpp;
|
|||
|
||||
// getPrimes
|
||||
arma::vec getPrimes(int n);
|
||||
static SEXP halton_getPrimes_try(SEXP nSEXP) {
|
||||
static SEXP _halton_getPrimes_try(SEXP nSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type n(nSEXP);
|
||||
|
@ -19,11 +19,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_getPrimes(SEXP nSEXP) {
|
||||
RcppExport SEXP _halton_getPrimes(SEXP nSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_getPrimes_try(nSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_getPrimes_try(nSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -41,7 +41,7 @@ RcppExport SEXP halton_getPrimes(SEXP nSEXP) {
|
|||
}
|
||||
// hseq
|
||||
NumericVector hseq(int H, int prime, int burn);
|
||||
static SEXP halton_hseq_try(SEXP HSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_hseq_try(SEXP HSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -51,11 +51,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_hseq(SEXP HSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_hseq(SEXP HSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_hseq_try(HSEXP, primeSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_hseq_try(HSEXP, primeSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -73,7 +73,7 @@ RcppExport SEXP halton_hseq(SEXP HSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
|||
}
|
||||
// hunif
|
||||
NumericVector hunif(int H, double min, double max, int prime, int burn);
|
||||
static SEXP halton_hunif_try(SEXP HSEXP, SEXP minSEXP, SEXP maxSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_hunif_try(SEXP HSEXP, SEXP minSEXP, SEXP maxSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -85,11 +85,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_hunif(SEXP HSEXP, SEXP minSEXP, SEXP maxSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_hunif(SEXP HSEXP, SEXP minSEXP, SEXP maxSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_hunif_try(HSEXP, minSEXP, maxSEXP, primeSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_hunif_try(HSEXP, minSEXP, maxSEXP, primeSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -107,7 +107,7 @@ RcppExport SEXP halton_hunif(SEXP HSEXP, SEXP minSEXP, SEXP maxSEXP, SEXP primeS
|
|||
}
|
||||
// hnorm
|
||||
NumericVector hnorm(int H, double mean, double sd, int prime, int burn);
|
||||
static SEXP halton_hnorm_try(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_hnorm_try(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -119,11 +119,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_hnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_hnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_hnorm_try(HSEXP, meanSEXP, sdSEXP, primeSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_hnorm_try(HSEXP, meanSEXP, sdSEXP, primeSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -141,7 +141,7 @@ RcppExport SEXP halton_hnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeS
|
|||
}
|
||||
// hgamma
|
||||
NumericVector hgamma(int H, double shape, double scale, int prime, int burn);
|
||||
static SEXP halton_hgamma_try(SEXP HSEXP, SEXP shapeSEXP, SEXP scaleSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_hgamma_try(SEXP HSEXP, SEXP shapeSEXP, SEXP scaleSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -153,11 +153,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_hgamma(SEXP HSEXP, SEXP shapeSEXP, SEXP scaleSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_hgamma(SEXP HSEXP, SEXP shapeSEXP, SEXP scaleSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_hgamma_try(HSEXP, shapeSEXP, scaleSEXP, primeSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_hgamma_try(HSEXP, shapeSEXP, scaleSEXP, primeSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -175,7 +175,7 @@ RcppExport SEXP halton_hgamma(SEXP HSEXP, SEXP shapeSEXP, SEXP scaleSEXP, SEXP p
|
|||
}
|
||||
// hlnorm
|
||||
NumericVector hlnorm(int H, double mean, double sd, int prime, int burn);
|
||||
static SEXP halton_hlnorm_try(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_hlnorm_try(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -187,11 +187,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_hlnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_hlnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP primeSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_hlnorm_try(HSEXP, meanSEXP, sdSEXP, primeSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_hlnorm_try(HSEXP, meanSEXP, sdSEXP, primeSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -209,7 +209,7 @@ RcppExport SEXP halton_hlnorm(SEXP HSEXP, SEXP meanSEXP, SEXP sdSEXP, SEXP prime
|
|||
}
|
||||
// mvhnormInv
|
||||
NumericMatrix mvhnormInv(int H, arma::rowvec means, arma::mat sigma, int burn);
|
||||
static SEXP halton_mvhnormInv_try(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_mvhnormInv_try(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -220,11 +220,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_mvhnormInv(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_mvhnormInv(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_mvhnormInv_try(HSEXP, meansSEXP, sigmaSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_mvhnormInv_try(HSEXP, meansSEXP, sigmaSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -242,7 +242,7 @@ RcppExport SEXP halton_mvhnormInv(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SE
|
|||
}
|
||||
// mvhnorm
|
||||
arma::mat mvhnorm(int H, arma::rowvec means, arma::mat sigma, int burn);
|
||||
static SEXP halton_mvhnorm_try(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
static SEXP _halton_mvhnorm_try(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
BEGIN_RCPP
|
||||
Rcpp::RObject rcpp_result_gen;
|
||||
Rcpp::traits::input_parameter< int >::type H(HSEXP);
|
||||
|
@ -253,11 +253,11 @@ BEGIN_RCPP
|
|||
return rcpp_result_gen;
|
||||
END_RCPP_RETURN_ERROR
|
||||
}
|
||||
RcppExport SEXP halton_mvhnorm(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
RcppExport SEXP _halton_mvhnorm(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP burnSEXP) {
|
||||
SEXP rcpp_result_gen;
|
||||
{
|
||||
Rcpp::RNGScope rcpp_rngScope_gen;
|
||||
rcpp_result_gen = PROTECT(halton_mvhnorm_try(HSEXP, meansSEXP, sigmaSEXP, burnSEXP));
|
||||
rcpp_result_gen = PROTECT(_halton_mvhnorm_try(HSEXP, meansSEXP, sigmaSEXP, burnSEXP));
|
||||
}
|
||||
Rboolean rcpp_isInterrupt_gen = Rf_inherits(rcpp_result_gen, "interrupted-error");
|
||||
if (rcpp_isInterrupt_gen) {
|
||||
|
@ -275,7 +275,7 @@ RcppExport SEXP halton_mvhnorm(SEXP HSEXP, SEXP meansSEXP, SEXP sigmaSEXP, SEXP
|
|||
}
|
||||
|
||||
// validate (ensure exported C++ functions exist before calling them)
|
||||
static int halton_RcppExport_validate(const char* sig) {
|
||||
static int _halton_RcppExport_validate(const char* sig) {
|
||||
static std::set<std::string> signatures;
|
||||
if (signatures.empty()) {
|
||||
signatures.insert("arma::vec(*getPrimes)(int)");
|
||||
|
@ -291,15 +291,52 @@ static int halton_RcppExport_validate(const char* sig) {
|
|||
}
|
||||
|
||||
// registerCCallable (register entry points for exported C++ functions)
|
||||
RcppExport SEXP halton_RcppExport_registerCCallable() {
|
||||
R_RegisterCCallable("halton", "halton_getPrimes", (DL_FUNC)halton_getPrimes_try);
|
||||
R_RegisterCCallable("halton", "halton_hseq", (DL_FUNC)halton_hseq_try);
|
||||
R_RegisterCCallable("halton", "halton_hunif", (DL_FUNC)halton_hunif_try);
|
||||
R_RegisterCCallable("halton", "halton_hnorm", (DL_FUNC)halton_hnorm_try);
|
||||
R_RegisterCCallable("halton", "halton_hgamma", (DL_FUNC)halton_hgamma_try);
|
||||
R_RegisterCCallable("halton", "halton_hlnorm", (DL_FUNC)halton_hlnorm_try);
|
||||
R_RegisterCCallable("halton", "halton_mvhnormInv", (DL_FUNC)halton_mvhnormInv_try);
|
||||
R_RegisterCCallable("halton", "halton_mvhnorm", (DL_FUNC)halton_mvhnorm_try);
|
||||
R_RegisterCCallable("halton", "halton_RcppExport_validate", (DL_FUNC)halton_RcppExport_validate);
|
||||
RcppExport SEXP _halton_RcppExport_registerCCallable() {
|
||||
R_RegisterCCallable("halton", "_halton_getPrimes", (DL_FUNC)_halton_getPrimes_try);
|
||||
R_RegisterCCallable("halton", "_halton_hseq", (DL_FUNC)_halton_hseq_try);
|
||||
R_RegisterCCallable("halton", "_halton_hunif", (DL_FUNC)_halton_hunif_try);
|
||||
R_RegisterCCallable("halton", "_halton_hnorm", (DL_FUNC)_halton_hnorm_try);
|
||||
R_RegisterCCallable("halton", "_halton_hgamma", (DL_FUNC)_halton_hgamma_try);
|
||||
R_RegisterCCallable("halton", "_halton_hlnorm", (DL_FUNC)_halton_hlnorm_try);
|
||||
R_RegisterCCallable("halton", "_halton_mvhnormInv", (DL_FUNC)_halton_mvhnormInv_try);
|
||||
R_RegisterCCallable("halton", "_halton_mvhnorm", (DL_FUNC)_halton_mvhnorm_try);
|
||||
R_RegisterCCallable("halton", "_halton_RcppExport_validate", (DL_FUNC)_halton_RcppExport_validate);
|
||||
return R_NilValue;
|
||||
}
|
||||
|
||||
RcppExport SEXP halton_getPrimes(SEXP);
|
||||
RcppExport SEXP halton_hgamma(SEXP, SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_hlnorm(SEXP, SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_hnorm(SEXP, SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_hseq(SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_hunif(SEXP, SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_mvhnorm(SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_mvhnormInv(SEXP, SEXP, SEXP, SEXP);
|
||||
RcppExport SEXP halton_RcppExport_registerCCallable();
|
||||
|
||||
static const R_CallMethodDef CallEntries[] = {
|
||||
{"_halton_getPrimes", (DL_FUNC) &_halton_getPrimes, 1},
|
||||
{"_halton_hseq", (DL_FUNC) &_halton_hseq, 3},
|
||||
{"_halton_hunif", (DL_FUNC) &_halton_hunif, 5},
|
||||
{"_halton_hnorm", (DL_FUNC) &_halton_hnorm, 5},
|
||||
{"_halton_hgamma", (DL_FUNC) &_halton_hgamma, 5},
|
||||
{"_halton_hlnorm", (DL_FUNC) &_halton_hlnorm, 5},
|
||||
{"_halton_mvhnormInv", (DL_FUNC) &_halton_mvhnormInv, 4},
|
||||
{"_halton_mvhnorm", (DL_FUNC) &_halton_mvhnorm, 4},
|
||||
{"_halton_RcppExport_registerCCallable", (DL_FUNC) &_halton_RcppExport_registerCCallable, 0},
|
||||
{"halton_getPrimes", (DL_FUNC) &halton_getPrimes, 1},
|
||||
{"halton_hgamma", (DL_FUNC) &halton_hgamma, 5},
|
||||
{"halton_hlnorm", (DL_FUNC) &halton_hlnorm, 5},
|
||||
{"halton_hnorm", (DL_FUNC) &halton_hnorm, 5},
|
||||
{"halton_hseq", (DL_FUNC) &halton_hseq, 3},
|
||||
{"halton_hunif", (DL_FUNC) &halton_hunif, 5},
|
||||
{"halton_mvhnorm", (DL_FUNC) &halton_mvhnorm, 4},
|
||||
{"halton_mvhnormInv", (DL_FUNC) &halton_mvhnormInv, 4},
|
||||
{"halton_RcppExport_registerCCallable", (DL_FUNC) &halton_RcppExport_registerCCallable, 0},
|
||||
{NULL, NULL, 0}
|
||||
};
|
||||
|
||||
RcppExport void R_init_halton(DllInfo *dll) {
|
||||
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
|
||||
R_useDynamicSymbols(dll, FALSE);
|
||||
}
|
||||
|
|
Reference in New Issue