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

#include <RcppArmadillo.h>
#include <RcppEigen.h>
#include <Rcpp.h>

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

// geometric_features_dist
Rcpp::DataFrame geometric_features_dist(Rcpp::NumericMatrix points, double dist, bool Anisotropy, bool Eigenentropy, bool Eigenvalue_sum, bool First_eigenvalue, bool Linearity, bool Normal_x, bool Normal_y, bool Normal_z, bool Number_of_points, bool Omnivariance, bool PCA_1, bool PCA_2, bool Planarity, bool Second_eigenvalue, bool Sphericity, bool Surface_density, bool Surface_variation, bool Third_eigenvalue, bool Verticality, bool Volume_density, int num_threads, bool use_spatial_index, double grid_cell_size);
RcppExport SEXP _FORTLS_geometric_features_dist(SEXP pointsSEXP, SEXP distSEXP, SEXP AnisotropySEXP, SEXP EigenentropySEXP, SEXP Eigenvalue_sumSEXP, SEXP First_eigenvalueSEXP, SEXP LinearitySEXP, SEXP Normal_xSEXP, SEXP Normal_ySEXP, SEXP Normal_zSEXP, SEXP Number_of_pointsSEXP, SEXP OmnivarianceSEXP, SEXP PCA_1SEXP, SEXP PCA_2SEXP, SEXP PlanaritySEXP, SEXP Second_eigenvalueSEXP, SEXP SphericitySEXP, SEXP Surface_densitySEXP, SEXP Surface_variationSEXP, SEXP Third_eigenvalueSEXP, SEXP VerticalitySEXP, SEXP Volume_densitySEXP, SEXP num_threadsSEXP, SEXP use_spatial_indexSEXP, SEXP grid_cell_sizeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type points(pointsSEXP);
    Rcpp::traits::input_parameter< double >::type dist(distSEXP);
    Rcpp::traits::input_parameter< bool >::type Anisotropy(AnisotropySEXP);
    Rcpp::traits::input_parameter< bool >::type Eigenentropy(EigenentropySEXP);
    Rcpp::traits::input_parameter< bool >::type Eigenvalue_sum(Eigenvalue_sumSEXP);
    Rcpp::traits::input_parameter< bool >::type First_eigenvalue(First_eigenvalueSEXP);
    Rcpp::traits::input_parameter< bool >::type Linearity(LinearitySEXP);
    Rcpp::traits::input_parameter< bool >::type Normal_x(Normal_xSEXP);
    Rcpp::traits::input_parameter< bool >::type Normal_y(Normal_ySEXP);
    Rcpp::traits::input_parameter< bool >::type Normal_z(Normal_zSEXP);
    Rcpp::traits::input_parameter< bool >::type Number_of_points(Number_of_pointsSEXP);
    Rcpp::traits::input_parameter< bool >::type Omnivariance(OmnivarianceSEXP);
    Rcpp::traits::input_parameter< bool >::type PCA_1(PCA_1SEXP);
    Rcpp::traits::input_parameter< bool >::type PCA_2(PCA_2SEXP);
    Rcpp::traits::input_parameter< bool >::type Planarity(PlanaritySEXP);
    Rcpp::traits::input_parameter< bool >::type Second_eigenvalue(Second_eigenvalueSEXP);
    Rcpp::traits::input_parameter< bool >::type Sphericity(SphericitySEXP);
    Rcpp::traits::input_parameter< bool >::type Surface_density(Surface_densitySEXP);
    Rcpp::traits::input_parameter< bool >::type Surface_variation(Surface_variationSEXP);
    Rcpp::traits::input_parameter< bool >::type Third_eigenvalue(Third_eigenvalueSEXP);
    Rcpp::traits::input_parameter< bool >::type Verticality(VerticalitySEXP);
    Rcpp::traits::input_parameter< bool >::type Volume_density(Volume_densitySEXP);
    Rcpp::traits::input_parameter< int >::type num_threads(num_threadsSEXP);
    Rcpp::traits::input_parameter< bool >::type use_spatial_index(use_spatial_indexSEXP);
    Rcpp::traits::input_parameter< double >::type grid_cell_size(grid_cell_sizeSEXP);
    rcpp_result_gen = Rcpp::wrap(geometric_features_dist(points, dist, Anisotropy, Eigenentropy, Eigenvalue_sum, First_eigenvalue, Linearity, Normal_x, Normal_y, Normal_z, Number_of_points, Omnivariance, PCA_1, PCA_2, Planarity, Second_eigenvalue, Sphericity, Surface_density, Surface_variation, Third_eigenvalue, Verticality, Volume_density, num_threads, use_spatial_index, grid_cell_size));
    return rcpp_result_gen;
END_RCPP
}
// fit_circle_cpp_modified
arma::mat fit_circle_cpp_modified(arma::mat points);
RcppExport SEXP _FORTLS_fit_circle_cpp_modified(SEXP pointsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type points(pointsSEXP);
    rcpp_result_gen = Rcpp::wrap(fit_circle_cpp_modified(points));
    return rcpp_result_gen;
END_RCPP
}
// is_one_row_all_na
bool is_one_row_all_na(arma::mat df);
RcppExport SEXP _FORTLS_is_one_row_all_na(SEXP dfSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type df(dfSEXP);
    rcpp_result_gen = Rcpp::wrap(is_one_row_all_na(df));
    return rcpp_result_gen;
END_RCPP
}
// sample_indices
arma::uvec sample_indices(int total_number_obs, int return_obs);
RcppExport SEXP _FORTLS_sample_indices(SEXP total_number_obsSEXP, SEXP return_obsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type total_number_obs(total_number_obsSEXP);
    Rcpp::traits::input_parameter< int >::type return_obs(return_obsSEXP);
    rcpp_result_gen = Rcpp::wrap(sample_indices(total_number_obs, return_obs));
    return rcpp_result_gen;
END_RCPP
}
// internal_ransac
arma::field<arma::mat> internal_ransac(arma::mat dat, double dist);
RcppExport SEXP _FORTLS_internal_ransac(SEXP datSEXP, SEXP distSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type dat(datSEXP);
    Rcpp::traits::input_parameter< double >::type dist(distSEXP);
    rcpp_result_gen = Rcpp::wrap(internal_ransac(dat, dist));
    return rcpp_result_gen;
END_RCPP
}
// RANSAC_cpp
arma::mat RANSAC_cpp(arma::mat data, double dist);
RcppExport SEXP _FORTLS_RANSAC_cpp(SEXP dataSEXP, SEXP distSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< double >::type dist(distSEXP);
    rcpp_result_gen = Rcpp::wrap(RANSAC_cpp(data, dist));
    return rcpp_result_gen;
END_RCPP
}
// iterations_RANSAC
arma::mat iterations_RANSAC(arma::mat data, int n_iterations);
RcppExport SEXP _FORTLS_iterations_RANSAC(SEXP dataSEXP, SEXP n_iterationsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< arma::mat >::type data(dataSEXP);
    Rcpp::traits::input_parameter< int >::type n_iterations(n_iterationsSEXP);
    rcpp_result_gen = Rcpp::wrap(iterations_RANSAC(data, n_iterations));
    return rcpp_result_gen;
END_RCPP
}
// weighted_mean_arit
double weighted_mean_arit(std::vector<double> x, std::vector<double> w);
RcppExport SEXP _FORTLS_weighted_mean_arit(SEXP xSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(weighted_mean_arit(x, w));
    return rcpp_result_gen;
END_RCPP
}
// weighted_mean_sqrt
double weighted_mean_sqrt(std::vector<double> x, std::vector<double> w);
RcppExport SEXP _FORTLS_weighted_mean_sqrt(SEXP xSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(weighted_mean_sqrt(x, w));
    return rcpp_result_gen;
END_RCPP
}
// weighted_mean_geom
double weighted_mean_geom(std::vector<double> x, std::vector<double> w);
RcppExport SEXP _FORTLS_weighted_mean_geom(SEXP xSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(weighted_mean_geom(x, w));
    return rcpp_result_gen;
END_RCPP
}
// weighted_mean_harm
double weighted_mean_harm(std::vector<double> x, std::vector<double> w);
RcppExport SEXP _FORTLS_weighted_mean_harm(SEXP xSEXP, SEXP wSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type x(xSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type w(wSEXP);
    rcpp_result_gen = Rcpp::wrap(weighted_mean_harm(x, w));
    return rcpp_result_gen;
END_RCPP
}
// height_perc_cpp
DataFrame height_perc_cpp(std::vector<double> rho_seq, std::vector<double> z, std::vector<double> rho);
RcppExport SEXP _FORTLS_height_perc_cpp(SEXP rho_seqSEXP, SEXP zSEXP, SEXP rhoSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type rho_seq(rho_seqSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type z(zSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type rho(rhoSEXP);
    rcpp_result_gen = Rcpp::wrap(height_perc_cpp(rho_seq, z, rho));
    return rcpp_result_gen;
END_RCPP
}
// fixed_area_cpp
DataFrame fixed_area_cpp(std::vector<double> radius_seq, std::vector<double> hdist, std::vector<double> d, std::vector<double> h, double num);
RcppExport SEXP _FORTLS_fixed_area_cpp(SEXP radius_seqSEXP, SEXP hdistSEXP, SEXP dSEXP, SEXP hSEXP, SEXP numSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type radius_seq(radius_seqSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type hdist(hdistSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type d(dSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type h(hSEXP);
    Rcpp::traits::input_parameter< double >::type num(numSEXP);
    rcpp_result_gen = Rcpp::wrap(fixed_area_cpp(radius_seq, hdist, d, h, num));
    return rcpp_result_gen;
END_RCPP
}
// k_tree_cpp
DataFrame k_tree_cpp(std::vector<double> k_seq, std::vector<double> radius_seq, std::vector<double> k, std::vector<double> d, std::vector<double> h, double num);
RcppExport SEXP _FORTLS_k_tree_cpp(SEXP k_seqSEXP, SEXP radius_seqSEXP, SEXP kSEXP, SEXP dSEXP, SEXP hSEXP, SEXP numSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type k_seq(k_seqSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type radius_seq(radius_seqSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type k(kSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type d(dSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type h(hSEXP);
    Rcpp::traits::input_parameter< double >::type num(numSEXP);
    rcpp_result_gen = Rcpp::wrap(k_tree_cpp(k_seq, radius_seq, k, d, h, num));
    return rcpp_result_gen;
END_RCPP
}
// angle_count_cpp
DataFrame angle_count_cpp(std::vector<double> baf_seq, std::vector<double> baf, std::vector<double> d, std::vector<double> h, double num);
RcppExport SEXP _FORTLS_angle_count_cpp(SEXP baf_seqSEXP, SEXP bafSEXP, SEXP dSEXP, SEXP hSEXP, SEXP numSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::vector<double> >::type baf_seq(baf_seqSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type baf(bafSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type d(dSEXP);
    Rcpp::traits::input_parameter< std::vector<double> >::type h(hSEXP);
    Rcpp::traits::input_parameter< double >::type num(numSEXP);
    rcpp_result_gen = Rcpp::wrap(angle_count_cpp(baf_seq, baf, d, h, num));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_FORTLS_geometric_features_dist", (DL_FUNC) &_FORTLS_geometric_features_dist, 25},
    {"_FORTLS_fit_circle_cpp_modified", (DL_FUNC) &_FORTLS_fit_circle_cpp_modified, 1},
    {"_FORTLS_is_one_row_all_na", (DL_FUNC) &_FORTLS_is_one_row_all_na, 1},
    {"_FORTLS_sample_indices", (DL_FUNC) &_FORTLS_sample_indices, 2},
    {"_FORTLS_internal_ransac", (DL_FUNC) &_FORTLS_internal_ransac, 2},
    {"_FORTLS_RANSAC_cpp", (DL_FUNC) &_FORTLS_RANSAC_cpp, 2},
    {"_FORTLS_iterations_RANSAC", (DL_FUNC) &_FORTLS_iterations_RANSAC, 2},
    {"_FORTLS_weighted_mean_arit", (DL_FUNC) &_FORTLS_weighted_mean_arit, 2},
    {"_FORTLS_weighted_mean_sqrt", (DL_FUNC) &_FORTLS_weighted_mean_sqrt, 2},
    {"_FORTLS_weighted_mean_geom", (DL_FUNC) &_FORTLS_weighted_mean_geom, 2},
    {"_FORTLS_weighted_mean_harm", (DL_FUNC) &_FORTLS_weighted_mean_harm, 2},
    {"_FORTLS_height_perc_cpp", (DL_FUNC) &_FORTLS_height_perc_cpp, 3},
    {"_FORTLS_fixed_area_cpp", (DL_FUNC) &_FORTLS_fixed_area_cpp, 5},
    {"_FORTLS_k_tree_cpp", (DL_FUNC) &_FORTLS_k_tree_cpp, 6},
    {"_FORTLS_angle_count_cpp", (DL_FUNC) &_FORTLS_angle_count_cpp, 5},
    {NULL, NULL, 0}
};

RcppExport void R_init_FORTLS(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
}
