R/RcppExports.R

Defines functions .atab .ecount .acount .map .backwardP .backwardH .forwardP .forwardH .ViterbiPP .ViterbiP .ViterbiH .ViterbiD .probAA .probDNA .whichmax logsum

Documented in logsum

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

#' Sum of logged probabilities.
#'
#' \code{"logsum"} takes a vector of logged probabilities (neagtive values)
#'   and returns its sum.
#'
#' @param x a numeric vector of logged probabilities.
#' @return returns a single numeric value representing the logged sum of the
#'   values in the input vector.
#' @details This is a simple compiled function that exponentiates the values
#' in the input vector, finds their sum, and returns the log of that value.
#' @author Shaun Wilkinson
#'
logsum <- function(x) {
    .Call('_aphid_logsum', PACKAGE = 'aphid', x)
}

.whichmax <- function(x, start = 1L) {
    .Call('_aphid_whichmax', PACKAGE = 'aphid', x, start)
}

.probDNA <- function(x, probs) {
    .Call('_aphid_probDNA', PACKAGE = 'aphid', x, probs)
}

.probAA <- function(x, probs) {
    .Call('_aphid_probAA', PACKAGE = 'aphid', x, probs)
}

.ViterbiD <- function(x, y, type, d, e, S, windowspace, offset = 0) {
    .Call('_aphid_ViterbiD', PACKAGE = 'aphid', x, y, type, d, e, S, windowspace, offset)
}

.ViterbiH <- function(y, A, E, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_ViterbiH', PACKAGE = 'aphid', y, A, E, DNA, AA)
}

.ViterbiP <- function(y, A, E, qe, qey, type, windowspace, offset = 0, DI = FALSE, ID = FALSE, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_ViterbiP', PACKAGE = 'aphid', y, A, E, qe, qey, type, windowspace, offset, DI, ID, DNA, AA)
}

.ViterbiPP <- function(Ax, Ay, Ex, Ey, qe, type, windowspace, offset = 0) {
    .Call('_aphid_ViterbiPP', PACKAGE = 'aphid', Ax, Ay, Ex, Ey, qe, type, windowspace, offset)
}

.forwardH <- function(y, A, E, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_forwardH', PACKAGE = 'aphid', y, A, E, DNA, AA)
}

.forwardP <- function(y, A, E, qe, qey, windowspace, DI = FALSE, ID = FALSE, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_forwardP', PACKAGE = 'aphid', y, A, E, qe, qey, windowspace, DI, ID, DNA, AA)
}

.backwardH <- function(y, A, E, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_backwardH', PACKAGE = 'aphid', y, A, E, DNA, AA)
}

.backwardP <- function(y, A, E, qe, qey, windowspace, DI = FALSE, ID = FALSE, DNA = FALSE, AA = FALSE) {
    .Call('_aphid_backwardP', PACKAGE = 'aphid', y, A, E, qe, qey, windowspace, DI, ID, DNA, AA)
}

.map <- function(ecs, notgaps, pseudocounts, seqweights, qe, lambda = 0) {
    .Call('_aphid_map', PACKAGE = 'aphid', ecs, notgaps, pseudocounts, seqweights, qe, lambda)
}

.acount <- function(x, arity) {
    .Call('_aphid_acount', PACKAGE = 'aphid', x, arity)
}

.ecount <- function(states, statearity, residues, resarity) {
    .Call('_aphid_ecount', PACKAGE = 'aphid', states, statearity, residues, resarity)
}

.atab <- function(x, seqweights) {
    .Call('_aphid_atab', PACKAGE = 'aphid', x, seqweights)
}

Try the aphid package in your browser

Any scripts or data that you put into this service are public.

aphid documentation built on Dec. 5, 2022, 9:06 a.m.