R/RcppExports.R

Defines functions createUcpp createUcppM ic0 getMatCovFromFactorCpp generateNNarray U_NZentries_mat U_NZentries MaxMincpp MaternFun EsqeFun

Documented in getMatCovFromFactorCpp ic0 MaternFun

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

EsqeFun <- function(distmat, covparms) {
    .Call('_GPvecchia_EsqeFun', PACKAGE = 'GPvecchia', distmat, covparms)
}

#' Calculate Matern covariance function
#'
#' @param distmat A matrix with distances between points
#' @param covparms A vector with parameters (marg. variance, range, smoothness)
#' @return A matrix with covariance values corresponding to the distance matrix
#' @export
MaternFun <- function(distmat, covparms) {
    .Call('_GPvecchia_MaternFun', PACKAGE = 'GPvecchia', distmat, covparms)
}

MaxMincpp <- function(locations) {
    .Call('_GPvecchia_MaxMincpp', PACKAGE = 'GPvecchia', locations)
}

U_NZentries <- function(Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covType, covparms) {
    .Call('_GPvecchia_U_NZentries', PACKAGE = 'GPvecchia', Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covType, covparms)
}

U_NZentries_mat <- function(Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covVals, covparms) {
    .Call('_GPvecchia_U_NZentries_mat', PACKAGE = 'GPvecchia', Ncores, n, locs, revNNarray, revCondOnLatent, nuggets, nuggets_obsord, covVals, covparms)
}

generateNNarray <- function(locs, J, M, r, m) {
    .Call('_GPvecchia_generateNNarray', PACKAGE = 'GPvecchia', locs, J, M, r, m)
}

#' Calculate the covariance values required by HV for
#' matrix factors passed as sparse matrices
#'
#' @param F factor of a matrix in a sparse format
#' @param revNNarray array with the neighbourhood structure
#' @return matrix with covariance values
#' @export
getMatCovFromFactorCpp <- function(F, revNNarray) {
    .Call('_GPvecchia_getMatCovFromFactorCpp', PACKAGE = 'GPvecchia', F, revNNarray)
}

#' Incomplete Cholesky decomposition of a sparse matrix passed in
#' the compressed sparse row format
#'
#' @param ptrs pointers to the beginning of the row
#' @param inds indices of nonzero elements in a row
#' @param vals nonzero values
#' @return vector of the values of the incomplete Cholesky factor
#' @export
ic0 <- function(ptrs, inds, vals) {
    .Call('_GPvecchia_ic0', PACKAGE = 'GPvecchia', ptrs, inds, vals)
}

createUcppM <- function(ptrs, inds, cov_vals) {
    .Call('_GPvecchia_createUcppM', PACKAGE = 'GPvecchia', ptrs, inds, cov_vals)
}

createUcpp <- function(ptrs, inds, locsord, covparams) {
    .Call('_GPvecchia_createUcpp', PACKAGE = 'GPvecchia', ptrs, inds, locsord, covparams)
}

Try the GPvecchia package in your browser

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

GPvecchia documentation built on June 22, 2024, 11:13 a.m.