R/RcppExports.R

Defines functions rcpp_slk rcpp_mst rcpp_full_merge rcpp_full_initial rcpp_cut_tree rcpp_clk rcpp_alk

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

#' rcpp_alk
#'
#' Full-order average linkage cluster redcap algorithm
#'
#' @noRd
rcpp_alk <- function(gr, shortest, quiet) {
    .Call(`_spatialcluster_rcpp_alk`, gr, shortest, quiet)
}

#' clk_step
#'
#' @param ei The i'th edge of the full sorted list of edge weights
#' @noRd
NULL

#' rcpp_clk
#'
#' Full-order complete linkage cluster redcap algorithm
#'
#' @noRd
rcpp_clk <- function(gr_full, gr, shortest, quiet) {
    .Call(`_spatialcluster_rcpp_clk`, gr_full, gr, shortest, quiet)
}

#' rcpp_cut_tree
#'
#' Cut tree into specified number of clusters by minimising internal cluster
#' variance.
#'
#' @param tree tree to be processed
#'
#' @return Vector of cluster IDs for each tree edge
#' @noRd
rcpp_cut_tree <- function(tree, ncl, shortest, quiet) {
    .Call(`_spatialcluster_rcpp_cut_tree`, tree, ncl, shortest, quiet)
}

#' step
#'
#' All edges are initially in their own clusters. This merges edge#i with the
#' next closest edge
#'
#' @param ei The i'th edge of the sorted list of NN edge weights
#' @noRd
NULL

#' fill_cl_edges
#'
#' Fill (arma) matrix of strongest/shortest connections between all clusters
#' used to construct the hierarchical relationships
#' @noRd
NULL

#' rcpp_full_initial
#'
#' Initial allocation for full clustering
#'
#' @noRd
rcpp_full_initial <- function(gr, shortest) {
    .Call(`_spatialcluster_rcpp_full_initial`, gr, shortest)
}

#' rcpp_full_merge
#'
#' Merge clusters generated by rcpp_full_initial to full hierarchy of all
#' possible merges.
#'
#' @noRd
rcpp_full_merge <- function(gr, linkage, shortest) {
    .Call(`_spatialcluster_rcpp_full_merge`, gr, linkage, shortest)
}

#' rcpp_mst
#'
#' Minimum spanning tree
#'
#' @noRd
rcpp_mst <- function(input) {
    .Call(`_spatialcluster_rcpp_mst`, input)
}

#' rcpp_slk
#'
#' Full-order single linkage cluster redcap algorithm
#'
#' @noRd
rcpp_slk <- function(gr_full, gr, shortest, quiet) {
    .Call(`_spatialcluster_rcpp_slk`, gr_full, gr, shortest, quiet)
}
mpadge/spatialcluster documentation built on Jan. 23, 2025, 8:26 a.m.