Skip to content

Commit

Permalink
update boost
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Oct 21, 2024
1 parent 2c5fc3a commit 4071c9d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 7 deletions.
4 changes: 4 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export(min_distthreshold)
export(min_neighbors)
export(natural_breaks)
export(neighbor_match_test)
export(p_GeoDa)
export(p_GeoDaTable)
export(p_GeoDaWeight)
export(p_LISA)
export(percentile_breaks)
export(quantile_breaks)
export(queen_weights)
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ stddev_breaks <- function(df) {
#' @title Empirical Bayes(EB) Rate
#' @description The function to compute EB Rate from an event variable and a
#' base variable.
#' @param df A data frame with two selected variable: one is "event", anothor is
#' "base" variable. E.g. guerry[c("hr60", "po60")]
#' @param df A data frame with two selected variable: one is "event" variable, another is
#' "base" variable like population. E.g. guerry[c("hr60", "po60")]
#' @return A data.frame with two columns "EB Rate" and "IsNull".
#' @examples
#' \dontrun{
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
RGEODALIB = ./libgeoda
BOOST_PATH = ./boost_develop/boost_1_86_0
BOOST_PATH = ./boost-develop/boost_1_86_0

PKG_CPPFLAGS=\
-I$(RGEODALIB) \
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TARGET = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH)

RGEODALIB = ./libgeoda
BOOST_PATH = ./boost_develop/boost_1_86_0
BOOST_PATH = ./boost-develop/boost_1_86_0

PKG_CPPFLAGS=\
-I$(RGEODALIB) \
Expand Down
5 changes: 5 additions & 0 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// p_skater
Rcpp::List p_skater(int k, SEXP xp_w, Rcpp::List& data, int n_vars, std::string scale_method, std::string distance_method, NumericVector& bound_vals, double min_bound, int seed, int cpu_threads, NumericVector& rdist);
RcppExport SEXP _rgeoda_p_skater(SEXP kSEXP, SEXP xp_wSEXP, SEXP dataSEXP, SEXP n_varsSEXP, SEXP scale_methodSEXP, SEXP distance_methodSEXP, SEXP bound_valsSEXP, SEXP min_boundSEXP, SEXP seedSEXP, SEXP cpu_threadsSEXP, SEXP rdistSEXP) {
Expand Down
2 changes: 1 addition & 1 deletion src/boost-develop
Submodule boost-develop updated 62109 files
2 changes: 1 addition & 1 deletion src/libgeoda
Submodule libgeoda updated 3 files
+1 −0 .gitignore
+68 −0 gda_data.cpp
+30 −19 gda_data.h
2 changes: 1 addition & 1 deletion src/rcpp_lisa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ DataFrame p_eb_rate(NumericVector& event_data, NumericVector& base_data)
std::vector<double> results(n);
std::vector<bool> undefined(n, false);

gda_rateStandardizeEB(raw_event_data, raw_base_data, results, undefined);
gda_rateSmootherEBS(raw_base_data, raw_event_data, results, undefined);

Rcpp::NumericVector v1(results.begin(), results.end());
Rcpp::LogicalVector v2(undefined.begin(), undefined.end());
Expand Down

0 comments on commit 4071c9d

Please sign in to comment.