isotree 0.2.2 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -1
  3. data/LICENSE.txt +2 -2
  4. data/README.md +32 -14
  5. data/ext/isotree/ext.cpp +144 -31
  6. data/ext/isotree/extconf.rb +7 -7
  7. data/lib/isotree/isolation_forest.rb +110 -30
  8. data/lib/isotree/version.rb +1 -1
  9. data/vendor/isotree/LICENSE +1 -1
  10. data/vendor/isotree/README.md +165 -27
  11. data/vendor/isotree/include/isotree.hpp +2116 -0
  12. data/vendor/isotree/include/isotree_oop.hpp +394 -0
  13. data/vendor/isotree/inst/COPYRIGHTS +132 -0
  14. data/vendor/isotree/src/RcppExports.cpp +594 -57
  15. data/vendor/isotree/src/Rwrapper.cpp +2452 -304
  16. data/vendor/isotree/src/c_interface.cpp +958 -0
  17. data/vendor/isotree/src/crit.hpp +4236 -0
  18. data/vendor/isotree/src/digamma.hpp +184 -0
  19. data/vendor/isotree/src/dist.hpp +1886 -0
  20. data/vendor/isotree/src/exp_depth_table.hpp +134 -0
  21. data/vendor/isotree/src/extended.hpp +1444 -0
  22. data/vendor/isotree/src/external_facing_generic.hpp +399 -0
  23. data/vendor/isotree/src/fit_model.hpp +2401 -0
  24. data/vendor/isotree/src/{dealloc.cpp → headers_joined.hpp} +38 -22
  25. data/vendor/isotree/src/helpers_iforest.hpp +814 -0
  26. data/vendor/isotree/src/{impute.cpp → impute.hpp} +382 -123
  27. data/vendor/isotree/src/indexer.cpp +515 -0
  28. data/vendor/isotree/src/instantiate_template_headers.cpp +118 -0
  29. data/vendor/isotree/src/instantiate_template_headers.hpp +240 -0
  30. data/vendor/isotree/src/isoforest.hpp +1659 -0
  31. data/vendor/isotree/src/isotree.hpp +1815 -394
  32. data/vendor/isotree/src/isotree_exportable.hpp +99 -0
  33. data/vendor/isotree/src/merge_models.cpp +159 -16
  34. data/vendor/isotree/src/mult.hpp +1321 -0
  35. data/vendor/isotree/src/oop_interface.cpp +844 -0
  36. data/vendor/isotree/src/oop_interface.hpp +278 -0
  37. data/vendor/isotree/src/other_helpers.hpp +219 -0
  38. data/vendor/isotree/src/predict.hpp +1932 -0
  39. data/vendor/isotree/src/python_helpers.hpp +114 -0
  40. data/vendor/isotree/src/ref_indexer.hpp +154 -0
  41. data/vendor/isotree/src/robinmap/LICENSE +21 -0
  42. data/vendor/isotree/src/robinmap/README.md +483 -0
  43. data/vendor/isotree/src/robinmap/include/tsl/robin_growth_policy.h +406 -0
  44. data/vendor/isotree/src/robinmap/include/tsl/robin_hash.h +1639 -0
  45. data/vendor/isotree/src/robinmap/include/tsl/robin_map.h +807 -0
  46. data/vendor/isotree/src/robinmap/include/tsl/robin_set.h +660 -0
  47. data/vendor/isotree/src/serialize.cpp +4316 -139
  48. data/vendor/isotree/src/sql.cpp +143 -61
  49. data/vendor/isotree/src/subset_models.cpp +174 -0
  50. data/vendor/isotree/src/utils.hpp +3786 -0
  51. data/vendor/isotree/src/xoshiro.hpp +463 -0
  52. data/vendor/isotree/src/ziggurat.hpp +405 -0
  53. metadata +40 -105
  54. data/vendor/cereal/LICENSE +0 -24
  55. data/vendor/cereal/README.md +0 -85
  56. data/vendor/cereal/include/cereal/access.hpp +0 -351
  57. data/vendor/cereal/include/cereal/archives/adapters.hpp +0 -163
  58. data/vendor/cereal/include/cereal/archives/binary.hpp +0 -169
  59. data/vendor/cereal/include/cereal/archives/json.hpp +0 -1019
  60. data/vendor/cereal/include/cereal/archives/portable_binary.hpp +0 -334
  61. data/vendor/cereal/include/cereal/archives/xml.hpp +0 -956
  62. data/vendor/cereal/include/cereal/cereal.hpp +0 -1089
  63. data/vendor/cereal/include/cereal/details/helpers.hpp +0 -422
  64. data/vendor/cereal/include/cereal/details/polymorphic_impl.hpp +0 -796
  65. data/vendor/cereal/include/cereal/details/polymorphic_impl_fwd.hpp +0 -65
  66. data/vendor/cereal/include/cereal/details/static_object.hpp +0 -127
  67. data/vendor/cereal/include/cereal/details/traits.hpp +0 -1411
  68. data/vendor/cereal/include/cereal/details/util.hpp +0 -84
  69. data/vendor/cereal/include/cereal/external/base64.hpp +0 -134
  70. data/vendor/cereal/include/cereal/external/rapidjson/allocators.h +0 -284
  71. data/vendor/cereal/include/cereal/external/rapidjson/cursorstreamwrapper.h +0 -78
  72. data/vendor/cereal/include/cereal/external/rapidjson/document.h +0 -2652
  73. data/vendor/cereal/include/cereal/external/rapidjson/encodedstream.h +0 -299
  74. data/vendor/cereal/include/cereal/external/rapidjson/encodings.h +0 -716
  75. data/vendor/cereal/include/cereal/external/rapidjson/error/en.h +0 -74
  76. data/vendor/cereal/include/cereal/external/rapidjson/error/error.h +0 -161
  77. data/vendor/cereal/include/cereal/external/rapidjson/filereadstream.h +0 -99
  78. data/vendor/cereal/include/cereal/external/rapidjson/filewritestream.h +0 -104
  79. data/vendor/cereal/include/cereal/external/rapidjson/fwd.h +0 -151
  80. data/vendor/cereal/include/cereal/external/rapidjson/internal/biginteger.h +0 -290
  81. data/vendor/cereal/include/cereal/external/rapidjson/internal/diyfp.h +0 -271
  82. data/vendor/cereal/include/cereal/external/rapidjson/internal/dtoa.h +0 -245
  83. data/vendor/cereal/include/cereal/external/rapidjson/internal/ieee754.h +0 -78
  84. data/vendor/cereal/include/cereal/external/rapidjson/internal/itoa.h +0 -308
  85. data/vendor/cereal/include/cereal/external/rapidjson/internal/meta.h +0 -186
  86. data/vendor/cereal/include/cereal/external/rapidjson/internal/pow10.h +0 -55
  87. data/vendor/cereal/include/cereal/external/rapidjson/internal/regex.h +0 -740
  88. data/vendor/cereal/include/cereal/external/rapidjson/internal/stack.h +0 -232
  89. data/vendor/cereal/include/cereal/external/rapidjson/internal/strfunc.h +0 -69
  90. data/vendor/cereal/include/cereal/external/rapidjson/internal/strtod.h +0 -290
  91. data/vendor/cereal/include/cereal/external/rapidjson/internal/swap.h +0 -46
  92. data/vendor/cereal/include/cereal/external/rapidjson/istreamwrapper.h +0 -128
  93. data/vendor/cereal/include/cereal/external/rapidjson/memorybuffer.h +0 -70
  94. data/vendor/cereal/include/cereal/external/rapidjson/memorystream.h +0 -71
  95. data/vendor/cereal/include/cereal/external/rapidjson/msinttypes/inttypes.h +0 -316
  96. data/vendor/cereal/include/cereal/external/rapidjson/msinttypes/stdint.h +0 -300
  97. data/vendor/cereal/include/cereal/external/rapidjson/ostreamwrapper.h +0 -81
  98. data/vendor/cereal/include/cereal/external/rapidjson/pointer.h +0 -1414
  99. data/vendor/cereal/include/cereal/external/rapidjson/prettywriter.h +0 -277
  100. data/vendor/cereal/include/cereal/external/rapidjson/rapidjson.h +0 -656
  101. data/vendor/cereal/include/cereal/external/rapidjson/reader.h +0 -2230
  102. data/vendor/cereal/include/cereal/external/rapidjson/schema.h +0 -2497
  103. data/vendor/cereal/include/cereal/external/rapidjson/stream.h +0 -223
  104. data/vendor/cereal/include/cereal/external/rapidjson/stringbuffer.h +0 -121
  105. data/vendor/cereal/include/cereal/external/rapidjson/writer.h +0 -709
  106. data/vendor/cereal/include/cereal/external/rapidxml/license.txt +0 -52
  107. data/vendor/cereal/include/cereal/external/rapidxml/manual.html +0 -406
  108. data/vendor/cereal/include/cereal/external/rapidxml/rapidxml.hpp +0 -2624
  109. data/vendor/cereal/include/cereal/external/rapidxml/rapidxml_iterators.hpp +0 -175
  110. data/vendor/cereal/include/cereal/external/rapidxml/rapidxml_print.hpp +0 -428
  111. data/vendor/cereal/include/cereal/external/rapidxml/rapidxml_utils.hpp +0 -123
  112. data/vendor/cereal/include/cereal/macros.hpp +0 -154
  113. data/vendor/cereal/include/cereal/specialize.hpp +0 -139
  114. data/vendor/cereal/include/cereal/types/array.hpp +0 -79
  115. data/vendor/cereal/include/cereal/types/atomic.hpp +0 -55
  116. data/vendor/cereal/include/cereal/types/base_class.hpp +0 -203
  117. data/vendor/cereal/include/cereal/types/bitset.hpp +0 -176
  118. data/vendor/cereal/include/cereal/types/boost_variant.hpp +0 -164
  119. data/vendor/cereal/include/cereal/types/chrono.hpp +0 -72
  120. data/vendor/cereal/include/cereal/types/common.hpp +0 -129
  121. data/vendor/cereal/include/cereal/types/complex.hpp +0 -56
  122. data/vendor/cereal/include/cereal/types/concepts/pair_associative_container.hpp +0 -73
  123. data/vendor/cereal/include/cereal/types/deque.hpp +0 -62
  124. data/vendor/cereal/include/cereal/types/forward_list.hpp +0 -68
  125. data/vendor/cereal/include/cereal/types/functional.hpp +0 -43
  126. data/vendor/cereal/include/cereal/types/list.hpp +0 -62
  127. data/vendor/cereal/include/cereal/types/map.hpp +0 -36
  128. data/vendor/cereal/include/cereal/types/memory.hpp +0 -425
  129. data/vendor/cereal/include/cereal/types/optional.hpp +0 -66
  130. data/vendor/cereal/include/cereal/types/polymorphic.hpp +0 -483
  131. data/vendor/cereal/include/cereal/types/queue.hpp +0 -132
  132. data/vendor/cereal/include/cereal/types/set.hpp +0 -103
  133. data/vendor/cereal/include/cereal/types/stack.hpp +0 -76
  134. data/vendor/cereal/include/cereal/types/string.hpp +0 -61
  135. data/vendor/cereal/include/cereal/types/tuple.hpp +0 -123
  136. data/vendor/cereal/include/cereal/types/unordered_map.hpp +0 -36
  137. data/vendor/cereal/include/cereal/types/unordered_set.hpp +0 -99
  138. data/vendor/cereal/include/cereal/types/utility.hpp +0 -47
  139. data/vendor/cereal/include/cereal/types/valarray.hpp +0 -89
  140. data/vendor/cereal/include/cereal/types/variant.hpp +0 -109
  141. data/vendor/cereal/include/cereal/types/vector.hpp +0 -112
  142. data/vendor/cereal/include/cereal/version.hpp +0 -52
  143. data/vendor/isotree/src/Makevars +0 -4
  144. data/vendor/isotree/src/crit.cpp +0 -912
  145. data/vendor/isotree/src/dist.cpp +0 -749
  146. data/vendor/isotree/src/extended.cpp +0 -790
  147. data/vendor/isotree/src/fit_model.cpp +0 -1090
  148. data/vendor/isotree/src/helpers_iforest.cpp +0 -324
  149. data/vendor/isotree/src/isoforest.cpp +0 -771
  150. data/vendor/isotree/src/mult.cpp +0 -607
  151. data/vendor/isotree/src/predict.cpp +0 -853
  152. data/vendor/isotree/src/utils.cpp +0 -1566
