R/RcppExports.R

Defines functions sample_ust var_info_vec tree_pop swMH dist_cty_splits splits smc_plans k_biggest k_smallest rsg solve_hungarian renumber_matrix plan_joint resample_lowvar runif1 rint1 closest_adj_pop pareto_dominated ms_plans max_dev pop_tally group_pct prec_cooccur colmin colmax group_pct_top_k calcPWDh countpartitions n_removed log_st_map dist_dist_diff crsg update_conncomp cores contiguity findBoundary genAlConn polsbypopper color_graph get_plan_graph coarsen_adjacency collapse_adj reduce_adj

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

reduce_adj <- function(adj_list, prec_map, n_keep) {
    .Call(`_redist_reduce_adj`, adj_list, prec_map, n_keep)
}

collapse_adj <- function(graph, idxs) {
    .Call(`_redist_collapse_adj`, graph, idxs)
}

coarsen_adjacency <- function(adj, groups) {
    .Call(`_redist_coarsen_adjacency`, adj, groups)
}

get_plan_graph <- function(l, V, plan, n_distr) {
    .Call(`_redist_get_plan_graph`, l, V, plan, n_distr)
}

color_graph <- function(l, plan) {
    .Call(`_redist_color_graph`, l, plan)
}

polsbypopper <- function(from, to, area, perimeter, dm, nd) {
    .Call(`_redist_polsbypopper`, from, to, area, perimeter, dm, nd)
}

genAlConn <- function(aList, cds) {
    .Call(`_redist_genAlConn`, aList, cds)
}

findBoundary <- function(fullList, conList) {
    .Call(`_redist_findBoundary`, fullList, conList)
}

contiguity <- function(adj, group) {
    .Call(`_redist_contiguity`, adj, group)
}

cores <- function(adj, dm, k, cd_within_k) {
    .Call(`_redist_cores`, adj, dm, k, cd_within_k)
}

update_conncomp <- function(dm, kvec, adj) {
    .Call(`_redist_update_conncomp`, dm, kvec, adj)
}

crsg <- function(adj_list, population, area, x_center, y_center, Ndistrict, target_pop, thresh, maxiter) {
    .Call(`_redist_crsg`, adj_list, population, area, x_center, y_center, Ndistrict, target_pop, thresh, maxiter)
}

dist_dist_diff <- function(p, i_dist, j_dist, x_center, y_center, x, y) {
    .Call(`_redist_dist_dist_diff`, p, i_dist, j_dist, x_center, y_center, x, y)
}

log_st_map <- function(g, districts, counties, n_distr) {
    .Call(`_redist_log_st_map`, g, districts, counties, n_distr)
}

n_removed <- function(g, districts, n_distr) {
    .Call(`_redist_n_removed`, g, districts, n_distr)
}

countpartitions <- function(aList) {
    .Call(`_redist_countpartitions`, aList)
}

calcPWDh <- function(x) {
    .Call(`_redist_calcPWDh`, x)
}

group_pct_top_k <- function(m, group_pop, total_pop, k, n_distr) {
    .Call(`_redist_group_pct_top_k`, m, group_pop, total_pop, k, n_distr)
}

colmax <- function(x) {
    .Call(`_redist_colmax`, x)
}

colmin <- function(x) {
    .Call(`_redist_colmin`, x)
}

prec_cooccur <- function(m, idxs, ncores = 0L) {
    .Call(`_redist_prec_cooccur`, m, idxs, ncores)
}

group_pct <- function(m, group_pop, total_pop, n_distr) {
    .Call(`_redist_group_pct`, m, group_pop, total_pop, n_distr)
}

pop_tally <- function(districts, pop, n_distr) {
    .Call(`_redist_pop_tally`, districts, pop, n_distr)
}

max_dev <- function(districts, pop, n_distr) {
    .Call(`_redist_max_dev`, districts, pop, n_distr)
}

ms_plans <- function(N, l, init, counties, pop, n_distr, target, lower, upper, rho, constraints, control, k, thin, verbosity) {
    .Call(`_redist_ms_plans`, N, l, init, counties, pop, n_distr, target, lower, upper, rho, constraints, control, k, thin, verbosity)
}

pareto_dominated <- function(x) {
    .Call(`_redist_pareto_dominated`, x)
}

closest_adj_pop <- function(adj, i_dist, g_prop) {
    .Call(`_redist_closest_adj_pop`, adj, i_dist, g_prop)
}

rint1 <- function(n, max) {
    .Call(`_redist_rint1`, n, max)
}

runif1 <- function(n, max) {
    .Call(`_redist_runif1`, n, max)
}

resample_lowvar <- function(wgts) {
    .Call(`_redist_resample_lowvar`, wgts)
}

plan_joint <- function(m1, m2, pop) {
    .Call(`_redist_plan_joint`, m1, m2, pop)
}

renumber_matrix <- function(plans, renumb) {
    .Call(`_redist_renumber_matrix`, plans, renumb)
}

solve_hungarian <- function(costMatrix) {
    .Call(`_redist_solve_hungarian`, costMatrix)
}

rsg <- function(adj_list, population, Ndistrict, target_pop, thresh, maxiter) {
    .Call(`_redist_rsg`, adj_list, population, Ndistrict, target_pop, thresh, maxiter)
}

k_smallest <- function(x, k = 1L) {
    .Call(`_redist_k_smallest`, x, k)
}

k_biggest <- function(x, k = 1L) {
    .Call(`_redist_k_biggest`, x, k)
}

smc_plans <- function(N, l, counties, pop, n_distr, target, lower, upper, rho, districts, n_drawn, n_steps, constraints, control, verbosity = 1L) {
    .Call(`_redist_smc_plans`, N, l, counties, pop, n_distr, target, lower, upper, rho, districts, n_drawn, n_steps, constraints, control, verbosity)
}

splits <- function(dm, community, nd, max_split) {
    .Call(`_redist_splits`, dm, community, nd, max_split)
}

dist_cty_splits <- function(dm, community, nd) {
    .Call(`_redist_dist_cty_splits`, dm, community, nd)
}

swMH <- function(aList, cdvec, popvec, nsims, constraints, eprob, pct_dist_parity, beta_sequence, beta_weights, lambda = 0L, beta = 0.0, adapt_beta = "none", adjswap = 1L, exact_mh = 0L, adapt_eprob = 0L, adapt_lambda = 0L, num_hot_steps = 0L, num_annealing_steps = 0L, num_cold_steps = 0L, verbose = TRUE) {
    .Call(`_redist_swMH`, aList, cdvec, popvec, nsims, constraints, eprob, pct_dist_parity, beta_sequence, beta_weights, lambda, beta, adapt_beta, adjswap, exact_mh, adapt_eprob, adapt_lambda, num_hot_steps, num_annealing_steps, num_cold_steps, verbose)
}

tree_pop <- function(ust, vtx, pop, pop_below, parent) {
    .Call(`_redist_tree_pop`, ust, vtx, pop, pop_below, parent)
}

var_info_vec <- function(m, ref, pop) {
    .Call(`_redist_var_info_vec`, m, ref, pop)
}

sample_ust <- function(l, pop, lower, upper, counties, ignore) {
    .Call(`_redist_sample_ust`, l, pop, lower, upper, counties, ignore)
}
kosukeimai/redist documentation built on March 28, 2024, 7:36 a.m.