Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: philentropy
Type: Package
Title: Similarity and Distance Quantification Between Probability Functions
Version: 0.10.0
Version: 0.10.1
Authors@R: c(person("Hajk-Georg", "Drost",
role = c("aut", "cre"),
email = "hajk-georg.drost@tuebingen.mpg.de",
Expand Down
69 changes: 24 additions & 45 deletions inst/include/philentropy_RcppExports.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,88 +24,67 @@ namespace philentropy {
}
}

inline Rcpp::NumericMatrix as_matrix(Rcpp::DataFrame x) {
typedef SEXP(*Ptr_as_matrix)(SEXP);
static Ptr_as_matrix p_as_matrix = NULL;
if (p_as_matrix == NULL) {
validateSignature("Rcpp::NumericMatrix(*as_matrix)(Rcpp::DataFrame)");
p_as_matrix = (Ptr_as_matrix)R_GetCCallable("philentropy", "_philentropy_as_matrix");
inline double dist_one_one(const Rcpp::NumericVector& P, const Rcpp::NumericVector& Q, const Rcpp::String& method, Rcpp::Nullable<double> p = R_NilValue, const bool& testNA = true, const Rcpp::String& unit = "log", const double& epsilon = 0.00001) {
typedef SEXP(*Ptr_dist_one_one)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_dist_one_one p_dist_one_one = NULL;
if (p_dist_one_one == NULL) {
validateSignature("double(*dist_one_one)(const Rcpp::NumericVector&,const Rcpp::NumericVector&,const Rcpp::String&,Rcpp::Nullable<double>,const bool&,const Rcpp::String&,const double&)");
p_dist_one_one = (Ptr_dist_one_one)R_GetCCallable("philentropy", "_philentropy_dist_one_one");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_as_matrix(Shield<SEXP>(Rcpp::wrap(x)));
rcpp_result_gen = p_dist_one_one(Shield<SEXP>(Rcpp::wrap(P)), Shield<SEXP>(Rcpp::wrap(Q)), Shield<SEXP>(Rcpp::wrap(method)), Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(testNA)), Shield<SEXP>(Rcpp::wrap(unit)), Shield<SEXP>(Rcpp::wrap(epsilon)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::NumericMatrix >(rcpp_result_gen);
return Rcpp::as<double >(rcpp_result_gen);
}

inline Rcpp::DataFrame as_data_frame(Rcpp::NumericMatrix mat) {
typedef SEXP(*Ptr_as_data_frame)(SEXP);
static Ptr_as_data_frame p_as_data_frame = NULL;
if (p_as_data_frame == NULL) {
validateSignature("Rcpp::DataFrame(*as_data_frame)(Rcpp::NumericMatrix)");
p_as_data_frame = (Ptr_as_data_frame)R_GetCCallable("philentropy", "_philentropy_as_data_frame");
inline Rcpp::NumericVector dist_one_many(const Rcpp::NumericVector& P, Rcpp::NumericMatrix dists, Rcpp::String method, Rcpp::Nullable<double> p = R_NilValue, bool testNA = true, Rcpp::String unit = "log", double epsilon = 0.00001, Rcpp::Nullable<int> num_threads = R_NilValue) {
typedef SEXP(*Ptr_dist_one_many)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_dist_one_many p_dist_one_many = NULL;
if (p_dist_one_many == NULL) {
validateSignature("Rcpp::NumericVector(*dist_one_many)(const Rcpp::NumericVector&,Rcpp::NumericMatrix,Rcpp::String,Rcpp::Nullable<double>,bool,Rcpp::String,double,Rcpp::Nullable<int>)");
p_dist_one_many = (Ptr_dist_one_many)R_GetCCallable("philentropy", "_philentropy_dist_one_many");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_as_data_frame(Shield<SEXP>(Rcpp::wrap(mat)));
rcpp_result_gen = p_dist_one_many(Shield<SEXP>(Rcpp::wrap(P)), Shield<SEXP>(Rcpp::wrap(dists)), Shield<SEXP>(Rcpp::wrap(method)), Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(testNA)), Shield<SEXP>(Rcpp::wrap(unit)), Shield<SEXP>(Rcpp::wrap(epsilon)), Shield<SEXP>(Rcpp::wrap(num_threads)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<Rcpp::DataFrame >(rcpp_result_gen);
return Rcpp::as<Rcpp::NumericVector >(rcpp_result_gen);
}

inline SEXP sum_rcpp(SEXP vec) {
typedef SEXP(*Ptr_sum_rcpp)(SEXP);
static Ptr_sum_rcpp p_sum_rcpp = NULL;
if (p_sum_rcpp == NULL) {
validateSignature("SEXP(*sum_rcpp)(SEXP)");
p_sum_rcpp = (Ptr_sum_rcpp)R_GetCCallable("philentropy", "_philentropy_sum_rcpp");
inline Rcpp::NumericMatrix dist_many_many(Rcpp::NumericMatrix& dists1, Rcpp::NumericMatrix& dists2, Rcpp::String method, Rcpp::Nullable<double> p = R_NilValue, bool testNA = true, Rcpp::String unit = "log", double epsilon = 0.00001, Rcpp::Nullable<int> num_threads = R_NilValue) {
typedef SEXP(*Ptr_dist_many_many)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
static Ptr_dist_many_many p_dist_many_many = NULL;
if (p_dist_many_many == NULL) {
validateSignature("Rcpp::NumericMatrix(*dist_many_many)(Rcpp::NumericMatrix&,Rcpp::NumericMatrix&,Rcpp::String,Rcpp::Nullable<double>,bool,Rcpp::String,double,Rcpp::Nullable<int>)");
p_dist_many_many = (Ptr_dist_many_many)R_GetCCallable("philentropy", "_philentropy_dist_many_many");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_sum_rcpp(Shield<SEXP>(Rcpp::wrap(vec)));
rcpp_result_gen = p_dist_many_many(Shield<SEXP>(Rcpp::wrap(dists1)), Shield<SEXP>(Rcpp::wrap(dists2)), Shield<SEXP>(Rcpp::wrap(method)), Shield<SEXP>(Rcpp::wrap(p)), Shield<SEXP>(Rcpp::wrap(testNA)), Shield<SEXP>(Rcpp::wrap(unit)), Shield<SEXP>(Rcpp::wrap(epsilon)), Shield<SEXP>(Rcpp::wrap(num_threads)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<SEXP >(rcpp_result_gen);
}

inline SEXP est_prob_empirical(SEXP CountVec) {
typedef SEXP(*Ptr_est_prob_empirical)(SEXP);
static Ptr_est_prob_empirical p_est_prob_empirical = NULL;
if (p_est_prob_empirical == NULL) {
validateSignature("SEXP(*est_prob_empirical)(SEXP)");
p_est_prob_empirical = (Ptr_est_prob_empirical)R_GetCCallable("philentropy", "_philentropy_est_prob_empirical");
}
RObject rcpp_result_gen;
{
RNGScope RCPP_rngScope_gen;
rcpp_result_gen = p_est_prob_empirical(Shield<SEXP>(Rcpp::wrap(CountVec)));
}
if (rcpp_result_gen.inherits("interrupted-error"))
throw Rcpp::internal::InterruptedException();
if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
throw Rcpp::LongjumpException(rcpp_result_gen);
if (rcpp_result_gen.inherits("try-error"))
throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
return Rcpp::as<SEXP >(rcpp_result_gen);
return Rcpp::as<Rcpp::NumericMatrix >(rcpp_result_gen);
}

}
Expand Down
Loading