# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Calculate thresheld pairwise distance
#'
#' @param locs An N x 2 matrix of spatial locations
#' @param locs_grid An N_grid x 2 matrix of spatial grids
#' @param radius The thresholded radius
#' @param n_neighbors The expected number of neighbors based on the MRA grid
#' @return The thresheld pairwise distance
#'
#' @export
distance_near_with_ddist_cpp <- function(locs, locs_grid, radius, n_neighbors = 68L) {
.Call('_sgMRA_distance_near_with_ddist_cpp', PACKAGE = 'sgMRA', locs, locs_grid, radius, n_neighbors)
}
#' Calculate thresheld pairwise distance for a row
#'
#' @param i The row index
#' @param locs An N x 2 matrix of spatial locations
#' @param locs_grid An N_grid x 2 matrix of spatial grids
#' @param radius The thresholded radius
#' @param byrow Perform calculation row/column-wise
#' @return The thresheld pairwise distance
#'
#' @export
distance_near_row_cpp <- function(i, locs, locs_grid, radius, byrow = FALSE) {
.Call('_sgMRA_distance_near_row_cpp', PACKAGE = 'sgMRA', i, locs, locs_grid, radius, byrow)
}
#' Calculate thresheld pairwise distance for a row using loops for parallelization
#'
#' @param locs An N x 2 matrix of spatial locations
#' @param locs_grid An N_grid x 2 matrix of spatial grids
#' @param radius The thresholded radius
#' @param n_neighbors The expected number of neighbors based on the MRA grid
#' @return The thresheld pairwise distance
#' @param byrow Perform calculation row/column-wise
#'
#' @export
distance_near_loop_cpp <- function(locs, locs_grid, radius, n_neighbors = 86L, byrow = FALSE) {
.Call('_sgMRA_distance_near_loop_cpp', PACKAGE = 'sgMRA', locs, locs_grid, radius, n_neighbors, byrow)
}
#' Calculate thresheld pairwise distance for a row using loops for parallelization
#'
#' @param locs An N x 2 matrix of spatial locations
#' @param locs_grid An N_grid x 2 matrix of spatial grids
#' @param radius The thresholded radius
#' @param n_neighbors The expected number of neighbors based on the MRA grid
#' @param byrow Perform calculation row/column-wise
#' @param nchunks The number chunks to divide the data into
#' @param ncores The number of openmp threads
#' @return The thresheld pairwise distance
#'
#' @export
distance_near_chunk_cpp <- function(locs, locs_grid, radius, n_neighbors = 86L, byrow = FALSE, joint_index = TRUE, nchunks = NULL, ncores = 1L) {
.Call('_sgMRA_distance_near_chunk_cpp', PACKAGE = 'sgMRA', locs, locs_grid, radius, n_neighbors, byrow, joint_index, nchunks, ncores)
}
#' Calculate thresheld pairwise distance
#'
#' @param sq_devs An N x N_grid x 2 array of squared deviations between locations and gridcells
#' @param a A N vector of weights in the x direction
#' @param b A N vector of weights in the x direction
#' @param radius The threshold radius
NULL
#' @return The ()thresheld) pairwise distance
#'
#' @export
distance_near_nonstationary <- function(sq_devs, a, b, radius) {
.Call('_sgMRA_distance_near_nonstationary', PACKAGE = 'sgMRA', sq_devs, a, b, radius)
}
#' Calculate thresheld pairwise distance
#'
#' @param sq_devs An N x N_grid x 2 array of squared deviations between locations and gridcells
#' @param a A N vector of weights in the x direction
#' @param b A N vector of weights in the x direction
#' @param radius The threshold radius
NULL
#' @return The ()thresheld) pairwise distance
#'
#' @export
distance_nonstationary <- function(sq_devs, a, b) {
.Call('_sgMRA_distance_nonstationary', PACKAGE = 'sgMRA', sq_devs, a, b)
}
# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
.Call('_sgMRA_RcppExport_registerCCallable', PACKAGE = 'sgMRA')
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.