Distances on Directed Graphs in R
at main 467 lines 29 kB view raw
1// Generated by using Rcpp::compileAttributes() -> do not edit by hand 2// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 3 4#include <RcppThread.h> 5#include <Rcpp.h> 6 7using namespace Rcpp; 8 9#ifdef RCPP_USE_GLOBAL_ROSTREAM 10Rcpp::Rostream<true>& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); 11Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); 12#endif 13 14// rcpp_centrality 15Rcpp::NumericVector rcpp_centrality(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, const std::string& heap_type, const double dist_threshold, const bool edge_centrality, const int sample); 16RcppExport SEXP _dodgr_rcpp_centrality(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP heap_typeSEXP, SEXP dist_thresholdSEXP, SEXP edge_centralitySEXP, SEXP sampleSEXP) { 17BEGIN_RCPP 18 Rcpp::RObject rcpp_result_gen; 19 Rcpp::RNGScope rcpp_rngScope_gen; 20 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 21 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 22 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 23 Rcpp::traits::input_parameter< const double >::type dist_threshold(dist_thresholdSEXP); 24 Rcpp::traits::input_parameter< const bool >::type edge_centrality(edge_centralitySEXP); 25 Rcpp::traits::input_parameter< const int >::type sample(sampleSEXP); 26 rcpp_result_gen = Rcpp::wrap(rcpp_centrality(graph, vert_map_in, heap_type, dist_threshold, edge_centrality, sample)); 27 return rcpp_result_gen; 28END_RCPP 29} 30// rcpp_concaveman 31Rcpp::DataFrame rcpp_concaveman(Rcpp::DataFrame xy, Rcpp::NumericVector hull_in, const double concavity, const double length_threshold); 32RcppExport SEXP _dodgr_rcpp_concaveman(SEXP xySEXP, SEXP hull_inSEXP, SEXP concavitySEXP, SEXP length_thresholdSEXP) { 33BEGIN_RCPP 34 Rcpp::RObject rcpp_result_gen; 35 Rcpp::RNGScope rcpp_rngScope_gen; 36 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type xy(xySEXP); 37 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type hull_in(hull_inSEXP); 38 Rcpp::traits::input_parameter< const double >::type concavity(concavitySEXP); 39 Rcpp::traits::input_parameter< const double >::type length_threshold(length_thresholdSEXP); 40 rcpp_result_gen = Rcpp::wrap(rcpp_concaveman(xy, hull_in, concavity, length_threshold)); 41 return rcpp_result_gen; 42END_RCPP 43} 44// rcpp_deduplicate 45Rcpp::DataFrame rcpp_deduplicate(const Rcpp::DataFrame& graph, const std::string fr_col, const std::string to_col, const std::string d_col, const std::string t_col); 46RcppExport SEXP _dodgr_rcpp_deduplicate(SEXP graphSEXP, SEXP fr_colSEXP, SEXP to_colSEXP, SEXP d_colSEXP, SEXP t_colSEXP) { 47BEGIN_RCPP 48 Rcpp::RObject rcpp_result_gen; 49 Rcpp::RNGScope rcpp_rngScope_gen; 50 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph(graphSEXP); 51 Rcpp::traits::input_parameter< const std::string >::type fr_col(fr_colSEXP); 52 Rcpp::traits::input_parameter< const std::string >::type to_col(to_colSEXP); 53 Rcpp::traits::input_parameter< const std::string >::type d_col(d_colSEXP); 54 Rcpp::traits::input_parameter< const std::string >::type t_col(t_colSEXP); 55 rcpp_result_gen = Rcpp::wrap(rcpp_deduplicate(graph, fr_col, to_col, d_col, t_col)); 56 return rcpp_result_gen; 57END_RCPP 58} 59// rcpp_aggregate_to_sf 60Rcpp::List rcpp_aggregate_to_sf(const Rcpp::DataFrame& graph_full, const Rcpp::DataFrame& graph_contr, const Rcpp::DataFrame& edge_map); 61RcppExport SEXP _dodgr_rcpp_aggregate_to_sf(SEXP graph_fullSEXP, SEXP graph_contrSEXP, SEXP edge_mapSEXP) { 62BEGIN_RCPP 63 Rcpp::RObject rcpp_result_gen; 64 Rcpp::RNGScope rcpp_rngScope_gen; 65 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph_full(graph_fullSEXP); 66 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph_contr(graph_contrSEXP); 67 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type edge_map(edge_mapSEXP); 68 rcpp_result_gen = Rcpp::wrap(rcpp_aggregate_to_sf(graph_full, graph_contr, edge_map)); 69 return rcpp_result_gen; 70END_RCPP 71} 72// rcpp_flows_aggregate_par 73Rcpp::NumericVector rcpp_flows_aggregate_par(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, Rcpp::NumericMatrix flows, const bool norm_sums, const double tol, const std::string heap_type); 74RcppExport SEXP _dodgr_rcpp_flows_aggregate_par(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP flowsSEXP, SEXP norm_sumsSEXP, SEXP tolSEXP, SEXP heap_typeSEXP) { 75BEGIN_RCPP 76 Rcpp::RObject rcpp_result_gen; 77 Rcpp::RNGScope rcpp_rngScope_gen; 78 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 79 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 80 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 81 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 82 Rcpp::traits::input_parameter< Rcpp::NumericMatrix >::type flows(flowsSEXP); 83 Rcpp::traits::input_parameter< const bool >::type norm_sums(norm_sumsSEXP); 84 Rcpp::traits::input_parameter< const double >::type tol(tolSEXP); 85 Rcpp::traits::input_parameter< const std::string >::type heap_type(heap_typeSEXP); 86 rcpp_result_gen = Rcpp::wrap(rcpp_flows_aggregate_par(graph, vert_map_in, fromi, toi_in, flows, norm_sums, tol, heap_type)); 87 return rcpp_result_gen; 88END_RCPP 89} 90// rcpp_flows_aggregate_pairwise 91Rcpp::NumericVector rcpp_flows_aggregate_pairwise(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi, Rcpp::NumericVector flows, const bool norm_sums, const double tol, const std::string heap_type); 92RcppExport SEXP _dodgr_rcpp_flows_aggregate_pairwise(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toiSEXP, SEXP flowsSEXP, SEXP norm_sumsSEXP, SEXP tolSEXP, SEXP heap_typeSEXP) { 93BEGIN_RCPP 94 Rcpp::RObject rcpp_result_gen; 95 Rcpp::RNGScope rcpp_rngScope_gen; 96 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 97 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 98 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 99 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi(toiSEXP); 100 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type flows(flowsSEXP); 101 Rcpp::traits::input_parameter< const bool >::type norm_sums(norm_sumsSEXP); 102 Rcpp::traits::input_parameter< const double >::type tol(tolSEXP); 103 Rcpp::traits::input_parameter< const std::string >::type heap_type(heap_typeSEXP); 104 rcpp_result_gen = Rcpp::wrap(rcpp_flows_aggregate_pairwise(graph, vert_map_in, fromi, toi, flows, norm_sums, tol, heap_type)); 105 return rcpp_result_gen; 106END_RCPP 107} 108// rcpp_flows_disperse_par 109Rcpp::NumericVector rcpp_flows_disperse_par(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::NumericVector k, Rcpp::NumericVector dens, const double& tol, std::string heap_type); 110RcppExport SEXP _dodgr_rcpp_flows_disperse_par(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP kSEXP, SEXP densSEXP, SEXP tolSEXP, SEXP heap_typeSEXP) { 111BEGIN_RCPP 112 Rcpp::RObject rcpp_result_gen; 113 Rcpp::RNGScope rcpp_rngScope_gen; 114 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 115 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 116 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 117 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type k(kSEXP); 118 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type dens(densSEXP); 119 Rcpp::traits::input_parameter< const double& >::type tol(tolSEXP); 120 Rcpp::traits::input_parameter< std::string >::type heap_type(heap_typeSEXP); 121 rcpp_result_gen = Rcpp::wrap(rcpp_flows_disperse_par(graph, vert_map_in, fromi, k, dens, tol, heap_type)); 122 return rcpp_result_gen; 123END_RCPP 124} 125// rcpp_flows_si 126Rcpp::NumericVector rcpp_flows_si(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, Rcpp::NumericVector kvec, Rcpp::NumericVector dens_from, Rcpp::NumericVector dens_to, const bool norm_sums, const double tol, const std::string heap_type); 127RcppExport SEXP _dodgr_rcpp_flows_si(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP kvecSEXP, SEXP dens_fromSEXP, SEXP dens_toSEXP, SEXP norm_sumsSEXP, SEXP tolSEXP, SEXP heap_typeSEXP) { 128BEGIN_RCPP 129 Rcpp::RObject rcpp_result_gen; 130 Rcpp::RNGScope rcpp_rngScope_gen; 131 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 132 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 133 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 134 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 135 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type kvec(kvecSEXP); 136 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type dens_from(dens_fromSEXP); 137 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type dens_to(dens_toSEXP); 138 Rcpp::traits::input_parameter< const bool >::type norm_sums(norm_sumsSEXP); 139 Rcpp::traits::input_parameter< const double >::type tol(tolSEXP); 140 Rcpp::traits::input_parameter< const std::string >::type heap_type(heap_typeSEXP); 141 rcpp_result_gen = Rcpp::wrap(rcpp_flows_si(graph, vert_map_in, fromi, toi_in, kvec, dens_from, dens_to, norm_sums, tol, heap_type)); 142 return rcpp_result_gen; 143END_RCPP 144} 145// rcpp_fundamental_cycles 146Rcpp::List rcpp_fundamental_cycles(Rcpp::DataFrame graph, Rcpp::DataFrame verts); 147RcppExport SEXP _dodgr_rcpp_fundamental_cycles(SEXP graphSEXP, SEXP vertsSEXP) { 148BEGIN_RCPP 149 Rcpp::RObject rcpp_result_gen; 150 Rcpp::RNGScope rcpp_rngScope_gen; 151 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type graph(graphSEXP); 152 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type verts(vertsSEXP); 153 rcpp_result_gen = Rcpp::wrap(rcpp_fundamental_cycles(graph, verts)); 154 return rcpp_result_gen; 155END_RCPP 156} 157// rcpp_contract_graph 158Rcpp::List rcpp_contract_graph(const Rcpp::DataFrame& graph, Rcpp::Nullable <Rcpp::StringVector>& vertlist_in); 159RcppExport SEXP _dodgr_rcpp_contract_graph(SEXP graphSEXP, SEXP vertlist_inSEXP) { 160BEGIN_RCPP 161 Rcpp::RObject rcpp_result_gen; 162 Rcpp::RNGScope rcpp_rngScope_gen; 163 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph(graphSEXP); 164 Rcpp::traits::input_parameter< Rcpp::Nullable <Rcpp::StringVector>& >::type vertlist_in(vertlist_inSEXP); 165 rcpp_result_gen = Rcpp::wrap(rcpp_contract_graph(graph, vertlist_in)); 166 return rcpp_result_gen; 167END_RCPP 168} 169// rcpp_merge_cols 170Rcpp::NumericVector rcpp_merge_cols(Rcpp::DataFrame graph); 171RcppExport SEXP _dodgr_rcpp_merge_cols(SEXP graphSEXP) { 172BEGIN_RCPP 173 Rcpp::RObject rcpp_result_gen; 174 Rcpp::RNGScope rcpp_rngScope_gen; 175 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type graph(graphSEXP); 176 rcpp_result_gen = Rcpp::wrap(rcpp_merge_cols(graph)); 177 return rcpp_result_gen; 178END_RCPP 179} 180// rcpp_sample_graph 181Rcpp::StringVector rcpp_sample_graph(Rcpp::DataFrame graph, size_t nverts_to_sample); 182RcppExport SEXP _dodgr_rcpp_sample_graph(SEXP graphSEXP, SEXP nverts_to_sampleSEXP) { 183BEGIN_RCPP 184 Rcpp::RObject rcpp_result_gen; 185 Rcpp::RNGScope rcpp_rngScope_gen; 186 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type graph(graphSEXP); 187 Rcpp::traits::input_parameter< size_t >::type nverts_to_sample(nverts_to_sampleSEXP); 188 rcpp_result_gen = Rcpp::wrap(rcpp_sample_graph(graph, nverts_to_sample)); 189 return rcpp_result_gen; 190END_RCPP 191} 192// rcpp_get_component_vector 193Rcpp::List rcpp_get_component_vector(const Rcpp::DataFrame& graph); 194RcppExport SEXP _dodgr_rcpp_get_component_vector(SEXP graphSEXP) { 195BEGIN_RCPP 196 Rcpp::RObject rcpp_result_gen; 197 Rcpp::RNGScope rcpp_rngScope_gen; 198 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph(graphSEXP); 199 rcpp_result_gen = Rcpp::wrap(rcpp_get_component_vector(graph)); 200 return rcpp_result_gen; 201END_RCPP 202} 203// rcpp_unique_rownames 204Rcpp::DataFrame rcpp_unique_rownames(Rcpp::DataFrame xyfrom, Rcpp::DataFrame xyto, const int precision); 205RcppExport SEXP _dodgr_rcpp_unique_rownames(SEXP xyfromSEXP, SEXP xytoSEXP, SEXP precisionSEXP) { 206BEGIN_RCPP 207 Rcpp::RObject rcpp_result_gen; 208 Rcpp::RNGScope rcpp_rngScope_gen; 209 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type xyfrom(xyfromSEXP); 210 Rcpp::traits::input_parameter< Rcpp::DataFrame >::type xyto(xytoSEXP); 211 Rcpp::traits::input_parameter< const int >::type precision(precisionSEXP); 212 rcpp_result_gen = Rcpp::wrap(rcpp_unique_rownames(xyfrom, xyto, precision)); 213 return rcpp_result_gen; 214END_RCPP 215} 216// rcpp_points_index_par 217Rcpp::IntegerVector rcpp_points_index_par(const Rcpp::DataFrame& xy, Rcpp::DataFrame& pts); 218RcppExport SEXP _dodgr_rcpp_points_index_par(SEXP xySEXP, SEXP ptsSEXP) { 219BEGIN_RCPP 220 Rcpp::RObject rcpp_result_gen; 221 Rcpp::RNGScope rcpp_rngScope_gen; 222 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type xy(xySEXP); 223 Rcpp::traits::input_parameter< Rcpp::DataFrame& >::type pts(ptsSEXP); 224 rcpp_result_gen = Rcpp::wrap(rcpp_points_index_par(xy, pts)); 225 return rcpp_result_gen; 226END_RCPP 227} 228// rcpp_points_to_edges_par 229Rcpp::NumericVector rcpp_points_to_edges_par(const Rcpp::DataFrame& graph, Rcpp::DataFrame& pts); 230RcppExport SEXP _dodgr_rcpp_points_to_edges_par(SEXP graphSEXP, SEXP ptsSEXP) { 231BEGIN_RCPP 232 Rcpp::RObject rcpp_result_gen; 233 Rcpp::RNGScope rcpp_rngScope_gen; 234 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type graph(graphSEXP); 235 Rcpp::traits::input_parameter< Rcpp::DataFrame& >::type pts(ptsSEXP); 236 rcpp_result_gen = Rcpp::wrap(rcpp_points_to_edges_par(graph, pts)); 237 return rcpp_result_gen; 238END_RCPP 239} 240// rcpp_get_sp_dists_par 241Rcpp::NumericMatrix rcpp_get_sp_dists_par(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type, const bool is_spatial); 242RcppExport SEXP _dodgr_rcpp_get_sp_dists_par(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP, SEXP is_spatialSEXP) { 243BEGIN_RCPP 244 Rcpp::RObject rcpp_result_gen; 245 Rcpp::RNGScope rcpp_rngScope_gen; 246 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 247 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 248 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 249 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 250 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 251 Rcpp::traits::input_parameter< const bool >::type is_spatial(is_spatialSEXP); 252 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_par(graph, vert_map_in, fromi, toi_in, heap_type, is_spatial)); 253 return rcpp_result_gen; 254END_RCPP 255} 256// rcpp_get_sp_dists_nearest 257Rcpp::NumericVector rcpp_get_sp_dists_nearest(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type); 258RcppExport SEXP _dodgr_rcpp_get_sp_dists_nearest(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP) { 259BEGIN_RCPP 260 Rcpp::RObject rcpp_result_gen; 261 Rcpp::RNGScope rcpp_rngScope_gen; 262 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 263 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 264 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 265 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 266 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 267 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_nearest(graph, vert_map_in, fromi, toi_in, heap_type)); 268 return rcpp_result_gen; 269END_RCPP 270} 271// rcpp_get_sp_dists_paired_par 272Rcpp::NumericMatrix rcpp_get_sp_dists_paired_par(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi, const std::string& heap_type, const bool is_spatial); 273RcppExport SEXP _dodgr_rcpp_get_sp_dists_paired_par(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toiSEXP, SEXP heap_typeSEXP, SEXP is_spatialSEXP) { 274BEGIN_RCPP 275 Rcpp::RObject rcpp_result_gen; 276 Rcpp::RNGScope rcpp_rngScope_gen; 277 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 278 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 279 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 280 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi(toiSEXP); 281 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 282 Rcpp::traits::input_parameter< const bool >::type is_spatial(is_spatialSEXP); 283 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_paired_par(graph, vert_map_in, fromi, toi, heap_type, is_spatial)); 284 return rcpp_result_gen; 285END_RCPP 286} 287// rcpp_get_iso 288Rcpp::NumericMatrix rcpp_get_iso(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::NumericVector dlim, const std::string& heap_type); 289RcppExport SEXP _dodgr_rcpp_get_iso(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP dlimSEXP, SEXP heap_typeSEXP) { 290BEGIN_RCPP 291 Rcpp::RObject rcpp_result_gen; 292 Rcpp::RNGScope rcpp_rngScope_gen; 293 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 294 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 295 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 296 Rcpp::traits::input_parameter< Rcpp::NumericVector >::type dlim(dlimSEXP); 297 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 298 rcpp_result_gen = Rcpp::wrap(rcpp_get_iso(graph, vert_map_in, fromi, dlim, heap_type)); 299 return rcpp_result_gen; 300END_RCPP 301} 302// rcpp_get_sp_dists 303Rcpp::NumericMatrix rcpp_get_sp_dists(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type); 304RcppExport SEXP _dodgr_rcpp_get_sp_dists(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP) { 305BEGIN_RCPP 306 Rcpp::RObject rcpp_result_gen; 307 Rcpp::RNGScope rcpp_rngScope_gen; 308 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 309 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 310 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 311 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 312 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 313 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists(graph, vert_map_in, fromi, toi_in, heap_type)); 314 return rcpp_result_gen; 315END_RCPP 316} 317// rcpp_get_paths 318Rcpp::List rcpp_get_paths(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type); 319RcppExport SEXP _dodgr_rcpp_get_paths(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP) { 320BEGIN_RCPP 321 Rcpp::RObject rcpp_result_gen; 322 Rcpp::RNGScope rcpp_rngScope_gen; 323 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 324 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 325 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 326 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 327 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 328 rcpp_result_gen = Rcpp::wrap(rcpp_get_paths(graph, vert_map_in, fromi, toi_in, heap_type)); 329 return rcpp_result_gen; 330END_RCPP 331} 332// rcpp_get_paths_pairwise 333Rcpp::List rcpp_get_paths_pairwise(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type); 334RcppExport SEXP _dodgr_rcpp_get_paths_pairwise(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP) { 335BEGIN_RCPP 336 Rcpp::RObject rcpp_result_gen; 337 Rcpp::RNGScope rcpp_rngScope_gen; 338 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 339 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 340 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 341 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 342 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 343 rcpp_result_gen = Rcpp::wrap(rcpp_get_paths_pairwise(graph, vert_map_in, fromi, toi_in, heap_type)); 344 return rcpp_result_gen; 345END_RCPP 346} 347// rcpp_get_sp_dists_categorical 348Rcpp::NumericMatrix rcpp_get_sp_dists_categorical(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type, const bool proportions_only); 349RcppExport SEXP _dodgr_rcpp_get_sp_dists_categorical(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP, SEXP proportions_onlySEXP) { 350BEGIN_RCPP 351 Rcpp::RObject rcpp_result_gen; 352 Rcpp::RNGScope rcpp_rngScope_gen; 353 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 354 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 355 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 356 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 357 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 358 Rcpp::traits::input_parameter< const bool >::type proportions_only(proportions_onlySEXP); 359 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_categorical(graph, vert_map_in, fromi, toi_in, heap_type, proportions_only)); 360 return rcpp_result_gen; 361END_RCPP 362} 363// rcpp_get_sp_dists_categ_paired 364Rcpp::NumericMatrix rcpp_get_sp_dists_categ_paired(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, Rcpp::IntegerVector toi_in, const std::string& heap_type); 365RcppExport SEXP _dodgr_rcpp_get_sp_dists_categ_paired(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP toi_inSEXP, SEXP heap_typeSEXP) { 366BEGIN_RCPP 367 Rcpp::RObject rcpp_result_gen; 368 Rcpp::RNGScope rcpp_rngScope_gen; 369 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 370 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 371 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 372 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type toi_in(toi_inSEXP); 373 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 374 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_categ_paired(graph, vert_map_in, fromi, toi_in, heap_type)); 375 return rcpp_result_gen; 376END_RCPP 377} 378// rcpp_get_sp_dists_cat_threshold 379Rcpp::NumericMatrix rcpp_get_sp_dists_cat_threshold(const Rcpp::DataFrame graph, const Rcpp::DataFrame vert_map_in, Rcpp::IntegerVector fromi, const double dlimit, const std::string& heap_type); 380RcppExport SEXP _dodgr_rcpp_get_sp_dists_cat_threshold(SEXP graphSEXP, SEXP vert_map_inSEXP, SEXP fromiSEXP, SEXP dlimitSEXP, SEXP heap_typeSEXP) { 381BEGIN_RCPP 382 Rcpp::RObject rcpp_result_gen; 383 Rcpp::RNGScope rcpp_rngScope_gen; 384 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 385 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type vert_map_in(vert_map_inSEXP); 386 Rcpp::traits::input_parameter< Rcpp::IntegerVector >::type fromi(fromiSEXP); 387 Rcpp::traits::input_parameter< const double >::type dlimit(dlimitSEXP); 388 Rcpp::traits::input_parameter< const std::string& >::type heap_type(heap_typeSEXP); 389 rcpp_result_gen = Rcpp::wrap(rcpp_get_sp_dists_cat_threshold(graph, vert_map_in, fromi, dlimit, heap_type)); 390 return rcpp_result_gen; 391END_RCPP 392} 393// rcpp_gen_hash 394Rcpp::CharacterVector rcpp_gen_hash(const int n, const size_t hash_len); 395RcppExport SEXP _dodgr_rcpp_gen_hash(SEXP nSEXP, SEXP hash_lenSEXP) { 396BEGIN_RCPP 397 Rcpp::RObject rcpp_result_gen; 398 Rcpp::RNGScope rcpp_rngScope_gen; 399 Rcpp::traits::input_parameter< const int >::type n(nSEXP); 400 Rcpp::traits::input_parameter< const size_t >::type hash_len(hash_lenSEXP); 401 rcpp_result_gen = Rcpp::wrap(rcpp_gen_hash(n, hash_len)); 402 return rcpp_result_gen; 403END_RCPP 404} 405// rcpp_sf_as_network 406Rcpp::List rcpp_sf_as_network(const Rcpp::List& sf_lines, const Rcpp::DataFrame& pr); 407RcppExport SEXP _dodgr_rcpp_sf_as_network(SEXP sf_linesSEXP, SEXP prSEXP) { 408BEGIN_RCPP 409 Rcpp::RObject rcpp_result_gen; 410 Rcpp::RNGScope rcpp_rngScope_gen; 411 Rcpp::traits::input_parameter< const Rcpp::List& >::type sf_lines(sf_linesSEXP); 412 Rcpp::traits::input_parameter< const Rcpp::DataFrame& >::type pr(prSEXP); 413 rcpp_result_gen = Rcpp::wrap(rcpp_sf_as_network(sf_lines, pr)); 414 return rcpp_result_gen; 415END_RCPP 416} 417// rcpp_route_times 418Rcpp::List rcpp_route_times(const Rcpp::DataFrame graph, bool left_side, int turn_penalty); 419RcppExport SEXP _dodgr_rcpp_route_times(SEXP graphSEXP, SEXP left_sideSEXP, SEXP turn_penaltySEXP) { 420BEGIN_RCPP 421 Rcpp::RObject rcpp_result_gen; 422 Rcpp::RNGScope rcpp_rngScope_gen; 423 Rcpp::traits::input_parameter< const Rcpp::DataFrame >::type graph(graphSEXP); 424 Rcpp::traits::input_parameter< bool >::type left_side(left_sideSEXP); 425 Rcpp::traits::input_parameter< int >::type turn_penalty(turn_penaltySEXP); 426 rcpp_result_gen = Rcpp::wrap(rcpp_route_times(graph, left_side, turn_penalty)); 427 return rcpp_result_gen; 428END_RCPP 429} 430 431static const R_CallMethodDef CallEntries[] = { 432 {"_dodgr_rcpp_centrality", (DL_FUNC) &_dodgr_rcpp_centrality, 6}, 433 {"_dodgr_rcpp_concaveman", (DL_FUNC) &_dodgr_rcpp_concaveman, 4}, 434 {"_dodgr_rcpp_deduplicate", (DL_FUNC) &_dodgr_rcpp_deduplicate, 5}, 435 {"_dodgr_rcpp_aggregate_to_sf", (DL_FUNC) &_dodgr_rcpp_aggregate_to_sf, 3}, 436 {"_dodgr_rcpp_flows_aggregate_par", (DL_FUNC) &_dodgr_rcpp_flows_aggregate_par, 8}, 437 {"_dodgr_rcpp_flows_aggregate_pairwise", (DL_FUNC) &_dodgr_rcpp_flows_aggregate_pairwise, 8}, 438 {"_dodgr_rcpp_flows_disperse_par", (DL_FUNC) &_dodgr_rcpp_flows_disperse_par, 7}, 439 {"_dodgr_rcpp_flows_si", (DL_FUNC) &_dodgr_rcpp_flows_si, 10}, 440 {"_dodgr_rcpp_fundamental_cycles", (DL_FUNC) &_dodgr_rcpp_fundamental_cycles, 2}, 441 {"_dodgr_rcpp_contract_graph", (DL_FUNC) &_dodgr_rcpp_contract_graph, 2}, 442 {"_dodgr_rcpp_merge_cols", (DL_FUNC) &_dodgr_rcpp_merge_cols, 1}, 443 {"_dodgr_rcpp_sample_graph", (DL_FUNC) &_dodgr_rcpp_sample_graph, 2}, 444 {"_dodgr_rcpp_get_component_vector", (DL_FUNC) &_dodgr_rcpp_get_component_vector, 1}, 445 {"_dodgr_rcpp_unique_rownames", (DL_FUNC) &_dodgr_rcpp_unique_rownames, 3}, 446 {"_dodgr_rcpp_points_index_par", (DL_FUNC) &_dodgr_rcpp_points_index_par, 2}, 447 {"_dodgr_rcpp_points_to_edges_par", (DL_FUNC) &_dodgr_rcpp_points_to_edges_par, 2}, 448 {"_dodgr_rcpp_get_sp_dists_par", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_par, 6}, 449 {"_dodgr_rcpp_get_sp_dists_nearest", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_nearest, 5}, 450 {"_dodgr_rcpp_get_sp_dists_paired_par", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_paired_par, 6}, 451 {"_dodgr_rcpp_get_iso", (DL_FUNC) &_dodgr_rcpp_get_iso, 5}, 452 {"_dodgr_rcpp_get_sp_dists", (DL_FUNC) &_dodgr_rcpp_get_sp_dists, 5}, 453 {"_dodgr_rcpp_get_paths", (DL_FUNC) &_dodgr_rcpp_get_paths, 5}, 454 {"_dodgr_rcpp_get_paths_pairwise", (DL_FUNC) &_dodgr_rcpp_get_paths_pairwise, 5}, 455 {"_dodgr_rcpp_get_sp_dists_categorical", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_categorical, 6}, 456 {"_dodgr_rcpp_get_sp_dists_categ_paired", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_categ_paired, 5}, 457 {"_dodgr_rcpp_get_sp_dists_cat_threshold", (DL_FUNC) &_dodgr_rcpp_get_sp_dists_cat_threshold, 5}, 458 {"_dodgr_rcpp_gen_hash", (DL_FUNC) &_dodgr_rcpp_gen_hash, 2}, 459 {"_dodgr_rcpp_sf_as_network", (DL_FUNC) &_dodgr_rcpp_sf_as_network, 2}, 460 {"_dodgr_rcpp_route_times", (DL_FUNC) &_dodgr_rcpp_route_times, 3}, 461 {NULL, NULL, 0} 462}; 463 464RcppExport void R_init_dodgr(DllInfo *dll) { 465 R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); 466 R_useDynamicSymbols(dll, FALSE); 467}