R/RcppExports.R

Defines functions Cmodel Cinit_session Cdeallocate_resources2 Cdeallocate_resources Cget_pointers Callocate_resources Cget_all_events_matrix Cget_all_events Cget_events_by_type Cget_agent_events Cget_n_events Cget_event Ccreate_agents Cget_output_ex Cget_output Cget_smith Cget_agent get_sample_output Cset_input_var Cget_inputs Xrexp mvrnormArma Cget_runtime_stats Cget_settings Cset_settings_var

Documented in Cget_agent_events Cget_all_events Cget_all_events_matrix Cget_event Cget_events_by_type Cget_inputs Cget_n_events Cget_output Cget_output_ex Cget_runtime_stats Cget_settings Cget_smith Cset_input_var Cset_settings_var get_sample_output mvrnormArma

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

#' Sets model settings.
#' @param name a name
#' @param value a value
#' @return 0 if successful.
#' @export
Cset_settings_var <- function(name, value) {
    .Call(`_epicR_Cset_settings_var`, name, value)
}

#' Returns current settings.
#' @return current settings.
#' @export
Cget_settings <- function() {
    .Call(`_epicR_Cget_settings`)
}

#' Returns run time stats.
#' @return agent size as well as memory and random variable fill stats.
#' @export
Cget_runtime_stats <- function() {
    .Call(`_epicR_Cget_runtime_stats`)
}

#' Samples from a multivariate normal
#' @param n number of samples to be taken
#' @param mu the mean
#' @param sigma the covariance matrix
#' @return the multivariate normal sample
#' @export
mvrnormArma <- function(n, mu, sigma) {
    .Call(`_epicR_mvrnormArma`, n, mu, sigma)
}

Xrexp <- function(n, rate) {
    .Call(`_epicR_Xrexp`, n, rate)
}

#' Returns inputs
#' @return all inputs
#' @export
Cget_inputs <- function() {
    .Call(`_epicR_Cget_inputs`)
}

#' Sets input variables.
#' @param name a string
#' @param value a number
#' @return 0 if successful
#' @export
Cset_input_var <- function(name, value) {
    .Call(`_epicR_Cset_input_var`, name, value)
}

#' Returns a sample output for a given year and gender.
#' @param year a number
#' @param sex a number, 0 for male and 1 for female
#' @return that specific output
#' @export
get_sample_output <- function(year, sex) {
    .Call(`_epicR_get_sample_output`, year, sex)
}

Cget_agent <- function(id) {
    .Call(`_epicR_Cget_agent`, id)
}

#' Returns agent Smith.
#' @return agent smith.
#' @export
Cget_smith <- function() {
    .Call(`_epicR_Cget_smith`)
}

#' Main outputs of the current run.
#' @return number of agents, cumulative time, number of deaths, number of COPD cases, as well as exacerbation statistics and QALYs.
#' @export
Cget_output <- function() {
    .Call(`_epicR_Cget_output`)
}

#' Extra outputs from the model
#' @return Extra outputs from the model.
#' @export
Cget_output_ex <- function() {
    .Call(`_epicR_Cget_output_ex`)
}

Ccreate_agents <- function() {
    .Call(`_epicR_Ccreate_agents`)
}

#' Returns the events stack.
#' @param i number of event
#' @return events
#' @export
Cget_event <- function(i) {
    .Call(`_epicR_Cget_event`, i)
}

#' Returns total number of events.
#' @return number of events
#' @export
Cget_n_events <- function() {
    .Call(`_epicR_Cget_n_events`)
}

#' Returns all events of an agent.
#' @param id agent ID.
#' @return all events of agent \code{id}
#' @export
Cget_agent_events <- function(id) {
    .Call(`_epicR_Cget_agent_events`, id)
}

#' Returns all events of a certain type.
#' @param event_type a number
#' @return all events of the type \code{event_type}
#' @export
Cget_events_by_type <- function(event_type) {
    .Call(`_epicR_Cget_events_by_type`, event_type)
}

#' Returns all events.
#' @return all events
#' @export
Cget_all_events <- function() {
    .Call(`_epicR_Cget_all_events`)
}

#' Returns a matrix containing all events
#' @return a matrix containing all events
#' @export
Cget_all_events_matrix <- function() {
    .Call(`_epicR_Cget_all_events_matrix`)
}

Callocate_resources <- function() {
    .Call(`_epicR_Callocate_resources`)
}

Cget_pointers <- function() {
    .Call(`_epicR_Cget_pointers`)
}

Cdeallocate_resources <- function() {
    .Call(`_epicR_Cdeallocate_resources`)
}

Cdeallocate_resources2 <- function() {
    .Call(`_epicR_Cdeallocate_resources2`)
}

Cinit_session <- function() {
    .Call(`_epicR_Cinit_session`)
}

Cmodel <- function(max_n_agents) {
    .Call(`_epicR_Cmodel`, max_n_agents)
}
aminadibi/epicR documentation built on May 18, 2023, 3:36 a.m.