Raw File
Tip revision: f89b39f64b7327bb8acc31033cf6a67537a2ded3 authored by Lisa Amrhein on 29 March 2022, 20:50:10 UTC
version 1.0.3
Tip revision: f89b39f
#include <Rcpp.h>
#include <cmath>
#include <cstdlib>
#include "mpreal.h"

// constants

#define Q_LIMIT 256

// functions

bool validKummerParameters(double a, double b, bool warn = true);
bool isInteger(double x, bool warn = true);
bool validProbability(double p, bool warn = false);
bool isInadmissible(double x, bool warn = false);
bool validPbParameters(double alpha, double beta, double c, bool warn = false);
void reportGslError(int status);

// macros
#define GETV(x, i)      x[i % x.length()]    // wrapped indexing of vector
#define GETM(x, i, j)   x(i % x.nrow(), j)   // wrapped indexing of matrix
back to top