R/RcppExports.R

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' @title Compute COM-Poisson normalizing constante in log scale
#' @description Computes the normalizing constant in the log scale
#'   usign the LogSumExp trick to avoid numerical issues (See details).
#' @details \code{logspace_add(a, b) = log(exp(a) + exp(b)) = b + log(1 +
#'   exp(a - b))}, where \code{b > a}.
#' @param loglambda A vector of logarithm of the \eqn{\lambda}
#'   parameter.
#' @param nu A vector of dispersion parameters \eqn{\nu}.
#'
#' @return A vector with the logarithms of the resulting
#'   constants.
#' @references Wikipedia, LogSumExp. \url{http://rstudio.com}.
#' @author Eduardo Jr <edujrrib@gmail.com>
#' @export
compute_logz <- function(loglambda, nu) {
    .Call(`_cmpreg_compute_logz`, loglambda, nu)
}
jreduardo/cmpreg documentation built on May 14, 2019, 11:05 p.m.