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

#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

// maxent_featured_space_create
SEXP maxent_featured_space_create(int num_points, IntegerVector sample_indices, List feature_ptrs, NumericVector bias_weights);
RcppExport SEXP _maxentcpp_maxent_featured_space_create(SEXP num_pointsSEXP, SEXP sample_indicesSEXP, SEXP feature_ptrsSEXP, SEXP bias_weightsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type num_points(num_pointsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type sample_indices(sample_indicesSEXP);
    Rcpp::traits::input_parameter< List >::type feature_ptrs(feature_ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type bias_weights(bias_weightsSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_featured_space_create(num_points, sample_indices, feature_ptrs, bias_weights));
    return rcpp_result_gen;
END_RCPP
}
// maxent_train
List maxent_train(SEXP fs_ptr, int max_iter, double convergence, double beta_multiplier, double min_deviation);
RcppExport SEXP _maxentcpp_maxent_train(SEXP fs_ptrSEXP, SEXP max_iterSEXP, SEXP convergenceSEXP, SEXP beta_multiplierSEXP, SEXP min_deviationSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type max_iter(max_iterSEXP);
    Rcpp::traits::input_parameter< double >::type convergence(convergenceSEXP);
    Rcpp::traits::input_parameter< double >::type beta_multiplier(beta_multiplierSEXP);
    Rcpp::traits::input_parameter< double >::type min_deviation(min_deviationSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_train(fs_ptr, max_iter, convergence, beta_multiplier, min_deviation));
    return rcpp_result_gen;
END_RCPP
}
// maxent_predict
NumericVector maxent_predict(SEXP fs_ptr, NumericMatrix new_data);
RcppExport SEXP _maxentcpp_maxent_predict(SEXP fs_ptrSEXP, SEXP new_dataSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type new_data(new_dataSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_predict(fs_ptr, new_data));
    return rcpp_result_gen;
END_RCPP
}
// maxent_get_weights
NumericVector maxent_get_weights(SEXP fs_ptr);
RcppExport SEXP _maxentcpp_maxent_get_weights(SEXP fs_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_get_weights(fs_ptr));
    return rcpp_result_gen;
END_RCPP
}
// maxent_get_entropy
double maxent_get_entropy(SEXP fs_ptr);
RcppExport SEXP _maxentcpp_maxent_get_entropy(SEXP fs_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_get_entropy(fs_ptr));
    return rcpp_result_gen;
END_RCPP
}
// maxent_get_loss
double maxent_get_loss(SEXP fs_ptr);
RcppExport SEXP _maxentcpp_maxent_get_loss(SEXP fs_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_get_loss(fs_ptr));
    return rcpp_result_gen;
END_RCPP
}
// maxent_write_lambdas
void maxent_write_lambdas(SEXP fs_ptr, std::string filename);
RcppExport SEXP _maxentcpp_maxent_write_lambdas(SEXP fs_ptrSEXP, SEXP filenameSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    maxent_write_lambdas(fs_ptr, filename);
    return R_NilValue;
END_RCPP
}
// maxent_read_lambdas
void maxent_read_lambdas(SEXP fs_ptr, std::string filename);
RcppExport SEXP _maxentcpp_maxent_read_lambdas(SEXP fs_ptrSEXP, SEXP filenameSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    maxent_read_lambdas(fs_ptr, filename);
    return R_NilValue;
END_RCPP
}
// maxent_set_sample_expectations
void maxent_set_sample_expectations(SEXP fs_ptr, double beta_multiplier, double min_deviation);
RcppExport SEXP _maxentcpp_maxent_set_sample_expectations(SEXP fs_ptrSEXP, SEXP beta_multiplierSEXP, SEXP min_deviationSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< double >::type beta_multiplier(beta_multiplierSEXP);
    Rcpp::traits::input_parameter< double >::type min_deviation(min_deviationSEXP);
    maxent_set_sample_expectations(fs_ptr, beta_multiplier, min_deviation);
    return R_NilValue;
END_RCPP
}
// maxent_sequential_train
List maxent_sequential_train(SEXP fs_ptr, int max_iter, double convergence, double beta_multiplier, double min_deviation, int parallel_update_frequency, bool disable_convergence_test, Rcpp::IntegerVector trajectory_iterations);
RcppExport SEXP _maxentcpp_maxent_sequential_train(SEXP fs_ptrSEXP, SEXP max_iterSEXP, SEXP convergenceSEXP, SEXP beta_multiplierSEXP, SEXP min_deviationSEXP, SEXP parallel_update_frequencySEXP, SEXP disable_convergence_testSEXP, SEXP trajectory_iterationsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type max_iter(max_iterSEXP);
    Rcpp::traits::input_parameter< double >::type convergence(convergenceSEXP);
    Rcpp::traits::input_parameter< double >::type beta_multiplier(beta_multiplierSEXP);
    Rcpp::traits::input_parameter< double >::type min_deviation(min_deviationSEXP);
    Rcpp::traits::input_parameter< int >::type parallel_update_frequency(parallel_update_frequencySEXP);
    Rcpp::traits::input_parameter< bool >::type disable_convergence_test(disable_convergence_testSEXP);
    Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type trajectory_iterations(trajectory_iterationsSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_sequential_train(fs_ptr, max_iter, convergence, beta_multiplier, min_deviation, parallel_update_frequency, disable_convergence_test, trajectory_iterations));
    return rcpp_result_gen;
END_RCPP
}
// maxent_featured_space_info
List maxent_featured_space_info(SEXP fs_ptr);
RcppExport SEXP _maxentcpp_maxent_featured_space_info(SEXP fs_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_featured_space_info(fs_ptr));
    return rcpp_result_gen;
