R/RcppExports.R

Defines functions rcpp_make_compact_graph rcpp_lines_as_network rcpp_router rcpp_router_prob rcpp_router_dijkstra

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

#' rcpp_make_compact_graph
#'
#' Removes nodes and edges from a graph that are not needed for routing
#'
#' @param graph graph to be processed
#' @param quiet If TRUE, display progress
#' @return \code{Rcpp::List} containing one \code{data.frame} with the compact
#' graph, one \code{data.frame} with the original graph and one
#' \code{data.frame} containing information about the relating edge ids of the
#' original and compact graph.
#'
#' @noRd
rcpp_make_compact_graph <- function(graph, quiet) {
    .Call(`_osmprob_rcpp_make_compact_graph`, graph, quiet)
}

#' rcpp_lines_as_network
#'
#' Return OSM data in Simple Features format
#'
#' @param sf_lines An sf collection of LINESTRING objects
#' @param pr Rcpp::DataFrame containing the weighting profile
#'
#' @return Rcpp::List objects of OSM data
#'
#' @noRd
rcpp_lines_as_network <- function(sf_lines, pr) {
    .Call(`_osmprob_rcpp_lines_as_network`, sf_lines, pr)
}

#' rcpp_router
#'
#' Return OSM data in Simple Features format
#'
#' @param netdf A \code{matrix} containing network connections
#' @param start_node Starting node for shortest path route
#' @param end_node Ending node for shortest path route
#' @param eta The entropy parameter
#'
#' @return Rcpp::List objects of OSM data
#'
#' @noRd
rcpp_router <- function(netdf, start_nodei, end_nodei, eta) {
    .Call(`_osmprob_rcpp_router`, netdf, start_nodei, end_nodei, eta)
}

#' rcpp_router_prob
#'
#' Return a vector of traversing probabilities
#'
#' @param netdf A \code{matrix} containing network connections
#' @param start_node Starting node for shortest path route
#' @param end_node Ending node for shortest path route
#' @param eta The entropy parameter
#'
#' @return Rcpp::NumericVector of traversing probabilities
#'
#' @noRd
rcpp_router_prob <- function(netdf, start_node, end_node, eta) {
    .Call(`_osmprob_rcpp_router_prob`, netdf, start_node, end_node, eta)
}

#' rcpp_router_dijkstra
#'
#' Return a vector containing the shortest path between two nodes on a graph
#'
#' @param netdf A \code{data.frame} containing network connections
#' @param start_node Starting node for shortest path route
#' @param end_node Ending node for shortest path route
#'
#' @return \code{Rcpp::NumericVector} with node IDs
#'
#' @noRd
rcpp_router_dijkstra <- function(netdf, start_node, end_node) {
    .Call(`_osmprob_rcpp_router_dijkstra`, netdf, start_node, end_node)
}
osm-router/osmprob documentation built on May 24, 2019, 4:53 p.m.