@@ -5,12 +5,16 @@
5
5
 
6
6
  using namespace Rcpp;
7
7
 
8
+ #ifdef RCPP_USE_GLOBAL_ROSTREAM
9
+ Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get();
10
+ Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
11
+ #endif
12
+
8
13
  // deserialize_IsoForest
9
14
  SEXP deserialize_IsoForest(Rcpp::RawVector src);
10
15
  RcppExport SEXP _isotree_deserialize_IsoForest(SEXP srcSEXP) {
11
16
  BEGIN_RCPP
12
17
  Rcpp::RObject rcpp_result_gen;
13
- Rcpp::RNGScope rcpp_rngScope_gen;
14
18
  Rcpp::traits::input_parameter< Rcpp::RawVector >::type src(srcSEXP);
15
19
  rcpp_result_gen = Rcpp::wrap(deserialize_IsoForest(src));
16
20
  return rcpp_result_gen;
@@ -21,7 +25,6 @@ SEXP deserialize_ExtIsoForest(Rcpp::RawVector src);
21
25
  RcppExport SEXP _isotree_deserialize_ExtIsoForest(SEXP srcSEXP) {
22
26
  BEGIN_RCPP
23
27
  Rcpp::RObject rcpp_result_gen;
24
- Rcpp::RNGScope rcpp_rngScope_gen;
25
28
  Rcpp::traits::input_parameter< Rcpp::RawVector >::type src(srcSEXP);
26
29
  rcpp_result_gen = Rcpp::wrap(deserialize_ExtIsoForest(src));
27
30
  return rcpp_result_gen;
@@ -32,29 +35,76 @@ SEXP deserialize_Imputer(Rcpp::RawVector src);
32
35
  RcppExport SEXP _isotree_deserialize_Imputer(SEXP srcSEXP) {
33
36
  BEGIN_RCPP
34
37
  Rcpp::RObject rcpp_result_gen;
35
- Rcpp::RNGScope rcpp_rngScope_gen;
36
38
  Rcpp::traits::input_parameter< Rcpp::RawVector >::type src(srcSEXP);
37
39
  rcpp_result_gen = Rcpp::wrap(deserialize_Imputer(src));
38
40
  return rcpp_result_gen;
39
41
  END_RCPP
40
42
  }
41
- // check_null_ptr_model
42
- Rcpp::LogicalVector check_null_ptr_model(SEXP ptr_model);
43
- RcppExport SEXP _isotree_check_null_ptr_model(SEXP ptr_modelSEXP) {
43
+ // deserialize_Indexer
44
+ SEXP deserialize_Indexer(Rcpp::RawVector src);
45
+ RcppExport SEXP _isotree_deserialize_Indexer(SEXP srcSEXP) {
46
+ BEGIN_RCPP
47
+ Rcpp::RObject rcpp_result_gen;
48
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type src(srcSEXP);
49
+ rcpp_result_gen = Rcpp::wrap(deserialize_Indexer(src));
50
+ return rcpp_result_gen;
51
+ END_RCPP
52
+ }
53
+ // serialize_IsoForest_from_ptr
54
+ SEXP serialize_IsoForest_from_ptr(SEXP R_ptr);
55
+ RcppExport SEXP _isotree_serialize_IsoForest_from_ptr(SEXP R_ptrSEXP) {
56
+ BEGIN_RCPP
57
+ Rcpp::RObject rcpp_result_gen;
58
+ Rcpp::traits::input_parameter< SEXP >::type R_ptr(R_ptrSEXP);
59
+ rcpp_result_gen = Rcpp::wrap(serialize_IsoForest_from_ptr(R_ptr));
60
+ return rcpp_result_gen;
61
+ END_RCPP
62
+ }
63
+ // serialize_ExtIsoForest_from_ptr
64
+ SEXP serialize_ExtIsoForest_from_ptr(SEXP R_ptr);
65
+ RcppExport SEXP _isotree_serialize_ExtIsoForest_from_ptr(SEXP R_ptrSEXP) {
66
+ BEGIN_RCPP
67
+ Rcpp::RObject rcpp_result_gen;
68
+ Rcpp::traits::input_parameter< SEXP >::type R_ptr(R_ptrSEXP);
69
+ rcpp_result_gen = Rcpp::wrap(serialize_ExtIsoForest_from_ptr(R_ptr));
70
+ return rcpp_result_gen;
71
+ END_RCPP
72
+ }
73
+ // serialize_Imputer_from_ptr
74
+ SEXP serialize_Imputer_from_ptr(SEXP R_ptr);
75
+ RcppExport SEXP _isotree_serialize_Imputer_from_ptr(SEXP R_ptrSEXP) {
76
+ BEGIN_RCPP
77
+ Rcpp::RObject rcpp_result_gen;
78
+ Rcpp::traits::input_parameter< SEXP >::type R_ptr(R_ptrSEXP);
79
+ rcpp_result_gen = Rcpp::wrap(serialize_Imputer_from_ptr(R_ptr));
80
+ return rcpp_result_gen;
81
+ END_RCPP
82
+ }
83
+ // serialize_Indexer_from_ptr
84
+ SEXP serialize_Indexer_from_ptr(SEXP R_ptr);
85
+ RcppExport SEXP _isotree_serialize_Indexer_from_ptr(SEXP R_ptrSEXP) {
86
+ BEGIN_RCPP
87
+ Rcpp::RObject rcpp_result_gen;
88
+ Rcpp::traits::input_parameter< SEXP >::type R_ptr(R_ptrSEXP);
89
+ rcpp_result_gen = Rcpp::wrap(serialize_Indexer_from_ptr(R_ptr));
90
+ return rcpp_result_gen;
91
+ END_RCPP
92
+ }
93
+ // check_null_ptr_model_internal
94
+ Rcpp::LogicalVector check_null_ptr_model_internal(SEXP ptr_model);
95
+ RcppExport SEXP _isotree_check_null_ptr_model_internal(SEXP ptr_modelSEXP) {
44
96
  BEGIN_RCPP
45
97
  Rcpp::RObject rcpp_result_gen;
46
- Rcpp::RNGScope rcpp_rngScope_gen;
47
98
  Rcpp::traits::input_parameter< SEXP >::type ptr_model(ptr_modelSEXP);
48
- rcpp_result_gen = Rcpp::wrap(check_null_ptr_model(ptr_model));
99
+ rcpp_result_gen = Rcpp::wrap(check_null_ptr_model_internal(ptr_model));
49
100
  return rcpp_result_gen;
50
101
  END_RCPP
51
102
  }
52
103
  // fit_model
53
- Rcpp::List fit_model(Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::IntegerVector ncat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector sample_weights, Rcpp::NumericVector col_weights, size_t nrows, size_t ncols_numeric, size_t ncols_categ, size_t ndim, size_t ntry, Rcpp::CharacterVector coef_type, bool coef_by_prop, bool with_replacement, bool weight_as_sample, size_t sample_size, size_t ntrees, size_t max_depth, bool limit_depth, bool penalize_range, bool calc_dist, bool standardize_dist, bool sq_dist, bool calc_depth, bool standardize_depth, bool weigh_by_kurt, double prob_pick_by_gain_avg, double prob_split_by_gain_avg, double prob_pick_by_gain_pl, double prob_split_by_gain_pl, double min_gain, Rcpp::CharacterVector cat_split_type, Rcpp::CharacterVector new_cat_action, Rcpp::CharacterVector missing_action, bool all_perm, bool build_imputer, bool output_imputations, size_t min_imp_obs, Rcpp::CharacterVector depth_imp, Rcpp::CharacterVector weigh_imp_rows, int random_seed, bool handle_interrupt, int nthreads);
54
- RcppExport SEXP _isotree_fit_model(SEXP X_numSEXP, SEXP X_catSEXP, SEXP ncatSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP sample_weightsSEXP, SEXP col_weightsSEXP, SEXP nrowsSEXP, SEXP ncols_numericSEXP, SEXP ncols_categSEXP, SEXP ndimSEXP, SEXP ntrySEXP, SEXP coef_typeSEXP, SEXP coef_by_propSEXP, SEXP with_replacementSEXP, SEXP weight_as_sampleSEXP, SEXP sample_sizeSEXP, SEXP ntreesSEXP, SEXP max_depthSEXP, SEXP limit_depthSEXP, SEXP penalize_rangeSEXP, SEXP calc_distSEXP, SEXP standardize_distSEXP, SEXP sq_distSEXP, SEXP calc_depthSEXP, SEXP standardize_depthSEXP, SEXP weigh_by_kurtSEXP, SEXP prob_pick_by_gain_avgSEXP, SEXP prob_split_by_gain_avgSEXP, SEXP prob_pick_by_gain_plSEXP, SEXP prob_split_by_gain_plSEXP, SEXP min_gainSEXP, SEXP cat_split_typeSEXP, SEXP new_cat_actionSEXP, SEXP missing_actionSEXP, SEXP all_permSEXP, SEXP build_imputerSEXP, SEXP output_imputationsSEXP, SEXP min_imp_obsSEXP, SEXP depth_impSEXP, SEXP weigh_imp_rowsSEXP, SEXP random_seedSEXP, SEXP handle_interruptSEXP, SEXP nthreadsSEXP) {
104
+ Rcpp::List fit_model(Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::IntegerVector ncat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector sample_weights, Rcpp::NumericVector col_weights, size_t nrows, size_t ncols_numeric, size_t ncols_categ, size_t ndim, size_t ntry, Rcpp::CharacterVector coef_type, bool coef_by_prop, bool with_replacement, bool weight_as_sample, size_t sample_size, size_t ntrees, size_t max_depth, size_t ncols_per_tree, bool limit_depth, bool penalize_range, bool standardize_data, Rcpp::CharacterVector scoring_metric, bool fast_bratio, bool calc_dist, bool standardize_dist, bool sq_dist, bool calc_depth, bool standardize_depth, bool weigh_by_kurt, double prob_pick_by_gain_pl, double prob_pick_by_gain_avg, double prob_pick_by_full_gain, double prob_pick_by_dens, double prob_pick_col_by_range, double prob_pick_col_by_var, double prob_pick_col_by_kurt, double min_gain, Rcpp::CharacterVector cat_split_type, Rcpp::CharacterVector new_cat_action, Rcpp::CharacterVector missing_action, bool all_perm, bool build_imputer, bool output_imputations, size_t min_imp_obs, Rcpp::CharacterVector depth_imp, Rcpp::CharacterVector weigh_imp_rows, int random_seed, bool use_long_double, int nthreads, bool lazy_serialization);
105
+ RcppExport SEXP _isotree_fit_model(SEXP X_numSEXP, SEXP X_catSEXP, SEXP ncatSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP sample_weightsSEXP, SEXP col_weightsSEXP, SEXP nrowsSEXP, SEXP ncols_numericSEXP, SEXP ncols_categSEXP, SEXP ndimSEXP, SEXP ntrySEXP, SEXP coef_typeSEXP, SEXP coef_by_propSEXP, SEXP with_replacementSEXP, SEXP weight_as_sampleSEXP, SEXP sample_sizeSEXP, SEXP ntreesSEXP, SEXP max_depthSEXP, SEXP ncols_per_treeSEXP, SEXP limit_depthSEXP, SEXP penalize_rangeSEXP, SEXP standardize_dataSEXP, SEXP scoring_metricSEXP, SEXP fast_bratioSEXP, SEXP calc_distSEXP, SEXP standardize_distSEXP, SEXP sq_distSEXP, SEXP calc_depthSEXP, SEXP standardize_depthSEXP, SEXP weigh_by_kurtSEXP, SEXP prob_pick_by_gain_plSEXP, SEXP prob_pick_by_gain_avgSEXP, SEXP prob_pick_by_full_gainSEXP, SEXP prob_pick_by_densSEXP, SEXP prob_pick_col_by_rangeSEXP, SEXP prob_pick_col_by_varSEXP, SEXP prob_pick_col_by_kurtSEXP, SEXP min_gainSEXP, SEXP cat_split_typeSEXP, SEXP new_cat_actionSEXP, SEXP missing_actionSEXP, SEXP all_permSEXP, SEXP build_imputerSEXP, SEXP output_imputationsSEXP, SEXP min_imp_obsSEXP, SEXP depth_impSEXP, SEXP weigh_imp_rowsSEXP, SEXP random_seedSEXP, SEXP use_long_doubleSEXP, SEXP nthreadsSEXP, SEXP lazy_serializationSEXP) {
55
106
  BEGIN_RCPP
56
107
  Rcpp::RObject rcpp_result_gen;
57
- Rcpp::RNGScope rcpp_rngScope_gen;
58
108
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type X_num(X_numSEXP);
59
109
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat(X_catSEXP);
60
110
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type ncat(ncatSEXP);
@@ -75,18 +125,25 @@ BEGIN_RCPP
75
125
  Rcpp::traits::input_parameter< size_t >::type sample_size(sample_sizeSEXP);
76
126
  Rcpp::traits::input_parameter< size_t >::type ntrees(ntreesSEXP);
77
127
  Rcpp::traits::input_parameter< size_t >::type max_depth(max_depthSEXP);
128
+ Rcpp::traits::input_parameter< size_t >::type ncols_per_tree(ncols_per_treeSEXP);
78
129
  Rcpp::traits::input_parameter< bool >::type limit_depth(limit_depthSEXP);
79
130
  Rcpp::traits::input_parameter< bool >::type penalize_range(penalize_rangeSEXP);
131
+ Rcpp::traits::input_parameter< bool >::type standardize_data(standardize_dataSEXP);
132
+ Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type scoring_metric(scoring_metricSEXP);
133
+ Rcpp::traits::input_parameter< bool >::type fast_bratio(fast_bratioSEXP);
80
134
  Rcpp::traits::input_parameter< bool >::type calc_dist(calc_distSEXP);
81
135
  Rcpp::traits::input_parameter< bool >::type standardize_dist(standardize_distSEXP);
82
136
  Rcpp::traits::input_parameter< bool >::type sq_dist(sq_distSEXP);
83
137
  Rcpp::traits::input_parameter< bool >::type calc_depth(calc_depthSEXP);
84
138
  Rcpp::traits::input_parameter< bool >::type standardize_depth(standardize_depthSEXP);
85
139
  Rcpp::traits::input_parameter< bool >::type weigh_by_kurt(weigh_by_kurtSEXP);
86
- Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_avg(prob_pick_by_gain_avgSEXP);
87
- Rcpp::traits::input_parameter< double >::type prob_split_by_gain_avg(prob_split_by_gain_avgSEXP);
88
140
  Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_pl(prob_pick_by_gain_plSEXP);
89
- Rcpp::traits::input_parameter< double >::type prob_split_by_gain_pl(prob_split_by_gain_plSEXP);
141
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_avg(prob_pick_by_gain_avgSEXP);
142
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_full_gain(prob_pick_by_full_gainSEXP);
143
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_dens(prob_pick_by_densSEXP);
144
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_range(prob_pick_col_by_rangeSEXP);
145
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_var(prob_pick_col_by_varSEXP);
146
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_kurt(prob_pick_col_by_kurtSEXP);
90
147
  Rcpp::traits::input_parameter< double >::type min_gain(min_gainSEXP);
91
148
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type cat_split_type(cat_split_typeSEXP);
92
149
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type new_cat_action(new_cat_actionSEXP);
@@ -98,19 +155,22 @@ BEGIN_RCPP
98
155
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type depth_imp(depth_impSEXP);
99
156
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type weigh_imp_rows(weigh_imp_rowsSEXP);
100
157
  Rcpp::traits::input_parameter< int >::type random_seed(random_seedSEXP);
101
- Rcpp::traits::input_parameter< bool >::type handle_interrupt(handle_interruptSEXP);
158
+ Rcpp::traits::input_parameter< bool >::type use_long_double(use_long_doubleSEXP);
102
159
  Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
103
- rcpp_result_gen = Rcpp::wrap(fit_model(X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, with_replacement, weight_as_sample, sample_size, ntrees, max_depth, limit_depth, penalize_range, calc_dist, standardize_dist, sq_dist, calc_depth, standardize_depth, weigh_by_kurt, prob_pick_by_gain_avg, prob_split_by_gain_avg, prob_pick_by_gain_pl, prob_split_by_gain_pl, min_gain, cat_split_type, new_cat_action, missing_action, all_perm, build_imputer, output_imputations, min_imp_obs, depth_imp, weigh_imp_rows, random_seed, handle_interrupt, nthreads));
160
+ Rcpp::traits::input_parameter< bool >::type lazy_serialization(lazy_serializationSEXP);
161
+ rcpp_result_gen = Rcpp::wrap(fit_model(X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, with_replacement, weight_as_sample, sample_size, ntrees, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, scoring_metric, fast_bratio, calc_dist, standardize_dist, sq_dist, calc_depth, standardize_depth, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, all_perm, build_imputer, output_imputations, min_imp_obs, depth_imp, weigh_imp_rows, random_seed, use_long_double, nthreads, lazy_serialization));
104
162
  return rcpp_result_gen;
105
163
  END_RCPP
106
164
  }
107
165
  // fit_tree
108
- Rcpp::RawVector fit_tree(SEXP model_R_ptr, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::IntegerVector ncat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector sample_weights, Rcpp::NumericVector col_weights, size_t nrows, size_t ncols_numeric, size_t ncols_categ, size_t ndim, size_t ntry, Rcpp::CharacterVector coef_type, bool coef_by_prop, size_t max_depth, bool limit_depth, bool penalize_range, bool weigh_by_kurt, double prob_pick_by_gain_avg, double prob_split_by_gain_avg, double prob_pick_by_gain_pl, double prob_split_by_gain_pl, double min_gain, Rcpp::CharacterVector cat_split_type, Rcpp::CharacterVector new_cat_action, Rcpp::CharacterVector missing_action, bool build_imputer, size_t min_imp_obs, SEXP imp_R_ptr, Rcpp::CharacterVector depth_imp, Rcpp::CharacterVector weigh_imp_rows, bool all_perm, uint64_t random_seed);
109
- RcppExport SEXP _isotree_fit_tree(SEXP model_R_ptrSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP ncatSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP sample_weightsSEXP, SEXP col_weightsSEXP, SEXP nrowsSEXP, SEXP ncols_numericSEXP, SEXP ncols_categSEXP, SEXP ndimSEXP, SEXP ntrySEXP, SEXP coef_typeSEXP, SEXP coef_by_propSEXP, SEXP max_depthSEXP, SEXP limit_depthSEXP, SEXP penalize_rangeSEXP, SEXP weigh_by_kurtSEXP, SEXP prob_pick_by_gain_avgSEXP, SEXP prob_split_by_gain_avgSEXP, SEXP prob_pick_by_gain_plSEXP, SEXP prob_split_by_gain_plSEXP, SEXP min_gainSEXP, SEXP cat_split_typeSEXP, SEXP new_cat_actionSEXP, SEXP missing_actionSEXP, SEXP build_imputerSEXP, SEXP min_imp_obsSEXP, SEXP imp_R_ptrSEXP, SEXP depth_impSEXP, SEXP weigh_imp_rowsSEXP, SEXP all_permSEXP, SEXP random_seedSEXP) {
166
+ void fit_tree(SEXP model_R_ptr, Rcpp::RawVector serialized_obj, Rcpp::RawVector serialized_imputer, SEXP indexer_R_ptr, Rcpp::RawVector serialized_indexer, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::IntegerVector ncat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector sample_weights, Rcpp::NumericVector col_weights, size_t nrows, size_t ncols_numeric, size_t ncols_categ, size_t ndim, size_t ntry, Rcpp::CharacterVector coef_type, bool coef_by_prop, size_t max_depth, size_t ncols_per_tree, bool limit_depth, bool penalize_range, bool standardize_data, bool fast_bratio, bool weigh_by_kurt, double prob_pick_by_gain_pl, double prob_pick_by_gain_avg, double prob_pick_by_full_gain, double prob_pick_by_dens, double prob_pick_col_by_range, double prob_pick_col_by_var, double prob_pick_col_by_kurt, double min_gain, Rcpp::CharacterVector cat_split_type, Rcpp::CharacterVector new_cat_action, Rcpp::CharacterVector missing_action, bool build_imputer, size_t min_imp_obs, SEXP imp_R_ptr, Rcpp::CharacterVector depth_imp, Rcpp::CharacterVector weigh_imp_rows, bool all_perm, Rcpp::NumericVector ref_X_num, Rcpp::IntegerVector ref_X_cat, Rcpp::NumericVector ref_Xc, Rcpp::IntegerVector ref_Xc_ind, Rcpp::IntegerVector ref_Xc_indptr, uint64_t random_seed, bool use_long_double, Rcpp::List& model_cpp_obj_update, Rcpp::List& model_params_update, bool is_altrepped);
167
+ RcppExport SEXP _isotree_fit_tree(SEXP model_R_ptrSEXP, SEXP serialized_objSEXP, SEXP serialized_imputerSEXP, SEXP indexer_R_ptrSEXP, SEXP serialized_indexerSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP ncatSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP sample_weightsSEXP, SEXP col_weightsSEXP, SEXP nrowsSEXP, SEXP ncols_numericSEXP, SEXP ncols_categSEXP, SEXP ndimSEXP, SEXP ntrySEXP, SEXP coef_typeSEXP, SEXP coef_by_propSEXP, SEXP max_depthSEXP, SEXP ncols_per_treeSEXP, SEXP limit_depthSEXP, SEXP penalize_rangeSEXP, SEXP standardize_dataSEXP, SEXP fast_bratioSEXP, SEXP weigh_by_kurtSEXP, SEXP prob_pick_by_gain_plSEXP, SEXP prob_pick_by_gain_avgSEXP, SEXP prob_pick_by_full_gainSEXP, SEXP prob_pick_by_densSEXP, SEXP prob_pick_col_by_rangeSEXP, SEXP prob_pick_col_by_varSEXP, SEXP prob_pick_col_by_kurtSEXP, SEXP min_gainSEXP, SEXP cat_split_typeSEXP, SEXP new_cat_actionSEXP, SEXP missing_actionSEXP, SEXP build_imputerSEXP, SEXP min_imp_obsSEXP, SEXP imp_R_ptrSEXP, SEXP depth_impSEXP, SEXP weigh_imp_rowsSEXP, SEXP all_permSEXP, SEXP ref_X_numSEXP, SEXP ref_X_catSEXP, SEXP ref_XcSEXP, SEXP ref_Xc_indSEXP, SEXP ref_Xc_indptrSEXP, SEXP random_seedSEXP, SEXP use_long_doubleSEXP, SEXP model_cpp_obj_updateSEXP, SEXP model_params_updateSEXP, SEXP is_altreppedSEXP) {
110
168
  BEGIN_RCPP
111
- Rcpp::RObject rcpp_result_gen;
112
- Rcpp::RNGScope rcpp_rngScope_gen;
113
169
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
170
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_obj(serialized_objSEXP);
171
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_imputer(serialized_imputerSEXP);
172
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
173
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_indexer(serialized_indexerSEXP);
114
174
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type X_num(X_numSEXP);
115
175
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat(X_catSEXP);
116
176
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type ncat(ncatSEXP);
@@ -127,13 +187,19 @@ BEGIN_RCPP
127
187
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type coef_type(coef_typeSEXP);
128
188
  Rcpp::traits::input_parameter< bool >::type coef_by_prop(coef_by_propSEXP);
129
189
  Rcpp::traits::input_parameter< size_t >::type max_depth(max_depthSEXP);
190
+ Rcpp::traits::input_parameter< size_t >::type ncols_per_tree(ncols_per_treeSEXP);
130
191
  Rcpp::traits::input_parameter< bool >::type limit_depth(limit_depthSEXP);
131
192
  Rcpp::traits::input_parameter< bool >::type penalize_range(penalize_rangeSEXP);
193
+ Rcpp::traits::input_parameter< bool >::type standardize_data(standardize_dataSEXP);
194
+ Rcpp::traits::input_parameter< bool >::type fast_bratio(fast_bratioSEXP);
132
195
  Rcpp::traits::input_parameter< bool >::type weigh_by_kurt(weigh_by_kurtSEXP);
133
- Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_avg(prob_pick_by_gain_avgSEXP);
134
- Rcpp::traits::input_parameter< double >::type prob_split_by_gain_avg(prob_split_by_gain_avgSEXP);
135
196
  Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_pl(prob_pick_by_gain_plSEXP);
136
- Rcpp::traits::input_parameter< double >::type prob_split_by_gain_pl(prob_split_by_gain_plSEXP);
197
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_gain_avg(prob_pick_by_gain_avgSEXP);
198
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_full_gain(prob_pick_by_full_gainSEXP);
199
+ Rcpp::traits::input_parameter< double >::type prob_pick_by_dens(prob_pick_by_densSEXP);
200
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_range(prob_pick_col_by_rangeSEXP);
201
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_var(prob_pick_col_by_varSEXP);
202
+ Rcpp::traits::input_parameter< double >::type prob_pick_col_by_kurt(prob_pick_col_by_kurtSEXP);
137
203
  Rcpp::traits::input_parameter< double >::type min_gain(min_gainSEXP);
138
204
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type cat_split_type(cat_split_typeSEXP);
139
205
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type new_cat_action(new_cat_actionSEXP);
@@ -144,20 +210,30 @@ BEGIN_RCPP
144
210
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type depth_imp(depth_impSEXP);
145
211
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type weigh_imp_rows(weigh_imp_rowsSEXP);
146
212
  Rcpp::traits::input_parameter< bool >::type all_perm(all_permSEXP);
213
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type ref_X_num(ref_X_numSEXP);
214
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type ref_X_cat(ref_X_catSEXP);
215
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type ref_Xc(ref_XcSEXP);
216
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type ref_Xc_ind(ref_Xc_indSEXP);
217
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type ref_Xc_indptr(ref_Xc_indptrSEXP);
147
218
  Rcpp::traits::input_parameter< uint64_t >::type random_seed(random_seedSEXP);
148
- rcpp_result_gen = Rcpp::wrap(fit_tree(model_R_ptr, X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, max_depth, limit_depth, penalize_range, weigh_by_kurt, prob_pick_by_gain_avg, prob_split_by_gain_avg, prob_pick_by_gain_pl, prob_split_by_gain_pl, min_gain, cat_split_type, new_cat_action, missing_action, build_imputer, min_imp_obs, imp_R_ptr, depth_imp, weigh_imp_rows, all_perm, random_seed));
149
- return rcpp_result_gen;
219
+ Rcpp::traits::input_parameter< bool >::type use_long_double(use_long_doubleSEXP);
220
+ Rcpp::traits::input_parameter< Rcpp::List& >::type model_cpp_obj_update(model_cpp_obj_updateSEXP);
221
+ Rcpp::traits::input_parameter< Rcpp::List& >::type model_params_update(model_params_updateSEXP);
222
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
223
+ fit_tree(model_R_ptr, serialized_obj, serialized_imputer, indexer_R_ptr, serialized_indexer, X_num, X_cat, ncat, Xc, Xc_ind, Xc_indptr, sample_weights, col_weights, nrows, ncols_numeric, ncols_categ, ndim, ntry, coef_type, coef_by_prop, max_depth, ncols_per_tree, limit_depth, penalize_range, standardize_data, fast_bratio, weigh_by_kurt, prob_pick_by_gain_pl, prob_pick_by_gain_avg, prob_pick_by_full_gain, prob_pick_by_dens, prob_pick_col_by_range, prob_pick_col_by_var, prob_pick_col_by_kurt, min_gain, cat_split_type, new_cat_action, missing_action, build_imputer, min_imp_obs, imp_R_ptr, depth_imp, weigh_imp_rows, all_perm, ref_X_num, ref_X_cat, ref_Xc, ref_Xc_ind, ref_Xc_indptr, random_seed, use_long_double, model_cpp_obj_update, model_params_update, is_altrepped);
224
+ return R_NilValue;
150
225
  END_RCPP
151
226
  }
152
227
  // predict_iso
153
- void predict_iso(SEXP model_R_ptr, Rcpp::NumericVector outp, Rcpp::IntegerVector tree_num, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector Xr, Rcpp::IntegerVector Xr_ind, Rcpp::IntegerVector Xr_indptr, size_t nrows, int nthreads, bool standardize);
154
- RcppExport SEXP _isotree_predict_iso(SEXP model_R_ptrSEXP, SEXP outpSEXP, SEXP tree_numSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP XrSEXP, SEXP Xr_indSEXP, SEXP Xr_indptrSEXP, SEXP nrowsSEXP, SEXP nthreadsSEXP, SEXP standardizeSEXP) {
228
+ void predict_iso(SEXP model_R_ptr, bool is_extended, SEXP indexer_R_ptr, Rcpp::NumericVector outp, Rcpp::IntegerMatrix tree_num, Rcpp::NumericMatrix tree_depths, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, Rcpp::NumericVector Xr, Rcpp::IntegerVector Xr_ind, Rcpp::IntegerVector Xr_indptr, size_t nrows, int nthreads, bool standardize);
229
+ RcppExport SEXP _isotree_predict_iso(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP, SEXP indexer_R_ptrSEXP, SEXP outpSEXP, SEXP tree_numSEXP, SEXP tree_depthsSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP XrSEXP, SEXP Xr_indSEXP, SEXP Xr_indptrSEXP, SEXP nrowsSEXP, SEXP nthreadsSEXP, SEXP standardizeSEXP) {
155
230
  BEGIN_RCPP
156
- Rcpp::RNGScope rcpp_rngScope_gen;
157
231
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
158
- Rcpp::traits::input_parameter< Rcpp::NumericVector >::type outp(outpSEXP);
159
- Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type tree_num(tree_numSEXP);
160
232
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
233
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
234
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type outp(outpSEXP);
235
+ Rcpp::traits::input_parameter< Rcpp::IntegerMatrix >::type tree_num(tree_numSEXP);
236
+ Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type tree_depths(tree_depthsSEXP);
161
237
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type X_num(X_numSEXP);
162
238
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat(X_catSEXP);
163
239
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc(XcSEXP);
@@ -169,19 +245,19 @@ BEGIN_RCPP
169
245
  Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
170
246
  Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
171
247
  Rcpp::traits::input_parameter< bool >::type standardize(standardizeSEXP);
172
- predict_iso(model_R_ptr, outp, tree_num, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, Xr, Xr_ind, Xr_indptr, nrows, nthreads, standardize);
248
+ predict_iso(model_R_ptr, is_extended, indexer_R_ptr, outp, tree_num, tree_depths, X_num, X_cat, Xc, Xc_ind, Xc_indptr, Xr, Xr_ind, Xr_indptr, nrows, nthreads, standardize);
173
249
  return R_NilValue;
174
250
  END_RCPP
175
251
  }
176
252
  // dist_iso
177
- void dist_iso(SEXP model_R_ptr, Rcpp::NumericVector tmat, Rcpp::NumericVector dmat, Rcpp::NumericVector rmat, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, size_t nrows, int nthreads, bool assume_full_distr, bool standardize_dist, bool sq_dist, size_t n_from);
178
- RcppExport SEXP _isotree_dist_iso(SEXP model_R_ptrSEXP, SEXP tmatSEXP, SEXP dmatSEXP, SEXP rmatSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP nrowsSEXP, SEXP nthreadsSEXP, SEXP assume_full_distrSEXP, SEXP standardize_distSEXP, SEXP sq_distSEXP, SEXP n_fromSEXP) {
253
+ void dist_iso(SEXP model_R_ptr, SEXP indexer_R_ptr, Rcpp::NumericVector tmat, Rcpp::NumericMatrix dmat, Rcpp::NumericMatrix rmat, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, size_t nrows, bool use_long_double, int nthreads, bool assume_full_distr, bool standardize_dist, bool sq_dist, size_t n_from, bool use_reference_points, bool as_kernel);
254
+ RcppExport SEXP _isotree_dist_iso(SEXP model_R_ptrSEXP, SEXP indexer_R_ptrSEXP, SEXP tmatSEXP, SEXP dmatSEXP, SEXP rmatSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP nrowsSEXP, SEXP use_long_doubleSEXP, SEXP nthreadsSEXP, SEXP assume_full_distrSEXP, SEXP standardize_distSEXP, SEXP sq_distSEXP, SEXP n_fromSEXP, SEXP use_reference_pointsSEXP, SEXP as_kernelSEXP) {
179
255
  BEGIN_RCPP
180
- Rcpp::RNGScope rcpp_rngScope_gen;
181
256
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
257
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
182
258
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type tmat(tmatSEXP);
183
- Rcpp::traits::input_parameter< Rcpp::NumericVector >::type dmat(dmatSEXP);
184
- Rcpp::traits::input_parameter< Rcpp::NumericVector >::type rmat(rmatSEXP);
259
+ Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type dmat(dmatSEXP);
260
+ Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type rmat(rmatSEXP);
185
261
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
186
262
  Rcpp::traits::input_parameter< Rcpp::NumericVector >::type X_num(X_numSEXP);
187
263
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat(X_catSEXP);
@@ -189,21 +265,23 @@ BEGIN_RCPP
189
265
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind(Xc_indSEXP);
190
266
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
191
267
  Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
268
+ Rcpp::traits::input_parameter< bool >::type use_long_double(use_long_doubleSEXP);
192
269
  Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
193
270
  Rcpp::traits::input_parameter< bool >::type assume_full_distr(assume_full_distrSEXP);
194
271
  Rcpp::traits::input_parameter< bool >::type standardize_dist(standardize_distSEXP);
195
272
  Rcpp::traits::input_parameter< bool >::type sq_dist(sq_distSEXP);
196
273
  Rcpp::traits::input_parameter< size_t >::type n_from(n_fromSEXP);
197
- dist_iso(model_R_ptr, tmat, dmat, rmat, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, nthreads, assume_full_distr, standardize_dist, sq_dist, n_from);
274
+ Rcpp::traits::input_parameter< bool >::type use_reference_points(use_reference_pointsSEXP);
275
+ Rcpp::traits::input_parameter< bool >::type as_kernel(as_kernelSEXP);
276
+ dist_iso(model_R_ptr, indexer_R_ptr, tmat, dmat, rmat, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, use_long_double, nthreads, assume_full_distr, standardize_dist, sq_dist, n_from, use_reference_points, as_kernel);
198
277
  return R_NilValue;
199
278
  END_RCPP
200
279
  }
201
280
  // impute_iso
202
- Rcpp::List impute_iso(SEXP model_R_ptr, SEXP imputer_R_ptr, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xr, Rcpp::IntegerVector Xr_ind, Rcpp::IntegerVector Xr_indptr, size_t nrows, int nthreads);
203
- RcppExport SEXP _isotree_impute_iso(SEXP model_R_ptrSEXP, SEXP imputer_R_ptrSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XrSEXP, SEXP Xr_indSEXP, SEXP Xr_indptrSEXP, SEXP nrowsSEXP, SEXP nthreadsSEXP) {
281
+ Rcpp::List impute_iso(SEXP model_R_ptr, SEXP imputer_R_ptr, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xr, Rcpp::IntegerVector Xr_ind, Rcpp::IntegerVector Xr_indptr, size_t nrows, bool use_long_double, int nthreads);
282
+ RcppExport SEXP _isotree_impute_iso(SEXP model_R_ptrSEXP, SEXP imputer_R_ptrSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XrSEXP, SEXP Xr_indSEXP, SEXP Xr_indptrSEXP, SEXP nrowsSEXP, SEXP use_long_doubleSEXP, SEXP nthreadsSEXP) {
204
283
  BEGIN_RCPP
205
284
  Rcpp::RObject rcpp_result_gen;
206
- Rcpp::RNGScope rcpp_rngScope_gen;
207
285
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
208
286
  Rcpp::traits::input_parameter< SEXP >::type imputer_R_ptr(imputer_R_ptrSEXP);
209
287
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
@@ -213,17 +291,79 @@ BEGIN_RCPP
213
291
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_ind(Xr_indSEXP);
214
292
  Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_indptr(Xr_indptrSEXP);
215
293
  Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
294
+ Rcpp::traits::input_parameter< bool >::type use_long_double(use_long_doubleSEXP);
216
295
  Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
217
- rcpp_result_gen = Rcpp::wrap(impute_iso(model_R_ptr, imputer_R_ptr, is_extended, X_num, X_cat, Xr, Xr_ind, Xr_indptr, nrows, nthreads));
296
+ rcpp_result_gen = Rcpp::wrap(impute_iso(model_R_ptr, imputer_R_ptr, is_extended, X_num, X_cat, Xr, Xr_ind, Xr_indptr, nrows, use_long_double, nthreads));
297
+ return rcpp_result_gen;
298
+ END_RCPP
299
+ }
300
+ // drop_imputer
301
+ void drop_imputer(bool is_altrepped, bool free_cpp, SEXP lst_imputer, Rcpp::List lst_cpp_objects, Rcpp::List lst_params);
302
+ RcppExport SEXP _isotree_drop_imputer(SEXP is_altreppedSEXP, SEXP free_cppSEXP, SEXP lst_imputerSEXP, SEXP lst_cpp_objectsSEXP, SEXP lst_paramsSEXP) {
303
+ BEGIN_RCPP
304
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
305
+ Rcpp::traits::input_parameter< bool >::type free_cpp(free_cppSEXP);
306
+ Rcpp::traits::input_parameter< SEXP >::type lst_imputer(lst_imputerSEXP);
307
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_cpp_objects(lst_cpp_objectsSEXP);
308
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_params(lst_paramsSEXP);
309
+ drop_imputer(is_altrepped, free_cpp, lst_imputer, lst_cpp_objects, lst_params);
310
+ return R_NilValue;
311
+ END_RCPP
312
+ }
313
+ // drop_indexer
314
+ void drop_indexer(bool is_altrepped, bool free_cpp, SEXP lst_indexer, Rcpp::List lst_cpp_objects, Rcpp::List lst_metadata);
315
+ RcppExport SEXP _isotree_drop_indexer(SEXP is_altreppedSEXP, SEXP free_cppSEXP, SEXP lst_indexerSEXP, SEXP lst_cpp_objectsSEXP, SEXP lst_metadataSEXP) {
316
+ BEGIN_RCPP
317
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
318
+ Rcpp::traits::input_parameter< bool >::type free_cpp(free_cppSEXP);
319
+ Rcpp::traits::input_parameter< SEXP >::type lst_indexer(lst_indexerSEXP);
320
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_cpp_objects(lst_cpp_objectsSEXP);
321
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_metadata(lst_metadataSEXP);
322
+ drop_indexer(is_altrepped, free_cpp, lst_indexer, lst_cpp_objects, lst_metadata);
323
+ return R_NilValue;
324
+ END_RCPP
325
+ }
326
+ // drop_reference_points
327
+ void drop_reference_points(bool is_altrepped, SEXP lst_indexer, Rcpp::List lst_cpp_objects, Rcpp::List lst_metadata);
328
+ RcppExport SEXP _isotree_drop_reference_points(SEXP is_altreppedSEXP, SEXP lst_indexerSEXP, SEXP lst_cpp_objectsSEXP, SEXP lst_metadataSEXP) {
329
+ BEGIN_RCPP
330
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
331
+ Rcpp::traits::input_parameter< SEXP >::type lst_indexer(lst_indexerSEXP);
332
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_cpp_objects(lst_cpp_objectsSEXP);
333
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_metadata(lst_metadataSEXP);
334
+ drop_reference_points(is_altrepped, lst_indexer, lst_cpp_objects, lst_metadata);
335
+ return R_NilValue;
336
+ END_RCPP
337
+ }
338
+ // subset_trees
339
+ Rcpp::List subset_trees(SEXP model_R_ptr, SEXP imputer_R_ptr, SEXP indexer_R_ptr, bool is_extended, bool is_altrepped, Rcpp::IntegerVector trees_take);
340
+ RcppExport SEXP _isotree_subset_trees(SEXP model_R_ptrSEXP, SEXP imputer_R_ptrSEXP, SEXP indexer_R_ptrSEXP, SEXP is_extendedSEXP, SEXP is_altreppedSEXP, SEXP trees_takeSEXP) {
341
+ BEGIN_RCPP
342
+ Rcpp::RObject rcpp_result_gen;
343
+ Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
344
+ Rcpp::traits::input_parameter< SEXP >::type imputer_R_ptr(imputer_R_ptrSEXP);
345
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
346
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
347
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
348
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type trees_take(trees_takeSEXP);
349
+ rcpp_result_gen = Rcpp::wrap(subset_trees(model_R_ptr, imputer_R_ptr, indexer_R_ptr, is_extended, is_altrepped, trees_take));
218
350
  return rcpp_result_gen;
219
351
  END_RCPP
220
352
  }
353
+ // inplace_set_to_zero
354
+ void inplace_set_to_zero(SEXP obj);
355
+ RcppExport SEXP _isotree_inplace_set_to_zero(SEXP objSEXP) {
356
+ BEGIN_RCPP
357
+ Rcpp::traits::input_parameter< SEXP >::type obj(objSEXP);
358
+ inplace_set_to_zero(obj);
359
+ return R_NilValue;
360
+ END_RCPP
361
+ }
221
362
  // get_n_nodes
222
363
  Rcpp::List get_n_nodes(SEXP model_R_ptr, bool is_extended, int nthreads);
223
364
  RcppExport SEXP _isotree_get_n_nodes(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP, SEXP nthreadsSEXP) {
224
365
  BEGIN_RCPP
225
366
  Rcpp::RObject rcpp_result_gen;
226
- Rcpp::RNGScope rcpp_rngScope_gen;
227
367
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
228
368
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
229
369
  Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
@@ -232,18 +372,24 @@ BEGIN_RCPP
232
372
  END_RCPP
233
373
  }
234
374
  // append_trees_from_other
235
- Rcpp::List append_trees_from_other(SEXP model_R_ptr, SEXP other_R_ptr, SEXP imp_R_ptr, SEXP oimp_R_ptr, bool is_extended);
236
- RcppExport SEXP _isotree_append_trees_from_other(SEXP model_R_ptrSEXP, SEXP other_R_ptrSEXP, SEXP imp_R_ptrSEXP, SEXP oimp_R_ptrSEXP, SEXP is_extendedSEXP) {
375
+ void append_trees_from_other(SEXP model_R_ptr, SEXP other_R_ptr, SEXP imp_R_ptr, SEXP oimp_R_ptr, SEXP ind_R_ptr, SEXP oind_R_ptr, bool is_extended, Rcpp::RawVector serialized_obj, Rcpp::RawVector serialized_imputer, Rcpp::RawVector serialized_indexer, Rcpp::List& model_cpp_obj_update, Rcpp::List& model_params_update, bool is_altrepped);
376
+ RcppExport SEXP _isotree_append_trees_from_other(SEXP model_R_ptrSEXP, SEXP other_R_ptrSEXP, SEXP imp_R_ptrSEXP, SEXP oimp_R_ptrSEXP, SEXP ind_R_ptrSEXP, SEXP oind_R_ptrSEXP, SEXP is_extendedSEXP, SEXP serialized_objSEXP, SEXP serialized_imputerSEXP, SEXP serialized_indexerSEXP, SEXP model_cpp_obj_updateSEXP, SEXP model_params_updateSEXP, SEXP is_altreppedSEXP) {
237
377
  BEGIN_RCPP
238
- Rcpp::RObject rcpp_result_gen;
239
- Rcpp::RNGScope rcpp_rngScope_gen;
240
378
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
241
379
  Rcpp::traits::input_parameter< SEXP >::type other_R_ptr(other_R_ptrSEXP);
242
380
  Rcpp::traits::input_parameter< SEXP >::type imp_R_ptr(imp_R_ptrSEXP);
243
381
  Rcpp::traits::input_parameter< SEXP >::type oimp_R_ptr(oimp_R_ptrSEXP);
382
+ Rcpp::traits::input_parameter< SEXP >::type ind_R_ptr(ind_R_ptrSEXP);
383
+ Rcpp::traits::input_parameter< SEXP >::type oind_R_ptr(oind_R_ptrSEXP);
244
384
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
245
- rcpp_result_gen = Rcpp::wrap(append_trees_from_other(model_R_ptr, other_R_ptr, imp_R_ptr, oimp_R_ptr, is_extended));
246
- return rcpp_result_gen;
385
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_obj(serialized_objSEXP);
386
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_imputer(serialized_imputerSEXP);
387
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_indexer(serialized_indexerSEXP);
388
+ Rcpp::traits::input_parameter< Rcpp::List& >::type model_cpp_obj_update(model_cpp_obj_updateSEXP);
389
+ Rcpp::traits::input_parameter< Rcpp::List& >::type model_params_update(model_params_updateSEXP);
390
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
391
+ append_trees_from_other(model_R_ptr, other_R_ptr, imp_R_ptr, oimp_R_ptr, ind_R_ptr, oind_R_ptr, is_extended, serialized_obj, serialized_imputer, serialized_indexer, model_cpp_obj_update, model_params_update, is_altrepped);
392
+ return R_NilValue;
247
393
  END_RCPP
248
394
  }
249
395
  // model_to_sql
@@ -251,7 +397,6 @@ Rcpp::ListOf<Rcpp::CharacterVector> model_to_sql(SEXP model_R_ptr, bool is_exten
251
397
  RcppExport SEXP _isotree_model_to_sql(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP, SEXP numeric_colanmesSEXP, SEXP categ_colnamesSEXP, SEXP categ_levelsSEXP, SEXP output_tree_numSEXP, SEXP single_treeSEXP, SEXP tree_numSEXP, SEXP nthreadsSEXP) {
252
398
  BEGIN_RCPP
253
399
  Rcpp::RObject rcpp_result_gen;
254
- Rcpp::RNGScope rcpp_rngScope_gen;
255
400
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
256
401
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
257
402
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type numeric_colanmes(numeric_colanmesSEXP);
@@ -270,7 +415,6 @@ Rcpp::CharacterVector model_to_sql_with_select_from(SEXP model_R_ptr, bool is_ex
270
415
  RcppExport SEXP _isotree_model_to_sql_with_select_from(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP, SEXP numeric_colanmesSEXP, SEXP categ_colnamesSEXP, SEXP categ_levelsSEXP, SEXP table_fromSEXP, SEXP select_asSEXP, SEXP nthreadsSEXP) {
271
416
  BEGIN_RCPP
272
417
  Rcpp::RObject rcpp_result_gen;
273
- Rcpp::RNGScope rcpp_rngScope_gen;
274
418
  Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
275
419
  Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
276
420
  Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type numeric_colanmes(numeric_colanmesSEXP);
@@ -283,25 +427,418 @@ BEGIN_RCPP
283
427
  return rcpp_result_gen;
284
428
  END_RCPP
285
429
  }
430
+ // copy_cpp_objects
431
+ Rcpp::List copy_cpp_objects(SEXP model_R_ptr, bool is_extended, SEXP imp_R_ptr, SEXP ind_R_ptr, bool lazy_serialization);
432
+ RcppExport SEXP _isotree_copy_cpp_objects(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP, SEXP imp_R_ptrSEXP, SEXP ind_R_ptrSEXP, SEXP lazy_serializationSEXP) {
433
+ BEGIN_RCPP
434
+ Rcpp::RObject rcpp_result_gen;
435
+ Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
436
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
437
+ Rcpp::traits::input_parameter< SEXP >::type imp_R_ptr(imp_R_ptrSEXP);
438
+ Rcpp::traits::input_parameter< SEXP >::type ind_R_ptr(ind_R_ptrSEXP);
439
+ Rcpp::traits::input_parameter< bool >::type lazy_serialization(lazy_serializationSEXP);
440
+ rcpp_result_gen = Rcpp::wrap(copy_cpp_objects(model_R_ptr, is_extended, imp_R_ptr, ind_R_ptr, lazy_serialization));
441
+ return rcpp_result_gen;
442
+ END_RCPP
443
+ }
444
+ // build_tree_indices
445
+ void build_tree_indices(Rcpp::List lst_cpp_objects, SEXP ptr_model, bool is_altrepped, bool is_extended, bool with_distances, int nthreads);
446
+ RcppExport SEXP _isotree_build_tree_indices(SEXP lst_cpp_objectsSEXP, SEXP ptr_modelSEXP, SEXP is_altreppedSEXP, SEXP is_extendedSEXP, SEXP with_distancesSEXP, SEXP nthreadsSEXP) {
447
+ BEGIN_RCPP
448
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_cpp_objects(lst_cpp_objectsSEXP);
449
+ Rcpp::traits::input_parameter< SEXP >::type ptr_model(ptr_modelSEXP);
450
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
451
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
452
+ Rcpp::traits::input_parameter< bool >::type with_distances(with_distancesSEXP);
453
+ Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
454
+ build_tree_indices(lst_cpp_objects, ptr_model, is_altrepped, is_extended, with_distances, nthreads);
455
+ return R_NilValue;
456
+ END_RCPP
457
+ }
458
+ // check_node_indexer_has_distances
459
+ bool check_node_indexer_has_distances(SEXP indexer_R_ptr);
460
+ RcppExport SEXP _isotree_check_node_indexer_has_distances(SEXP indexer_R_ptrSEXP) {
461
+ BEGIN_RCPP
462
+ Rcpp::RObject rcpp_result_gen;
463
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
464
+ rcpp_result_gen = Rcpp::wrap(check_node_indexer_has_distances(indexer_R_ptr));
465
+ return rcpp_result_gen;
466
+ END_RCPP
467
+ }
468
+ // set_reference_points
469
+ void set_reference_points(Rcpp::List lst_cpp_objects, SEXP ptr_model, SEXP ind_R_ptr, bool is_altrepped, Rcpp::List lst_metadata, SEXP rnames, bool is_extended, Rcpp::NumericVector X_num, Rcpp::IntegerVector X_cat, Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, size_t nrows, int nthreads, bool with_distances);
470
+ RcppExport SEXP _isotree_set_reference_points(SEXP lst_cpp_objectsSEXP, SEXP ptr_modelSEXP, SEXP ind_R_ptrSEXP, SEXP is_altreppedSEXP, SEXP lst_metadataSEXP, SEXP rnamesSEXP, SEXP is_extendedSEXP, SEXP X_numSEXP, SEXP X_catSEXP, SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP nrowsSEXP, SEXP nthreadsSEXP, SEXP with_distancesSEXP) {
471
+ BEGIN_RCPP
472
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_cpp_objects(lst_cpp_objectsSEXP);
473
+ Rcpp::traits::input_parameter< SEXP >::type ptr_model(ptr_modelSEXP);
474
+ Rcpp::traits::input_parameter< SEXP >::type ind_R_ptr(ind_R_ptrSEXP);
475
+ Rcpp::traits::input_parameter< bool >::type is_altrepped(is_altreppedSEXP);
476
+ Rcpp::traits::input_parameter< Rcpp::List >::type lst_metadata(lst_metadataSEXP);
477
+ Rcpp::traits::input_parameter< SEXP >::type rnames(rnamesSEXP);
478
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
479
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type X_num(X_numSEXP);
480
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat(X_catSEXP);
481
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc(XcSEXP);
482
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind(Xc_indSEXP);
483
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
484
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
485
+ Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
486
+ Rcpp::traits::input_parameter< bool >::type with_distances(with_distancesSEXP);
487
+ set_reference_points(lst_cpp_objects, ptr_model, ind_R_ptr, is_altrepped, lst_metadata, rnames, is_extended, X_num, X_cat, Xc, Xc_ind, Xc_indptr, nrows, nthreads, with_distances);
488
+ return R_NilValue;
489
+ END_RCPP
490
+ }
491
+ // check_node_indexer_has_references
492
+ bool check_node_indexer_has_references(SEXP indexer_R_ptr);
493
+ RcppExport SEXP _isotree_check_node_indexer_has_references(SEXP indexer_R_ptrSEXP) {
494
+ BEGIN_RCPP
495
+ Rcpp::RObject rcpp_result_gen;
496
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
497
+ rcpp_result_gen = Rcpp::wrap(check_node_indexer_has_references(indexer_R_ptr));
498
+ return rcpp_result_gen;
499
+ END_RCPP
500
+ }
501
+ // get_num_references
502
+ int get_num_references(SEXP indexer_R_ptr);
503
+ RcppExport SEXP _isotree_get_num_references(SEXP indexer_R_ptrSEXP) {
504
+ BEGIN_RCPP
505
+ Rcpp::RObject rcpp_result_gen;
506
+ Rcpp::traits::input_parameter< SEXP >::type indexer_R_ptr(indexer_R_ptrSEXP);
507
+ rcpp_result_gen = Rcpp::wrap(get_num_references(indexer_R_ptr));
508
+ return rcpp_result_gen;
509
+ END_RCPP
510
+ }
511
+ // get_null_R_pointer_internal
512
+ SEXP get_null_R_pointer_internal(bool altrepped);
513
+ RcppExport SEXP _isotree_get_null_R_pointer_internal(SEXP altreppedSEXP) {
514
+ BEGIN_RCPP
515
+ Rcpp::RObject rcpp_result_gen;
516
+ Rcpp::traits::input_parameter< bool >::type altrepped(altreppedSEXP);
517
+ rcpp_result_gen = Rcpp::wrap(get_null_R_pointer_internal(altrepped));
518
+ return rcpp_result_gen;
519
+ END_RCPP
520
+ }
521
+ // serialize_to_file
522
+ void serialize_to_file(Rcpp::RawVector serialized_obj, Rcpp::RawVector serialized_imputer, Rcpp::RawVector serialized_indexer, bool is_extended, Rcpp::RawVector metadata, Rcpp::CharacterVector fname);
523
+ RcppExport SEXP _isotree_serialize_to_file(SEXP serialized_objSEXP, SEXP serialized_imputerSEXP, SEXP serialized_indexerSEXP, SEXP is_extendedSEXP, SEXP metadataSEXP, SEXP fnameSEXP) {
524
+ BEGIN_RCPP
525
+ Rcpp::RNGScope rcpp_rngScope_gen;
526
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_obj(serialized_objSEXP);
527
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_imputer(serialized_imputerSEXP);
528
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type serialized_indexer(serialized_indexerSEXP);
529
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
530
+ Rcpp::traits::input_parameter< Rcpp::RawVector >::type metadata(metadataSEXP);
531
+ Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type fname(fnameSEXP);
532
+ serialize_to_file(serialized_obj, serialized_imputer, serialized_indexer, is_extended, metadata, fname);
533
+ return R_NilValue;
534
+ END_RCPP
535
+ }
536
+ // deserialize_from_file
537
+ Rcpp::List deserialize_from_file(Rcpp::CharacterVector fname, bool lazy_serialization);
538
+ RcppExport SEXP _isotree_deserialize_from_file(SEXP fnameSEXP, SEXP lazy_serializationSEXP) {
539
+ BEGIN_RCPP
540
+ Rcpp::RObject rcpp_result_gen;
541
+ Rcpp::RNGScope rcpp_rngScope_gen;
542
+ Rcpp::traits::input_parameter< Rcpp::CharacterVector >::type fname(fnameSEXP);
543
+ Rcpp::traits::input_parameter< bool >::type lazy_serialization(lazy_serializationSEXP);
544
+ rcpp_result_gen = Rcpp::wrap(deserialize_from_file(fname, lazy_serialization));
545
+ return rcpp_result_gen;
546
+ END_RCPP
547
+ }
548
+ // call_sort_csc_indices
549
+ void call_sort_csc_indices(Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr);
550
+ RcppExport SEXP _isotree_call_sort_csc_indices(SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP) {
551
+ BEGIN_RCPP
552
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc(XcSEXP);
553
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind(Xc_indSEXP);
554
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
555
+ call_sort_csc_indices(Xc, Xc_ind, Xc_indptr);
556
+ return R_NilValue;
557
+ END_RCPP
558
+ }
559
+ // call_reconstruct_csr_sliced
560
+ void call_reconstruct_csr_sliced(Rcpp::NumericVector orig_Xr, Rcpp::IntegerVector orig_Xr_indptr, Rcpp::NumericVector rec_Xr, Rcpp::IntegerVector rec_Xr_indptr, size_t nrows);
561
+ RcppExport SEXP _isotree_call_reconstruct_csr_sliced(SEXP orig_XrSEXP, SEXP orig_Xr_indptrSEXP, SEXP rec_XrSEXP, SEXP rec_Xr_indptrSEXP, SEXP nrowsSEXP) {
562
+ BEGIN_RCPP
563
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type orig_Xr(orig_XrSEXP);
564
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type orig_Xr_indptr(orig_Xr_indptrSEXP);
565
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type rec_Xr(rec_XrSEXP);
566
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type rec_Xr_indptr(rec_Xr_indptrSEXP);
567
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
568
+ call_reconstruct_csr_sliced(orig_Xr, orig_Xr_indptr, rec_Xr, rec_Xr_indptr, nrows);
569
+ return R_NilValue;
570
+ END_RCPP
571
+ }
572
+ // call_reconstruct_csr_with_categ
573
+ void call_reconstruct_csr_with_categ(Rcpp::NumericVector orig_Xr, Rcpp::IntegerVector orig_Xr_ind, Rcpp::IntegerVector orig_Xr_indptr, Rcpp::NumericVector rec_Xr, Rcpp::IntegerVector rec_Xr_ind, Rcpp::IntegerVector rec_Xr_indptr, Rcpp::IntegerVector rec_X_cat, Rcpp::IntegerVector cols_numeric, Rcpp::IntegerVector cols_categ, size_t nrows, size_t ncols);
574
+ RcppExport SEXP _isotree_call_reconstruct_csr_with_categ(SEXP orig_XrSEXP, SEXP orig_Xr_indSEXP, SEXP orig_Xr_indptrSEXP, SEXP rec_XrSEXP, SEXP rec_Xr_indSEXP, SEXP rec_Xr_indptrSEXP, SEXP rec_X_catSEXP, SEXP cols_numericSEXP, SEXP cols_categSEXP, SEXP nrowsSEXP, SEXP ncolsSEXP) {
575
+ BEGIN_RCPP
576
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type orig_Xr(orig_XrSEXP);
577
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type orig_Xr_ind(orig_Xr_indSEXP);
578
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type orig_Xr_indptr(orig_Xr_indptrSEXP);
579
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type rec_Xr(rec_XrSEXP);
580
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type rec_Xr_ind(rec_Xr_indSEXP);
581
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type rec_Xr_indptr(rec_Xr_indptrSEXP);
582
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type rec_X_cat(rec_X_catSEXP);
583
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_numeric(cols_numericSEXP);
584
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_categ(cols_categSEXP);
585
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
586
+ Rcpp::traits::input_parameter< size_t >::type ncols(ncolsSEXP);
587
+ call_reconstruct_csr_with_categ(orig_Xr, orig_Xr_ind, orig_Xr_indptr, rec_Xr, rec_Xr_ind, rec_Xr_indptr, rec_X_cat, cols_numeric, cols_categ, nrows, ncols);
588
+ return R_NilValue;
589
+ END_RCPP
590
+ }
591
+ // deepcopy_vector
592
+ Rcpp::NumericVector deepcopy_vector(Rcpp::NumericVector inp);
593
+ RcppExport SEXP _isotree_deepcopy_vector(SEXP inpSEXP) {
594
+ BEGIN_RCPP
595
+ Rcpp::RObject rcpp_result_gen;
596
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type inp(inpSEXP);
597
+ rcpp_result_gen = Rcpp::wrap(deepcopy_vector(inp));
598
+ return rcpp_result_gen;
599
+ END_RCPP
600
+ }
601
+ // call_take_cols_by_slice_csr
602
+ Rcpp::List call_take_cols_by_slice_csr(Rcpp::NumericVector Xr_, Rcpp::IntegerVector Xr_ind_, Rcpp::IntegerVector Xr_indptr, int ncols_take, bool as_dense);
603
+ RcppExport SEXP _isotree_call_take_cols_by_slice_csr(SEXP Xr_SEXP, SEXP Xr_ind_SEXP, SEXP Xr_indptrSEXP, SEXP ncols_takeSEXP, SEXP as_denseSEXP) {
604
+ BEGIN_RCPP
605
+ Rcpp::RObject rcpp_result_gen;
606
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xr_(Xr_SEXP);
607
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_ind_(Xr_ind_SEXP);
608
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_indptr(Xr_indptrSEXP);
609
+ Rcpp::traits::input_parameter< int >::type ncols_take(ncols_takeSEXP);
610
+ Rcpp::traits::input_parameter< bool >::type as_dense(as_denseSEXP);
611
+ rcpp_result_gen = Rcpp::wrap(call_take_cols_by_slice_csr(Xr_, Xr_ind_, Xr_indptr, ncols_take, as_dense));
612
+ return rcpp_result_gen;
613
+ END_RCPP
614
+ }
615
+ // call_take_cols_by_index_csr
616
+ Rcpp::List call_take_cols_by_index_csr(Rcpp::NumericVector Xr, Rcpp::IntegerVector Xr_ind, Rcpp::IntegerVector Xr_indptr, Rcpp::IntegerVector cols_take, bool as_dense);
617
+ RcppExport SEXP _isotree_call_take_cols_by_index_csr(SEXP XrSEXP, SEXP Xr_indSEXP, SEXP Xr_indptrSEXP, SEXP cols_takeSEXP, SEXP as_denseSEXP) {
618
+ BEGIN_RCPP
619
+ Rcpp::RObject rcpp_result_gen;
620
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xr(XrSEXP);
621
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_ind(Xr_indSEXP);
622
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xr_indptr(Xr_indptrSEXP);
623
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_take(cols_takeSEXP);
624
+ Rcpp::traits::input_parameter< bool >::type as_dense(as_denseSEXP);
625
+ rcpp_result_gen = Rcpp::wrap(call_take_cols_by_index_csr(Xr, Xr_ind, Xr_indptr, cols_take, as_dense));
626
+ return rcpp_result_gen;
627
+ END_RCPP
628
+ }
629
+ // call_take_cols_by_slice_csc
630
+ Rcpp::List call_take_cols_by_slice_csc(Rcpp::NumericVector Xc, Rcpp::IntegerVector Xc_ind, Rcpp::IntegerVector Xc_indptr, size_t ncols_take, bool as_dense, size_t nrows);
631
+ RcppExport SEXP _isotree_call_take_cols_by_slice_csc(SEXP XcSEXP, SEXP Xc_indSEXP, SEXP Xc_indptrSEXP, SEXP ncols_takeSEXP, SEXP as_denseSEXP, SEXP nrowsSEXP) {
632
+ BEGIN_RCPP
633
+ Rcpp::RObject rcpp_result_gen;
634
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc(XcSEXP);
635
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind(Xc_indSEXP);
636
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
637
+ Rcpp::traits::input_parameter< size_t >::type ncols_take(ncols_takeSEXP);
638
+ Rcpp::traits::input_parameter< bool >::type as_dense(as_denseSEXP);
639
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
640
+ rcpp_result_gen = Rcpp::wrap(call_take_cols_by_slice_csc(Xc, Xc_ind, Xc_indptr, ncols_take, as_dense, nrows));
641
+ return rcpp_result_gen;
642
+ END_RCPP
643
+ }
644
+ // call_take_cols_by_index_csc
645
+ Rcpp::List call_take_cols_by_index_csc(Rcpp::NumericVector Xc_, Rcpp::IntegerVector Xc_ind_, Rcpp::IntegerVector Xc_indptr, Rcpp::IntegerVector cols_take, bool as_dense, size_t nrows);
646
+ RcppExport SEXP _isotree_call_take_cols_by_index_csc(SEXP Xc_SEXP, SEXP Xc_ind_SEXP, SEXP Xc_indptrSEXP, SEXP cols_takeSEXP, SEXP as_denseSEXP, SEXP nrowsSEXP) {
647
+ BEGIN_RCPP
648
+ Rcpp::RObject rcpp_result_gen;
649
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc_(Xc_SEXP);
650
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind_(Xc_ind_SEXP);
651
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
652
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_take(cols_takeSEXP);
653
+ Rcpp::traits::input_parameter< bool >::type as_dense(as_denseSEXP);
654
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
655
+ rcpp_result_gen = Rcpp::wrap(call_take_cols_by_index_csc(Xc_, Xc_ind_, Xc_indptr, cols_take, as_dense, nrows));
656
+ return rcpp_result_gen;
657
+ END_RCPP
658
+ }
659
+ // copy_csc_cols_by_slice
660
+ void copy_csc_cols_by_slice(Rcpp::NumericVector out_Xc_, Rcpp::IntegerVector out_Xc_indptr, Rcpp::NumericVector from_Xc_, Rcpp::IntegerVector from_Xc_indptr, size_t n_copy);
661
+ RcppExport SEXP _isotree_copy_csc_cols_by_slice(SEXP out_Xc_SEXP, SEXP out_Xc_indptrSEXP, SEXP from_Xc_SEXP, SEXP from_Xc_indptrSEXP, SEXP n_copySEXP) {
662
+ BEGIN_RCPP
663
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type out_Xc_(out_Xc_SEXP);
664
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type out_Xc_indptr(out_Xc_indptrSEXP);
665
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type from_Xc_(from_Xc_SEXP);
666
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type from_Xc_indptr(from_Xc_indptrSEXP);
667
+ Rcpp::traits::input_parameter< size_t >::type n_copy(n_copySEXP);
668
+ copy_csc_cols_by_slice(out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, n_copy);
669
+ return R_NilValue;
670
+ END_RCPP
671
+ }
672
+ // copy_csc_cols_by_index
673
+ void copy_csc_cols_by_index(Rcpp::NumericVector out_Xc_, Rcpp::IntegerVector out_Xc_indptr, Rcpp::NumericVector from_Xc_, Rcpp::IntegerVector from_Xc_indptr, Rcpp::IntegerVector cols_copy);
674
+ RcppExport SEXP _isotree_copy_csc_cols_by_index(SEXP out_Xc_SEXP, SEXP out_Xc_indptrSEXP, SEXP from_Xc_SEXP, SEXP from_Xc_indptrSEXP, SEXP cols_copySEXP) {
675
+ BEGIN_RCPP
676
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type out_Xc_(out_Xc_SEXP);
677
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type out_Xc_indptr(out_Xc_indptrSEXP);
678
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type from_Xc_(from_Xc_SEXP);
679
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type from_Xc_indptr(from_Xc_indptrSEXP);
680
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_copy(cols_copySEXP);
681
+ copy_csc_cols_by_index(out_Xc_, out_Xc_indptr, from_Xc_, from_Xc_indptr, cols_copy);
682
+ return R_NilValue;
683
+ END_RCPP
684
+ }
685
+ // assign_csc_cols
686
+ Rcpp::List assign_csc_cols(Rcpp::NumericVector Xc_, Rcpp::IntegerVector Xc_ind_, Rcpp::IntegerVector Xc_indptr, Rcpp::IntegerVector X_cat_, Rcpp::IntegerVector cols_categ, Rcpp::IntegerVector cols_numeric, size_t nrows);
687
+ RcppExport SEXP _isotree_assign_csc_cols(SEXP Xc_SEXP, SEXP Xc_ind_SEXP, SEXP Xc_indptrSEXP, SEXP X_cat_SEXP, SEXP cols_categSEXP, SEXP cols_numericSEXP, SEXP nrowsSEXP) {
688
+ BEGIN_RCPP
689
+ Rcpp::RObject rcpp_result_gen;
690
+ Rcpp::traits::input_parameter< Rcpp::NumericVector >::type Xc_(Xc_SEXP);
691
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_ind_(Xc_ind_SEXP);
692
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type Xc_indptr(Xc_indptrSEXP);
693
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type X_cat_(X_cat_SEXP);
694
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_categ(cols_categSEXP);
695
+ Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type cols_numeric(cols_numericSEXP);
696
+ Rcpp::traits::input_parameter< size_t >::type nrows(nrowsSEXP);
697
+ rcpp_result_gen = Rcpp::wrap(assign_csc_cols(Xc_, Xc_ind_, Xc_indptr, X_cat_, cols_categ, cols_numeric, nrows));
698
+ return rcpp_result_gen;
699
+ END_RCPP
700
+ }
701
+ // get_empty_tmat
702
+ Rcpp::NumericVector get_empty_tmat(int nrows_);
703
+ RcppExport SEXP _isotree_get_empty_tmat(SEXP nrows_SEXP) {
704
+ BEGIN_RCPP
705
+ Rcpp::RObject rcpp_result_gen;
706
+ Rcpp::traits::input_parameter< int >::type nrows_(nrows_SEXP);
707
+ rcpp_result_gen = Rcpp::wrap(get_empty_tmat(nrows_));
708
+ return rcpp_result_gen;
709
+ END_RCPP
710
+ }
711
+ // get_empty_int_mat
712
+ Rcpp::IntegerMatrix get_empty_int_mat(int nrows, int ncols);
713
+ RcppExport SEXP _isotree_get_empty_int_mat(SEXP nrowsSEXP, SEXP ncolsSEXP) {
714
+ BEGIN_RCPP
715
+ Rcpp::RObject rcpp_result_gen;
716
+ Rcpp::traits::input_parameter< int >::type nrows(nrowsSEXP);
717
+ Rcpp::traits::input_parameter< int >::type ncols(ncolsSEXP);
718
+ rcpp_result_gen = Rcpp::wrap(get_empty_int_mat(nrows, ncols));
719
+ return rcpp_result_gen;
720
+ END_RCPP
721
+ }
722
+ // get_null_int_mat
723
+ Rcpp::IntegerMatrix get_null_int_mat();
724
+ RcppExport SEXP _isotree_get_null_int_mat() {
725
+ BEGIN_RCPP
726
+ Rcpp::RObject rcpp_result_gen;
727
+ rcpp_result_gen = Rcpp::wrap(get_null_int_mat());
728
+ return rcpp_result_gen;
729
+ END_RCPP
730
+ }
731
+ // get_ntrees
732
+ int get_ntrees(SEXP model_R_ptr, bool is_extended);
733
+ RcppExport SEXP _isotree_get_ntrees(SEXP model_R_ptrSEXP, SEXP is_extendedSEXP) {
734
+ BEGIN_RCPP
735
+ Rcpp::RObject rcpp_result_gen;
736
+ Rcpp::traits::input_parameter< SEXP >::type model_R_ptr(model_R_ptrSEXP);
737
+ Rcpp::traits::input_parameter< bool >::type is_extended(is_extendedSEXP);
738
+ rcpp_result_gen = Rcpp::wrap(get_ntrees(model_R_ptr, is_extended));
739
+ return rcpp_result_gen;
740
+ END_RCPP
741
+ }
742
+ // deepcopy_int
743
+ SEXP deepcopy_int(SEXP x);
744
+ RcppExport SEXP _isotree_deepcopy_int(SEXP xSEXP) {
745
+ BEGIN_RCPP
746
+ Rcpp::RObject rcpp_result_gen;
747
+ Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
748
+ rcpp_result_gen = Rcpp::wrap(deepcopy_int(x));
749
+ return rcpp_result_gen;
750
+ END_RCPP
751
+ }
752
+ // modify_R_list_inplace
753
+ void modify_R_list_inplace(SEXP lst, int ix, SEXP el);
754
+ RcppExport SEXP _isotree_modify_R_list_inplace(SEXP lstSEXP, SEXP ixSEXP, SEXP elSEXP) {
755
+ BEGIN_RCPP
756
+ Rcpp::traits::input_parameter< SEXP >::type lst(lstSEXP);
757
+ Rcpp::traits::input_parameter< int >::type ix(ixSEXP);
758
+ Rcpp::traits::input_parameter< SEXP >::type el(elSEXP);
759
+ modify_R_list_inplace(lst, ix, el);
760
+ return R_NilValue;
761
+ END_RCPP
762
+ }
763
+ // addto_R_list_inplace
764
+ void addto_R_list_inplace(Rcpp::List& lst, Rcpp::String nm, SEXP el);
765
+ RcppExport SEXP _isotree_addto_R_list_inplace(SEXP lstSEXP, SEXP nmSEXP, SEXP elSEXP) {
766
+ BEGIN_RCPP
767
+ Rcpp::traits::input_parameter< Rcpp::List& >::type lst(lstSEXP);
768
+ Rcpp::traits::input_parameter< Rcpp::String >::type nm(nmSEXP);
769
+ Rcpp::traits::input_parameter< SEXP >::type el(elSEXP);
770
+ addto_R_list_inplace(lst, nm, el);
771
+ return R_NilValue;
772
+ END_RCPP
773
+ }
774
+ // R_has_openmp
775
+ bool R_has_openmp();
776
+ RcppExport SEXP _isotree_R_has_openmp() {
777
+ BEGIN_RCPP
778
+ Rcpp::RObject rcpp_result_gen;
779
+ rcpp_result_gen = Rcpp::wrap(R_has_openmp());
780
+ return rcpp_result_gen;
781
+ END_RCPP
782
+ }
286
783
 
287
784
  static const R_CallMethodDef CallEntries[] = {
288
785
  {"_isotree_deserialize_IsoForest", (DL_FUNC) &_isotree_deserialize_IsoForest, 1},
289
786
  {"_isotree_deserialize_ExtIsoForest", (DL_FUNC) &_isotree_deserialize_ExtIsoForest, 1},
290
787
  {"_isotree_deserialize_Imputer", (DL_FUNC) &_isotree_deserialize_Imputer, 1},
291
- {"_isotree_check_null_ptr_model", (DL_FUNC) &_isotree_check_null_ptr_model, 1},
292
- {"_isotree_fit_model", (DL_FUNC) &_isotree_fit_model, 45},
293
- {"_isotree_fit_tree", (DL_FUNC) &_isotree_fit_tree, 35},
294
- {"_isotree_predict_iso", (DL_FUNC) &_isotree_predict_iso, 15},
295
- {"_isotree_dist_iso", (DL_FUNC) &_isotree_dist_iso, 16},
296
- {"_isotree_impute_iso", (DL_FUNC) &_isotree_impute_iso, 10},
788
+ {"_isotree_deserialize_Indexer", (DL_FUNC) &_isotree_deserialize_Indexer, 1},
789
+ {"_isotree_serialize_IsoForest_from_ptr", (DL_FUNC) &_isotree_serialize_IsoForest_from_ptr, 1},
790
+ {"_isotree_serialize_ExtIsoForest_from_ptr", (DL_FUNC) &_isotree_serialize_ExtIsoForest_from_ptr, 1},
791
+ {"_isotree_serialize_Imputer_from_ptr", (DL_FUNC) &_isotree_serialize_Imputer_from_ptr, 1},
792
+ {"_isotree_serialize_Indexer_from_ptr", (DL_FUNC) &_isotree_serialize_Indexer_from_ptr, 1},
793
+ {"_isotree_check_null_ptr_model_internal", (DL_FUNC) &_isotree_check_null_ptr_model_internal, 1},
794
+ {"_isotree_fit_model", (DL_FUNC) &_isotree_fit_model, 53},
795
+ {"_isotree_fit_tree", (DL_FUNC) &_isotree_fit_tree, 54},
796
+ {"_isotree_predict_iso", (DL_FUNC) &_isotree_predict_iso, 17},
797
+ {"_isotree_dist_iso", (DL_FUNC) &_isotree_dist_iso, 20},
798
+ {"_isotree_impute_iso", (DL_FUNC) &_isotree_impute_iso, 11},
799
+ {"_isotree_drop_imputer", (DL_FUNC) &_isotree_drop_imputer, 5},
800
+ {"_isotree_drop_indexer", (DL_FUNC) &_isotree_drop_indexer, 5},
801
+ {"_isotree_drop_reference_points", (DL_FUNC) &_isotree_drop_reference_points, 4},
802
+ {"_isotree_subset_trees", (DL_FUNC) &_isotree_subset_trees, 6},
803
+ {"_isotree_inplace_set_to_zero", (DL_FUNC) &_isotree_inplace_set_to_zero, 1},
297
804
  {"_isotree_get_n_nodes", (DL_FUNC) &_isotree_get_n_nodes, 3},
298
- {"_isotree_append_trees_from_other", (DL_FUNC) &_isotree_append_trees_from_other, 5},
805
+ {"_isotree_append_trees_from_other", (DL_FUNC) &_isotree_append_trees_from_other, 13},
299
806
  {"_isotree_model_to_sql", (DL_FUNC) &_isotree_model_to_sql, 9},
300
807
  {"_isotree_model_to_sql_with_select_from", (DL_FUNC) &_isotree_model_to_sql_with_select_from, 8},
808
+ {"_isotree_copy_cpp_objects", (DL_FUNC) &_isotree_copy_cpp_objects, 5},
809
+ {"_isotree_build_tree_indices", (DL_FUNC) &_isotree_build_tree_indices, 6},
810
+ {"_isotree_check_node_indexer_has_distances", (DL_FUNC) &_isotree_check_node_indexer_has_distances, 1},
811
+ {"_isotree_set_reference_points", (DL_FUNC) &_isotree_set_reference_points, 15},
812
+ {"_isotree_check_node_indexer_has_references", (DL_FUNC) &_isotree_check_node_indexer_has_references, 1},
813
+ {"_isotree_get_num_references", (DL_FUNC) &_isotree_get_num_references, 1},
814
+ {"_isotree_get_null_R_pointer_internal", (DL_FUNC) &_isotree_get_null_R_pointer_internal, 1},
815
+ {"_isotree_serialize_to_file", (DL_FUNC) &_isotree_serialize_to_file, 6},
816
+ {"_isotree_deserialize_from_file", (DL_FUNC) &_isotree_deserialize_from_file, 2},
817
+ {"_isotree_call_sort_csc_indices", (DL_FUNC) &_isotree_call_sort_csc_indices, 3},
818
+ {"_isotree_call_reconstruct_csr_sliced", (DL_FUNC) &_isotree_call_reconstruct_csr_sliced, 5},
819
+ {"_isotree_call_reconstruct_csr_with_categ", (DL_FUNC) &_isotree_call_reconstruct_csr_with_categ, 11},
820
+ {"_isotree_deepcopy_vector", (DL_FUNC) &_isotree_deepcopy_vector, 1},
821
+ {"_isotree_call_take_cols_by_slice_csr", (DL_FUNC) &_isotree_call_take_cols_by_slice_csr, 5},
822
+ {"_isotree_call_take_cols_by_index_csr", (DL_FUNC) &_isotree_call_take_cols_by_index_csr, 5},
823
+ {"_isotree_call_take_cols_by_slice_csc", (DL_FUNC) &_isotree_call_take_cols_by_slice_csc, 6},
824
+ {"_isotree_call_take_cols_by_index_csc", (DL_FUNC) &_isotree_call_take_cols_by_index_csc, 6},
825
+ {"_isotree_copy_csc_cols_by_slice", (DL_FUNC) &_isotree_copy_csc_cols_by_slice, 5},
826
+ {"_isotree_copy_csc_cols_by_index", (DL_FUNC) &_isotree_copy_csc_cols_by_index, 5},
827
+ {"_isotree_assign_csc_cols", (DL_FUNC) &_isotree_assign_csc_cols, 7},
828
+ {"_isotree_get_empty_tmat", (DL_FUNC) &_isotree_get_empty_tmat, 1},
829
+ {"_isotree_get_empty_int_mat", (DL_FUNC) &_isotree_get_empty_int_mat, 2},
830
+ {"_isotree_get_null_int_mat", (DL_FUNC) &_isotree_get_null_int_mat, 0},
831
+ {"_isotree_get_ntrees", (DL_FUNC) &_isotree_get_ntrees, 2},
832
+ {"_isotree_deepcopy_int", (DL_FUNC) &_isotree_deepcopy_int, 1},
833
+ {"_isotree_modify_R_list_inplace", (DL_FUNC) &_isotree_modify_R_list_inplace, 3},
834
+ {"_isotree_addto_R_list_inplace", (DL_FUNC) &_isotree_addto_R_list_inplace, 3},
835
+ {"_isotree_R_has_openmp", (DL_FUNC) &_isotree_R_has_openmp, 0},
301
836
  {NULL, NULL, 0}
302
837
  };
303
838
 
839
+ void init_altrepped_vectors(DllInfo* dll);
304
840
  RcppExport void R_init_isotree(DllInfo *dll) {
305
841
  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
306
842
  R_useDynamicSymbols(dll, FALSE);
843
+ init_altrepped_vectors(dll);
307
844
  }