END_RCPP
}
// maxent_set_streaming_eval
void maxent_set_streaming_eval(SEXP fs_ptr, bool enabled);
RcppExport SEXP _maxentcpp_maxent_set_streaming_eval(SEXP fs_ptrSEXP, SEXP enabledSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< bool >::type enabled(enabledSEXP);
    maxent_set_streaming_eval(fs_ptr, enabled);
    return R_NilValue;
END_RCPP
}
// maxent_featured_space_from_callback
SEXP maxent_featured_space_from_callback(int num_points, int num_layers, CharacterVector layer_names, IntegerVector sample_indices, CharacterVector feature_types, int n_thresholds, int n_hinges, Function next_tile_fn, Function reset_fn, bool use_cache);
RcppExport SEXP _maxentcpp_maxent_featured_space_from_callback(SEXP num_pointsSEXP, SEXP num_layersSEXP, SEXP layer_namesSEXP, SEXP sample_indicesSEXP, SEXP feature_typesSEXP, SEXP n_thresholdsSEXP, SEXP n_hingesSEXP, SEXP next_tile_fnSEXP, SEXP reset_fnSEXP, SEXP use_cacheSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type num_points(num_pointsSEXP);
    Rcpp::traits::input_parameter< int >::type num_layers(num_layersSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type layer_names(layer_namesSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type sample_indices(sample_indicesSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_types(feature_typesSEXP);
    Rcpp::traits::input_parameter< int >::type n_thresholds(n_thresholdsSEXP);
    Rcpp::traits::input_parameter< int >::type n_hinges(n_hingesSEXP);
    Rcpp::traits::input_parameter< Function >::type next_tile_fn(next_tile_fnSEXP);
    Rcpp::traits::input_parameter< Function >::type reset_fn(reset_fnSEXP);
    Rcpp::traits::input_parameter< bool >::type use_cache(use_cacheSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_featured_space_from_callback(num_points, num_layers, layer_names, sample_indices, feature_types, n_thresholds, n_hinges, next_tile_fn, reset_fn, use_cache));
    return rcpp_result_gen;
END_RCPP
}
// maxent_featured_space_from_spatraster_callback
SEXP maxent_featured_space_from_spatraster_callback(SEXP preserved_rast, SEXP rast_xptr, int num_points, int num_layers, CharacterVector layer_names, IntegerVector sample_indices, CharacterVector feature_types, int n_thresholds, int n_hinges, Function next_tile_fn, Function reset_fn, bool enable_streaming_eval, bool use_cache);
RcppExport SEXP _maxentcpp_maxent_featured_space_from_spatraster_callback(SEXP preserved_rastSEXP, SEXP rast_xptrSEXP, SEXP num_pointsSEXP, SEXP num_layersSEXP, SEXP layer_namesSEXP, SEXP sample_indicesSEXP, SEXP feature_typesSEXP, SEXP n_thresholdsSEXP, SEXP n_hingesSEXP, SEXP next_tile_fnSEXP, SEXP reset_fnSEXP, SEXP enable_streaming_evalSEXP, SEXP use_cacheSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type preserved_rast(preserved_rastSEXP);
    Rcpp::traits::input_parameter< SEXP >::type rast_xptr(rast_xptrSEXP);
    Rcpp::traits::input_parameter< int >::type num_points(num_pointsSEXP);
    Rcpp::traits::input_parameter< int >::type num_layers(num_layersSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type layer_names(layer_namesSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type sample_indices(sample_indicesSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_types(feature_typesSEXP);
    Rcpp::traits::input_parameter< int >::type n_thresholds(n_thresholdsSEXP);
    Rcpp::traits::input_parameter< int >::type n_hinges(n_hingesSEXP);
    Rcpp::traits::input_parameter< Function >::type next_tile_fn(next_tile_fnSEXP);
    Rcpp::traits::input_parameter< Function >::type reset_fn(reset_fnSEXP);
    Rcpp::traits::input_parameter< bool >::type enable_streaming_eval(enable_streaming_evalSEXP);
    Rcpp::traits::input_parameter< bool >::type use_cache(use_cacheSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_featured_space_from_spatraster_callback(preserved_rast, rast_xptr, num_points, num_layers, layer_names, sample_indices, feature_types, n_thresholds, n_hinges, next_tile_fn, reset_fn, enable_streaming_eval, use_cache));
    return rcpp_result_gen;
END_RCPP
}
// maxent_extract_occurrence_from_callback
NumericMatrix maxent_extract_occurrence_from_callback(int num_points, int num_layers, IntegerVector occurrence_indices, Function next_tile_fn, Function reset_fn, SEXP preserved_rast);
RcppExport SEXP _maxentcpp_maxent_extract_occurrence_from_callback(SEXP num_pointsSEXP, SEXP num_layersSEXP, SEXP occurrence_indicesSEXP, SEXP next_tile_fnSEXP, SEXP reset_fnSEXP, SEXP preserved_rastSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type num_points(num_pointsSEXP);
    Rcpp::traits::input_parameter< int >::type num_layers(num_layersSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type occurrence_indices(occurrence_indicesSEXP);
    Rcpp::traits::input_parameter< Function >::type next_tile_fn(next_tile_fnSEXP);
    Rcpp::traits::input_parameter< Function >::type reset_fn(reset_fnSEXP);
    Rcpp::traits::input_parameter< SEXP >::type preserved_rast(preserved_rastSEXP);
    rcpp_result_gen = Rcpp::wrap(maxent_extract_occurrence_from_callback(num_points, num_layers, occurrence_indices, next_tile_fn, reset_fn, preserved_rast));
    return rcpp_result_gen;
END_RCPP
}
// create_linear_feature
SEXP create_linear_feature(NumericVector values, String name, double min_val, double max_val);
RcppExport SEXP _maxentcpp_create_linear_feature(SEXP valuesSEXP, SEXP nameSEXP, SEXP min_valSEXP, SEXP max_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type values(valuesSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type min_val(min_valSEXP);
    Rcpp::traits::input_parameter< double >::type max_val(max_valSEXP);
    rcpp_result_gen = Rcpp::wrap(create_linear_feature(values, name, min_val, max_val));
    return rcpp_result_gen;
END_RCPP
}
// create_quadratic_feature
SEXP create_quadratic_feature(NumericVector values, String name, double min_val, double max_val);
RcppExport SEXP _maxentcpp_create_quadratic_feature(SEXP valuesSEXP, SEXP nameSEXP, SEXP min_valSEXP, SEXP max_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type values(valuesSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type min_val(min_valSEXP);
    Rcpp::traits::input_parameter< double >::type max_val(max_valSEXP);
    rcpp_result_gen = Rcpp::wrap(create_quadratic_feature(values, name, min_val, max_val));
    return rcpp_result_gen;
END_RCPP
}
// create_product_feature
SEXP create_product_feature(NumericVector values1, NumericVector values2, String name, double min1, double max1, double min2, double max2);
RcppExport SEXP _maxentcpp_create_product_feature(SEXP values1SEXP, SEXP values2SEXP, SEXP nameSEXP, SEXP min1SEXP, SEXP max1SEXP, SEXP min2SEXP, SEXP max2SEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type values1(values1SEXP);
    Rcpp::traits::input_parameter< NumericVector >::type values2(values2SEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type min1(min1SEXP);
    Rcpp::traits::input_parameter< double >::type max1(max1SEXP);
    Rcpp::traits::input_parameter< double >::type min2(min2SEXP);
    Rcpp::traits::input_parameter< double >::type max2(max2SEXP);
    rcpp_result_gen = Rcpp::wrap(create_product_feature(values1, values2, name, min1, max1, min2, max2));
    return rcpp_result_gen;
END_RCPP
}
// create_threshold_feature
SEXP create_threshold_feature(NumericVector values, String name, double threshold);
RcppExport SEXP _maxentcpp_create_threshold_feature(SEXP valuesSEXP, SEXP nameSEXP, SEXP thresholdSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type values(valuesSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type threshold(thresholdSEXP);
    rcpp_result_gen = Rcpp::wrap(create_threshold_feature(values, name, threshold));
    return rcpp_result_gen;
END_RCPP
}
// create_hinge_feature
SEXP create_hinge_feature(NumericVector values, String name, double min_knot, double max_knot, bool is_reverse);
RcppExport SEXP _maxentcpp_create_hinge_feature(SEXP valuesSEXP, SEXP nameSEXP, SEXP min_knotSEXP, SEXP max_knotSEXP, SEXP is_reverseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type values(valuesSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type min_knot(min_knotSEXP);
    Rcpp::traits::input_parameter< double >::type max_knot(max_knotSEXP);
    Rcpp::traits::input_parameter< bool >::type is_reverse(is_reverseSEXP);
    rcpp_result_gen = Rcpp::wrap(create_hinge_feature(values, name, min_knot, max_knot, is_reverse));
    return rcpp_result_gen;
END_RCPP
}
// feature_eval
double feature_eval(SEXP feature_ptr, int index);
RcppExport SEXP _maxentcpp_feature_eval(SEXP feature_ptrSEXP, SEXP indexSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type feature_ptr(feature_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type index(indexSEXP);
    rcpp_result_gen = Rcpp::wrap(feature_eval(feature_ptr, index));
    return rcpp_result_gen;
END_RCPP
}
// feature_get_info
List feature_get_info(SEXP feature_ptr);
RcppExport SEXP _maxentcpp_feature_get_info(SEXP feature_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type feature_ptr(feature_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(feature_get_info(feature_ptr));
    return rcpp_result_gen;
END_RCPP
}
// generate_features
List generate_features(List data_list, CharacterVector feature_types, int n_thresholds, int n_hinges);
RcppExport SEXP _maxentcpp_generate_features(SEXP data_listSEXP, SEXP feature_typesSEXP, SEXP n_thresholdsSEXP, SEXP n_hingesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type data_list(data_listSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_types(feature_typesSEXP);
    Rcpp::traits::input_parameter< int >::type n_thresholds(n_thresholdsSEXP);
    Rcpp::traits::input_parameter< int >::type n_hinges(n_hingesSEXP);
    rcpp_result_gen = Rcpp::wrap(generate_features(data_list, feature_types, n_thresholds, n_hinges));
    return rcpp_result_gen;
END_RCPP
}
// grid_read_asc
SEXP grid_read_asc(std::string filename);
RcppExport SEXP _maxentcpp_grid_read_asc(SEXP filenameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_read_asc(filename));
    return rcpp_result_gen;
END_RCPP
}
// grid_write_asc
void grid_write_asc(SEXP grid_ptr, std::string filename, bool scientific);
RcppExport SEXP _maxentcpp_grid_write_asc(SEXP grid_ptrSEXP, SEXP filenameSEXP, SEXP scientificSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    Rcpp::traits::input_parameter< bool >::type scientific(scientificSEXP);
    grid_write_asc(grid_ptr, filename, scientific);
    return R_NilValue;
END_RCPP
}
// grid_read_file
SEXP grid_read_file(std::string filename);
RcppExport SEXP _maxentcpp_grid_read_file(SEXP filenameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_read_file(filename));
    return rcpp_result_gen;
END_RCPP
}
// grid_float_info
List grid_float_info(SEXP grid_ptr);
RcppExport SEXP _maxentcpp_grid_float_info(SEXP grid_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_float_info(grid_ptr));
    return rcpp_result_gen;
END_RCPP
}
// grid_float_to_matrix
NumericMatrix grid_float_to_matrix(SEXP grid_ptr);
RcppExport SEXP _maxentcpp_grid_float_to_matrix(SEXP grid_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_float_to_matrix(grid_ptr));
    return rcpp_result_gen;
END_RCPP
}
// grid_float_from_matrix
SEXP grid_float_from_matrix(NumericMatrix mat, double xll, double yll, double cellsize, double nodata, std::string name);
RcppExport SEXP _maxentcpp_grid_float_from_matrix(SEXP matSEXP, SEXP xllSEXP, SEXP yllSEXP, SEXP cellsizeSEXP, SEXP nodataSEXP, SEXP nameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericMatrix >::type mat(matSEXP);
    Rcpp::traits::input_parameter< double >::type xll(xllSEXP);
    Rcpp::traits::input_parameter< double >::type yll(yllSEXP);
    Rcpp::traits::input_parameter< double >::type cellsize(cellsizeSEXP);
    Rcpp::traits::input_parameter< double >::type nodata(nodataSEXP);
    Rcpp::traits::input_parameter< std::string >::type name(nameSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_float_from_matrix(mat, xll, yll, cellsize, nodata, name));
    return rcpp_result_gen;
END_RCPP
}
// csv_open
SEXP csv_open(std::string filename, bool has_header);
RcppExport SEXP _maxentcpp_csv_open(SEXP filenameSEXP, SEXP has_headerSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    Rcpp::traits::input_parameter< bool >::type has_header(has_headerSEXP);
    rcpp_result_gen = Rcpp::wrap(csv_open(filename, has_header));
    return rcpp_result_gen;
END_RCPP
}
// csv_headers
CharacterVector csv_headers(SEXP reader_ptr);
RcppExport SEXP _maxentcpp_csv_headers(SEXP reader_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type reader_ptr(reader_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(csv_headers(reader_ptr));
    return rcpp_result_gen;
END_RCPP
}
// csv_next_record
SEXP csv_next_record(SEXP reader_ptr);
RcppExport SEXP _maxentcpp_csv_next_record(SEXP reader_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type reader_ptr(reader_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(csv_next_record(reader_ptr));
    return rcpp_result_gen;
END_RCPP
}
// csv_read_double_column
NumericVector csv_read_double_column(SEXP reader_ptr, std::string field);
RcppExport SEXP _maxentcpp_csv_read_double_column(SEXP reader_ptrSEXP, SEXP fieldSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type reader_ptr(reader_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type field(fieldSEXP);
    rcpp_result_gen = Rcpp::wrap(csv_read_double_column(reader_ptr, field));
    return rcpp_result_gen;
END_RCPP
}
// csv_close
void csv_close(SEXP reader_ptr);
RcppExport SEXP _maxentcpp_csv_close(SEXP reader_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type reader_ptr(reader_ptrSEXP);
    csv_close(reader_ptr);
    return R_NilValue;
END_RCPP
}
// csv_writer_open
SEXP csv_writer_open(std::string filename, bool append, int precision);
RcppExport SEXP _maxentcpp_csv_writer_open(SEXP filenameSEXP, SEXP appendSEXP, SEXP precisionSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type filename(filenameSEXP);
    Rcpp::traits::input_parameter< bool >::type append(appendSEXP);
    Rcpp::traits::input_parameter< int >::type precision(precisionSEXP);
    rcpp_result_gen = Rcpp::wrap(csv_writer_open(filename, append, precision));
    return rcpp_result_gen;
END_RCPP
}
// csv_writer_print
void csv_writer_print(SEXP writer_ptr, std::string column, std::string value);
RcppExport SEXP _maxentcpp_csv_writer_print(SEXP writer_ptrSEXP, SEXP columnSEXP, SEXP valueSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type writer_ptr(writer_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type column(columnSEXP);
    Rcpp::traits::input_parameter< std::string >::type value(valueSEXP);
    csv_writer_print(writer_ptr, column, value);
    return R_NilValue;
END_RCPP
}
// csv_writer_print_double
void csv_writer_print_double(SEXP writer_ptr, std::string column, double value);
RcppExport SEXP _maxentcpp_csv_writer_print_double(SEXP writer_ptrSEXP, SEXP columnSEXP, SEXP valueSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type writer_ptr(writer_ptrSEXP);
    Rcpp::traits::input_parameter< std::string >::type column(columnSEXP);
    Rcpp::traits::input_parameter< double >::type value(valueSEXP);
    csv_writer_print_double(writer_ptr, column, value);
    return R_NilValue;
END_RCPP
}
// csv_writer_println
void csv_writer_println(SEXP writer_ptr);
RcppExport SEXP _maxentcpp_csv_writer_println(SEXP writer_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type writer_ptr(writer_ptrSEXP);
    csv_writer_println(writer_ptr);
    return R_NilValue;
END_RCPP
}
// csv_writer_close
void csv_writer_close(SEXP writer_ptr);
RcppExport SEXP _maxentcpp_csv_writer_close(SEXP writer_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type writer_ptr(writer_ptrSEXP);
    csv_writer_close(writer_ptr);
    return R_NilValue;
END_RCPP
}
// create_layer
SEXP create_layer(std::string name, std::string type_str);
RcppExport SEXP _maxentcpp_create_layer(SEXP nameSEXP, SEXP type_strSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type name(nameSEXP);
    Rcpp::traits::input_parameter< std::string >::type type_str(type_strSEXP);
    rcpp_result_gen = Rcpp::wrap(create_layer(name, type_str));
    return rcpp_result_gen;
END_RCPP
}
// get_layer_info
List get_layer_info(SEXP layer_ptr);
RcppExport SEXP _maxentcpp_get_layer_info(SEXP layer_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type layer_ptr(layer_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(get_layer_info(layer_ptr));
    return rcpp_result_gen;
END_RCPP
}
// layer_name_from_path
std::string layer_name_from_path(std::string path);
RcppExport SEXP _maxentcpp_layer_name_from_path(SEXP pathSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< std::string >::type path(pathSEXP);
    rcpp_result_gen = Rcpp::wrap(layer_name_from_path(path));
    return rcpp_result_gen;
END_RCPP
}
// create_grid_dimension
SEXP create_grid_dimension(int nrows, int ncols, double xll, double yll, double cellsize);
RcppExport SEXP _maxentcpp_create_grid_dimension(SEXP nrowsSEXP, SEXP ncolsSEXP, SEXP xllSEXP, SEXP yllSEXP, SEXP cellsizeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type nrows(nrowsSEXP);
    Rcpp::traits::input_parameter< int >::type ncols(ncolsSEXP);
    Rcpp::traits::input_parameter< double >::type xll(xllSEXP);
    Rcpp::traits::input_parameter< double >::type yll(yllSEXP);
    Rcpp::traits::input_parameter< double >::type cellsize(cellsizeSEXP);
    rcpp_result_gen = Rcpp::wrap(create_grid_dimension(nrows, ncols, xll, yll, cellsize));
    return rcpp_result_gen;
END_RCPP
}
// get_grid_dimension_info
List get_grid_dimension_info(SEXP dim_ptr);
RcppExport SEXP _maxentcpp_get_grid_dimension_info(SEXP dim_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type dim_ptr(dim_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(get_grid_dimension_info(dim_ptr));
    return rcpp_result_gen;
END_RCPP
}
// coords_to_rowcol
IntegerVector coords_to_rowcol(SEXP dim_ptr, double lon, double lat);
RcppExport SEXP _maxentcpp_coords_to_rowcol(SEXP dim_ptrSEXP, SEXP lonSEXP, SEXP latSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type dim_ptr(dim_ptrSEXP);
    Rcpp::traits::input_parameter< double >::type lon(lonSEXP);
    Rcpp::traits::input_parameter< double >::type lat(latSEXP);
    rcpp_result_gen = Rcpp::wrap(coords_to_rowcol(dim_ptr, lon, lat));
    return rcpp_result_gen;
END_RCPP
}
// create_sample
SEXP create_sample(int point, int row, int col, double lat, double lon, String name);
RcppExport SEXP _maxentcpp_create_sample(SEXP pointSEXP, SEXP rowSEXP, SEXP colSEXP, SEXP latSEXP, SEXP lonSEXP, SEXP nameSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< int >::type point(pointSEXP);
    Rcpp::traits::input_parameter< int >::type row(rowSEXP);
    Rcpp::traits::input_parameter< int >::type col(colSEXP);
    Rcpp::traits::input_parameter< double >::type lat(latSEXP);
    Rcpp::traits::input_parameter< double >::type lon(lonSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    rcpp_result_gen = Rcpp::wrap(create_sample(point, row, col, lat, lon, name));
    return rcpp_result_gen;
END_RCPP
}
// get_sample_info
List get_sample_info(SEXP sample_ptr);
RcppExport SEXP _maxentcpp_get_sample_info(SEXP sample_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type sample_ptr(sample_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(get_sample_info(sample_ptr));
    return rcpp_result_gen;
END_RCPP
}
// sample_set_feature
void sample_set_feature(SEXP sample_ptr, String feature_name, double value);
RcppExport SEXP _maxentcpp_sample_set_feature(SEXP sample_ptrSEXP, SEXP feature_nameSEXP, SEXP valueSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type sample_ptr(sample_ptrSEXP);
    Rcpp::traits::input_parameter< String >::type feature_name(feature_nameSEXP);
    Rcpp::traits::input_parameter< double >::type value(valueSEXP);
    sample_set_feature(sample_ptr, feature_name, value);
    return R_NilValue;
END_RCPP
}
// sample_get_feature
double sample_get_feature(SEXP sample_ptr, String feature_name, double default_val);
RcppExport SEXP _maxentcpp_sample_get_feature(SEXP sample_ptrSEXP, SEXP feature_nameSEXP, SEXP default_valSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type sample_ptr(sample_ptrSEXP);
    Rcpp::traits::input_parameter< String >::type feature_name(feature_nameSEXP);
    Rcpp::traits::input_parameter< double >::type default_val(default_valSEXP);
    rcpp_result_gen = Rcpp::wrap(sample_get_feature(sample_ptr, feature_name, default_val));
    return rcpp_result_gen;
END_RCPP
}
// create_grid_float
SEXP create_grid_float(SEXP dim_ptr, String name, double nodata_value);
RcppExport SEXP _maxentcpp_create_grid_float(SEXP dim_ptrSEXP, SEXP nameSEXP, SEXP nodata_valueSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type dim_ptr(dim_ptrSEXP);
    Rcpp::traits::input_parameter< String >::type name(nameSEXP);
    Rcpp::traits::input_parameter< double >::type nodata_value(nodata_valueSEXP);
    rcpp_result_gen = Rcpp::wrap(create_grid_float(dim_ptr, name, nodata_value));
    return rcpp_result_gen;
END_RCPP
}
// grid_get_value
double grid_get_value(SEXP grid_ptr, int row, int col);
RcppExport SEXP _maxentcpp_grid_get_value(SEXP grid_ptrSEXP, SEXP rowSEXP, SEXP colSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type row(rowSEXP);
    Rcpp::traits::input_parameter< int >::type col(colSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_get_value(grid_ptr, row, col));
    return rcpp_result_gen;
END_RCPP
}
// grid_set_value
void grid_set_value(SEXP grid_ptr, int row, int col, double value);
RcppExport SEXP _maxentcpp_grid_set_value(SEXP grid_ptrSEXP, SEXP rowSEXP, SEXP colSEXP, SEXP valueSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type row(rowSEXP);
    Rcpp::traits::input_parameter< int >::type col(colSEXP);
    Rcpp::traits::input_parameter< double >::type value(valueSEXP);
    grid_set_value(grid_ptr, row, col, value);
    return R_NilValue;
END_RCPP
}
// grid_has_data
bool grid_has_data(SEXP grid_ptr, int row, int col);
RcppExport SEXP _maxentcpp_grid_has_data(SEXP grid_ptrSEXP, SEXP rowSEXP, SEXP colSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< int >::type row(rowSEXP);
    Rcpp::traits::input_parameter< int >::type col(colSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_has_data(grid_ptr, row, col));
    return rcpp_result_gen;
END_RCPP
}
// grid_to_matrix
NumericMatrix grid_to_matrix(SEXP grid_ptr);
RcppExport SEXP _maxentcpp_grid_to_matrix(SEXP grid_ptrSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_to_matrix(grid_ptr));
    return rcpp_result_gen;
END_RCPP
}
// grid_get_values_batch
NumericVector grid_get_values_batch(SEXP grid_ptr, IntegerVector rows, IntegerVector cols);
RcppExport SEXP _maxentcpp_grid_get_values_batch(SEXP grid_ptrSEXP, SEXP rowsSEXP, SEXP colsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type rows(rowsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type cols(colsSEXP);
    rcpp_result_gen = Rcpp::wrap(grid_get_values_batch(grid_ptr, rows, cols));
    return rcpp_result_gen;
END_RCPP
}
// grid_from_matrix
void grid_from_matrix(SEXP grid_ptr, NumericMatrix mat);
RcppExport SEXP _maxentcpp_grid_from_matrix(SEXP grid_ptrSEXP, SEXP matSEXP) {
BEGIN_RCPP
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type grid_ptr(grid_ptrSEXP);
    Rcpp::traits::input_parameter< NumericMatrix >::type mat(matSEXP);
    grid_from_matrix(grid_ptr, mat);
    return R_NilValue;
END_RCPP
}
// compute_permutation_importance
DataFrame compute_permutation_importance(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names, IntegerVector presence_rows, IntegerVector presence_cols, IntegerVector absence_rows, IntegerVector absence_cols, int seed);
RcppExport SEXP _maxentcpp_compute_permutation_importance(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP, SEXP presence_rowsSEXP, SEXP presence_colsSEXP, SEXP absence_rowsSEXP, SEXP absence_colsSEXP, SEXP seedSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type presence_rows(presence_rowsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type presence_cols(presence_colsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type absence_rows(absence_rowsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type absence_cols(absence_colsSEXP);
    Rcpp::traits::input_parameter< int >::type seed(seedSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_permutation_importance(fs_ptr, grid_ptrs, feature_names, presence_rows, presence_cols, absence_rows, absence_cols, seed));
    return rcpp_result_gen;
END_RCPP
}
// compute_percent_contribution
DataFrame compute_percent_contribution(SEXP fs_ptr, CharacterVector feature_names);
RcppExport SEXP _maxentcpp_compute_percent_contribution(SEXP fs_ptrSEXP, SEXP feature_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_percent_contribution(fs_ptr, feature_names));
    return rcpp_result_gen;
END_RCPP
}
// compute_response_curve
DataFrame compute_response_curve(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names, int var_index, int n_steps);
RcppExport SEXP _maxentcpp_compute_response_curve(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP, SEXP var_indexSEXP, SEXP n_stepsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    Rcpp::traits::input_parameter< int >::type var_index(var_indexSEXP);
    Rcpp::traits::input_parameter< int >::type n_steps(n_stepsSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_response_curve(fs_ptr, grid_ptrs, feature_names, var_index, n_steps));
    return rcpp_result_gen;
END_RCPP
}
// compute_response_curve_fixed
DataFrame compute_response_curve_fixed(SEXP fs_ptr, NumericVector fixed_values, CharacterVector feature_names, int var_index, double var_min, double var_max, int n_steps);
RcppExport SEXP _maxentcpp_compute_response_curve_fixed(SEXP fs_ptrSEXP, SEXP fixed_valuesSEXP, SEXP feature_namesSEXP, SEXP var_indexSEXP, SEXP var_minSEXP, SEXP var_maxSEXP, SEXP n_stepsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type fixed_values(fixed_valuesSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    Rcpp::traits::input_parameter< int >::type var_index(var_indexSEXP);
    Rcpp::traits::input_parameter< double >::type var_min(var_minSEXP);
    Rcpp::traits::input_parameter< double >::type var_max(var_maxSEXP);
    Rcpp::traits::input_parameter< int >::type n_steps(n_stepsSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_response_curve_fixed(fs_ptr, fixed_values, feature_names, var_index, var_min, var_max, n_steps));
    return rcpp_result_gen;
END_RCPP
}
// clamp_grids
List clamp_grids(List grid_ptrs, NumericVector var_mins, NumericVector var_maxs);
RcppExport SEXP _maxentcpp_clamp_grids(SEXP grid_ptrsSEXP, SEXP var_minsSEXP, SEXP var_maxsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type var_mins(var_minsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type var_maxs(var_maxsSEXP);
    rcpp_result_gen = Rcpp::wrap(clamp_grids(grid_ptrs, var_mins, var_maxs));
    return rcpp_result_gen;
END_RCPP
}
// compute_variable_ranges
DataFrame compute_variable_ranges(List grid_ptrs);
RcppExport SEXP _maxentcpp_compute_variable_ranges(SEXP grid_ptrsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_variable_ranges(grid_ptrs));
    return rcpp_result_gen;
END_RCPP
}
// compute_mess
List compute_mess(List grid_ptrs, List reference_values, CharacterVector feature_names);
RcppExport SEXP _maxentcpp_compute_mess(SEXP grid_ptrsSEXP, SEXP reference_valuesSEXP, SEXP feature_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< List >::type reference_values(reference_valuesSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_mess(grid_ptrs, reference_values, feature_names));
    return rcpp_result_gen;
END_RCPP
}
// compute_mess_range
List compute_mess_range(List grid_ptrs, NumericVector var_mins, NumericVector var_maxs);
RcppExport SEXP _maxentcpp_compute_mess_range(SEXP grid_ptrsSEXP, SEXP var_minsSEXP, SEXP var_maxsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type var_mins(var_minsSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type var_maxs(var_maxsSEXP);
    rcpp_result_gen = Rcpp::wrap(compute_mess_range(grid_ptrs, var_mins, var_maxs));
    return rcpp_result_gen;
END_RCPP
}
// eval_auc
List eval_auc(NumericVector presence, NumericVector absence);
RcppExport SEXP _maxentcpp_eval_auc(SEXP presenceSEXP, SEXP absenceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type presence(presenceSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absence(absenceSEXP);
    rcpp_result_gen = Rcpp::wrap(eval_auc(presence, absence));
    return rcpp_result_gen;
END_RCPP
}
// eval_correlation
double eval_correlation(NumericVector x, NumericVector y);
RcppExport SEXP _maxentcpp_eval_correlation(SEXP xSEXP, SEXP ySEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type x(xSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type y(ySEXP);
    rcpp_result_gen = Rcpp::wrap(eval_correlation(x, y));
    return rcpp_result_gen;
END_RCPP
}
// eval_logloss
double eval_logloss(NumericVector presence, NumericVector absence);
RcppExport SEXP _maxentcpp_eval_logloss(SEXP presenceSEXP, SEXP absenceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type presence(presenceSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absence(absenceSEXP);
    rcpp_result_gen = Rcpp::wrap(eval_logloss(presence, absence));
    return rcpp_result_gen;
END_RCPP
}
// eval_square_error
double eval_square_error(NumericVector presence, NumericVector absence);
RcppExport SEXP _maxentcpp_eval_square_error(SEXP presenceSEXP, SEXP absenceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type presence(presenceSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absence(absenceSEXP);
    rcpp_result_gen = Rcpp::wrap(eval_square_error(presence, absence));
    return rcpp_result_gen;
END_RCPP
}
// eval_misclassification
double eval_misclassification(NumericVector presence, NumericVector absence);
RcppExport SEXP _maxentcpp_eval_misclassification(SEXP presenceSEXP, SEXP absenceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type presence(presenceSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absence(absenceSEXP);
    rcpp_result_gen = Rcpp::wrap(eval_misclassification(presence, absence));
    return rcpp_result_gen;
END_RCPP
}
// eval_model
List eval_model(NumericVector presence, NumericVector absence);
RcppExport SEXP _maxentcpp_eval_model(SEXP presenceSEXP, SEXP absenceSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< NumericVector >::type presence(presenceSEXP);
    Rcpp::traits::input_parameter< NumericVector >::type absence(absenceSEXP);
    rcpp_result_gen = Rcpp::wrap(eval_model(presence, absence));
    return rcpp_result_gen;
END_RCPP
}
// project_raw
SEXP project_raw(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names);
RcppExport SEXP _maxentcpp_project_raw(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(project_raw(fs_ptr, grid_ptrs, feature_names));
    return rcpp_result_gen;
END_RCPP
}
// project_cloglog
SEXP project_cloglog(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names);
RcppExport SEXP _maxentcpp_project_cloglog(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(project_cloglog(fs_ptr, grid_ptrs, feature_names));
    return rcpp_result_gen;
END_RCPP
}
// project_logistic
SEXP project_logistic(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names);
RcppExport SEXP _maxentcpp_project_logistic(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    rcpp_result_gen = Rcpp::wrap(project_logistic(fs_ptr, grid_ptrs, feature_names));
    return rcpp_result_gen;
END_RCPP
}
// extract_predictions_raw
NumericVector extract_predictions_raw(SEXP fs_ptr, List grid_ptrs, CharacterVector feature_names, IntegerVector rows, IntegerVector cols);
RcppExport SEXP _maxentcpp_extract_predictions_raw(SEXP fs_ptrSEXP, SEXP grid_ptrsSEXP, SEXP feature_namesSEXP, SEXP rowsSEXP, SEXP colsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< SEXP >::type fs_ptr(fs_ptrSEXP);
    Rcpp::traits::input_parameter< List >::type grid_ptrs(grid_ptrsSEXP);
    Rcpp::traits::input_parameter< CharacterVector >::type feature_names(feature_namesSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type rows(rowsSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type cols(colsSEXP);
    rcpp_result_gen = Rcpp::wrap(extract_predictions_raw(fs_ptr, grid_ptrs, feature_names, rows, cols));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_maxentcpp_maxent_featured_space_create", (DL_FUNC) &_maxentcpp_maxent_featured_space_create, 4},
    {"_maxentcpp_maxent_train", (DL_FUNC) &_maxentcpp_maxent_train, 5},
    {"_maxentcpp_maxent_predict", (DL_FUNC) &_maxentcpp_maxent_predict, 2},
    {"_maxentcpp_maxent_get_weights", (DL_FUNC) &_maxentcpp_maxent_get_weights, 1},
    {"_maxentcpp_maxent_get_entropy", (DL_FUNC) &_maxentcpp_maxent_get_entropy, 1},
    {"_maxentcpp_maxent_get_loss", (DL_FUNC) &_maxentcpp_maxent_get_loss, 1},
    {"_maxentcpp_maxent_write_lambdas", (DL_FUNC) &_maxentcpp_maxent_write_lambdas, 2},
    {"_maxentcpp_maxent_read_lambdas", (DL_FUNC) &_maxentcpp_maxent_read_lambdas, 2},
    {"_maxentcpp_maxent_set_sample_expectations", (DL_FUNC) &_maxentcpp_maxent_set_sample_expectations, 3},
    {"_maxentcpp_maxent_sequential_train", (DL_FUNC) &_maxentcpp_maxent_sequential_train, 8},
    {"_maxentcpp_maxent_featured_space_info", (DL_FUNC) &_maxentcpp_maxent_featured_space_info, 1},
    {"_maxentcpp_maxent_set_streaming_eval", (DL_FUNC) &_maxentcpp_maxent_set_streaming_eval, 2},
    {"_maxentcpp_maxent_featured_space_from_callback", (DL_FUNC) &_maxentcpp_maxent_featured_space_from_callback, 10},
    {"_maxentcpp_maxent_featured_space_from_spatraster_callback", (DL_FUNC) &_maxentcpp_maxent_featured_space_from_spatraster_callback, 13},
    {"_maxentcpp_maxent_extract_occurrence_from_callback", (DL_FUNC) &_maxentcpp_maxent_extract_occurrence_from_callback, 6},
    {"_maxentcpp_create_linear_feature", (DL_FUNC) &_maxentcpp_create_linear_feature, 4},
    {"_maxentcpp_create_quadratic_feature", (DL_FUNC) &_maxentcpp_create_quadratic_feature, 4},
    {"_maxentcpp_create_product_feature", (DL_FUNC) &_maxentcpp_create_product_feature, 7},
    {"_maxentcpp_create_threshold_feature", (DL_FUNC) &_maxentcpp_create_threshold_feature, 3},
    {"_maxentcpp_create_hinge_feature", (DL_FUNC) &_maxentcpp_create_hinge_feature, 5},
    {"_maxentcpp_feature_eval", (DL_FUNC) &_maxentcpp_feature_eval, 2},
    {"_maxentcpp_feature_get_info", (DL_FUNC) &_maxentcpp_feature_get_info, 1},
    {"_maxentcpp_generate_features", (DL_FUNC) &_maxentcpp_generate_features, 4},
    {"_maxentcpp_grid_read_asc", (DL_FUNC) &_maxentcpp_grid_read_asc, 1},
    {"_maxentcpp_grid_write_asc", (DL_FUNC) &_maxentcpp_grid_write_asc, 3},
    {"_maxentcpp_grid_read_file", (DL_FUNC) &_maxentcpp_grid_read_file, 1},
    {"_maxentcpp_grid_float_info", (DL_FUNC) &_maxentcpp_grid_float_info, 1},
    {"_maxentcpp_grid_float_to_matrix", (DL_FUNC) &_maxentcpp_grid_float_to_matrix, 1},
    {"_maxentcpp_grid_float_from_matrix", (DL_FUNC) &_maxentcpp_grid_float_from_matrix, 6},
    {"_maxentcpp_csv_open", (DL_FUNC) &_maxentcpp_csv_open, 2},
    {"_maxentcpp_csv_headers", (DL_FUNC) &_maxentcpp_csv_headers, 1},
    {"_maxentcpp_csv_next_record", (DL_FUNC) &_maxentcpp_csv_next_record, 1},
    {"_maxentcpp_csv_read_double_column", (DL_FUNC) &_maxentcpp_csv_read_double_column, 2},
    {"_maxentcpp_csv_close", (DL_FUNC) &_maxentcpp_csv_close, 1},
    {"_maxentcpp_csv_writer_open", (DL_FUNC) &_maxentcpp_csv_writer_open, 3},
    {"_maxentcpp_csv_writer_print", (DL_FUNC) &_maxentcpp_csv_writer_print, 3},
    {"_maxentcpp_csv_writer_print_double", (DL_FUNC) &_maxentcpp_csv_writer_print_double, 3},
    {"_maxentcpp_csv_writer_println", (DL_FUNC) &_maxentcpp_csv_writer_println, 1},
    {"_maxentcpp_csv_writer_close", (DL_FUNC) &_maxentcpp_csv_writer_close, 1},
    {"_maxentcpp_create_layer", (DL_FUNC) &_maxentcpp_create_layer, 2},
    {"_maxentcpp_get_layer_info", (DL_FUNC) &_maxentcpp_get_layer_info, 1},
    {"_maxentcpp_layer_name_from_path", (DL_FUNC) &_maxentcpp_layer_name_from_path, 1},
    {"_maxentcpp_create_grid_dimension", (DL_FUNC) &_maxentcpp_create_grid_dimension, 5},
    {"_maxentcpp_get_grid_dimension_info", (DL_FUNC) &_maxentcpp_get_grid_dimension_info, 1},
    {"_maxentcpp_coords_to_rowcol", (DL_FUNC) &_maxentcpp_coords_to_rowcol, 3},
    {"_maxentcpp_create_sample", (DL_FUNC) &_maxentcpp_create_sample, 6},
    {"_maxentcpp_get_sample_info", (DL_FUNC) &_maxentcpp_get_sample_info, 1},
    {"_maxentcpp_sample_set_feature", (DL_FUNC) &_maxentcpp_sample_set_feature, 3},
    {"_maxentcpp_sample_get_feature", (DL_FUNC) &_maxentcpp_sample_get_feature, 3},
    {"_maxentcpp_create_grid_float", (DL_FUNC) &_maxentcpp_create_grid_float, 3},
    {"_maxentcpp_grid_get_value", (DL_FUNC) &_maxentcpp_grid_get_value, 3},
    {"_maxentcpp_grid_set_value", (DL_FUNC) &_maxentcpp_grid_set_value, 4},
    {"_maxentcpp_grid_has_data", (DL_FUNC) &_maxentcpp_grid_has_data, 3},
    {"_maxentcpp_grid_to_matrix", (DL_FUNC) &_maxentcpp_grid_to_matrix, 1},
    {"_maxentcpp_grid_get_values_batch", (DL_FUNC) &_maxentcpp_grid_get_values_batch, 3},
    {"_maxentcpp_grid_from_matrix", (DL_FUNC) &_maxentcpp_grid_from_matrix, 2},
    {"_maxentcpp_compute_permutation_importance", (DL_FUNC) &_maxentcpp_compute_permutation_importance, 8},
    {"_maxentcpp_compute_percent_contribution", (DL_FUNC) &_maxentcpp_compute_percent_contribution, 2},
    {"_maxentcpp_compute_response_curve", (DL_FUNC) &_maxentcpp_compute_response_curve, 5},
    {"_maxentcpp_compute_response_curve_fixed", (DL_FUNC) &_maxentcpp_compute_response_curve_fixed, 7},
    {"_maxentcpp_clamp_grids", (DL_FUNC) &_maxentcpp_clamp_grids, 3},
    {"_maxentcpp_compute_variable_ranges", (DL_FUNC) &_maxentcpp_compute_variable_ranges, 1},
    {"_maxentcpp_compute_mess", (DL_FUNC) &_maxentcpp_compute_mess, 3},
    {"_maxentcpp_compute_mess_range", (DL_FUNC) &_maxentcpp_compute_mess_range, 3},
    {"_maxentcpp_eval_auc", (DL_FUNC) &_maxentcpp_eval_auc, 2},
    {"_maxentcpp_eval_correlation", (DL_FUNC) &_maxentcpp_eval_correlation, 2},
    {"_maxentcpp_eval_logloss", (DL_FUNC) &_maxentcpp_eval_logloss, 2},
    {"_maxentcpp_eval_square_error", (DL_FUNC) &_maxentcpp_eval_square_error, 2},
    {"_maxentcpp_eval_misclassification", (DL_FUNC) &_maxentcpp_eval_misclassification, 2},
    {"_maxentcpp_eval_model", (DL_FUNC) &_maxentcpp_eval_model, 2},
    {"_maxentcpp_project_raw", (DL_FUNC) &_maxentcpp_project_raw, 3},
    {"_maxentcpp_project_cloglog", (DL_FUNC) &_maxentcpp_project_cloglog, 3},
    {"_maxentcpp_project_logistic", (DL_FUNC) &_maxentcpp_project_logistic, 3},
    {"_maxentcpp_extract_predictions_raw", (DL_FUNC) &_maxentcpp_extract_predictions_raw, 5},
    {NULL, NULL, 0}
};

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