R/RcppExports.R

# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

find_incomplete_blocks <- function(mat) {
    .Call('admbsecr_find_incomplete_blocks', PACKAGE = 'admbsecr', mat)
}

blockify <- function(block, reqss) {
    .Call('admbsecr_blockify', PACKAGE = 'admbsecr', block, reqss)
}

detection_dists <- function(trap_dists, traps) {
    .Call('admbsecr_detection_dists', PACKAGE = 'admbsecr', trap_dists, traps)
}

detection_timediffs <- function(times, traps) {
    .Call('admbsecr_detection_timediffs', PACKAGE = 'admbsecr', times, traps)
}

min_skip_matrix <- function(skip, allocated) {
    .Call('admbsecr_min_skip_matrix', PACKAGE = 'admbsecr', skip, allocated)
}

#' Calculating distances between two sets of points
#'
#' Calculates pairwise distances between two sets of points.
#'
#' @param a matrix containing a set of coordinates.
#' @param b matrix containing another set of coordinates.
#'
#' @return A matrix with pairwise distances between the two sets of points.
#'
#' @examples
#' dists <- distances(example$traps, example$mask)
#'
#' @export
distances <- function(a, b) {
    .Call('admbsecr_distances', PACKAGE = 'admbsecr', a, b)
}

#' Calculating bearings between two sets of points
#'
#' Calculates the bearing from one set of points to another.
#'
#' @param a matrix containing a set of coordinates.
#' @param b matrix containing another set of coordinates.
#'
#' @return A matrix with bearings of the points in matrix b from the points in matrix a.
#'
#' @examples
#' bears <- bearings(example$traps, example$mask) 
#'
#' @export
bearings <- function(a, b) {
    .Call('admbsecr_bearings', PACKAGE = 'admbsecr', a, b)
}

make_toa_ssq <- function(capt, dists, sound_speed) {
    .Call('admbsecr_make_toa_ssq', PACKAGE = 'admbsecr', capt, dists, sound_speed)
}

find_local <- function(capt, dists, buffer) {
    .Call('admbsecr_find_local', PACKAGE = 'admbsecr', capt, dists, buffer)
}

sim_ss <- function(ss_mean, sigma_ss, cutoff, freqs) {
    .Call('admbsecr_sim_ss', PACKAGE = 'admbsecr', ss_mean, sigma_ss, cutoff, freqs)
}

#' Evaluating the likelihood using C++
#'
#' Returns the likelihood for a vector of parameter values.
#'
#' @param link_pars Parameter values on link scale.
#' @param dat Data list.
#' @param get_esa Logical. If \code{TRUE} the effective sampling area is returned,
#'        otherwise the negative log-likelihood is returned.
#'
#' @return The value of the negative log-likelihood.
#'
secr_nll <- function(link_pars, dat, get_esa) {
    .Call('admbsecr_secr_nll', PACKAGE = 'admbsecr', link_pars, dat, get_esa)
}

calc_probsurf <- function(link_pars, dat) {
    .Call('admbsecr_calc_probsurf', PACKAGE = 'admbsecr', link_pars, dat)
}
b-steve/admbsecr documentation built on May 11, 2019, 5:20 p.m.