R/RcppExports.R

Defines functions consensus_c backtrace_c evaluateEquation e_ptr aeh

Documented in aeh backtrace_c consensus_c e_ptr evaluateEquation

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

#' default potential function, \code{L^2/2}
#' @param L interval length.
#' @param n total sequence length, required for function signature,
#' but not used in this example.
#' @export
aeh <- function(L, n) {
    .Call('_consseg_aeh', PACKAGE = 'consseg', L, n)
}

#' get internal potential function
#' @export
e_ptr <- function() {
    .Call('_consseg_e_ptr', PACKAGE = 'consseg')
}

#' evaluate pre-compiled potential functions
#' @param e a \code{XPtr} pointer provided by \code{\link{compileEquation}}.
#' @param L numeric, interval length \code{L} when used as a potential
#' function in the \code{consseg} recursion.
#' @param n numeric, total sequence length \code{n} when used as a
#' potential function in the \code{consseg} recursion.
#'@export
evaluateEquation <- function(e, L, n) {
    .Call('_consseg_evaluateEquation', PACKAGE = 'consseg', e, L, n)
}

#' backtrace breakpoints
#' @param imax a \code{NumericVector} containing backtrace vectors.
#' @export
backtrace_c <- function(imax) {
    .Call('_consseg_backtrace_c', PACKAGE = 'consseg', imax)
}

#' Calculate consensus segments from a list of segmentation breakpoints
#' @param b list of breakpoints of different segmentations.
#' @param n total sequence length.
#' @param w weights vector, must sum up to 1.
#' @param e potential function, taking one argument: the length \code{L}
#' of the evaluated interval.
#' @param store for debugging: store and return all internal vectors.
#'@export
consensus_c <- function(b, n, w, e, store = 0L) {
    .Call('_consseg_consensus_c', PACKAGE = 'consseg', b, n, w, e, store)
}
jfallmann/consseg documentation built on March 16, 2021, 11:34 a.m.