Permalink
Switch branches/tags
5-20-0-alpha-3 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18 5.19 5.20 45-degree-granularity KnockSoftware-network-distance-comparison algorihm/astar api/goodbye_json api/json_match api/route_json_try api/route_json bad-refactor bearing-docs bicycle/new_tests ch_isochrone_poc changelog_5.15.2 collapse-forward-first-destination compute-annotations-for-table-at-runtime conditionals/disable danpat_cache_distances danpat_enable_all_unit_tests danpat_fix_windows_1 danpat_optional_simple_snapping danpat_optional_waypoints danpat_pin_yarn danpat_snapping_for_matching danpat_table_noroute_estimate danpat_5.18_shm_fixes debug/runtime_parameters demote-trunk distances docker-ci-build-type experimental/connectivity experimental/route-sketch experimental/route_relations experimental/vtzero feature/docker-on-ubuntu feature/general_manytomany feature/grasp feature/lua_impedance feature/pearce_scc feature/stops_in_turns fewer_json_copies fix-docs-links fix/bearings-regression fix/boost_po_165 fix/lua-dirs fix_maxspeed fix/no-debug-log fix/obvious-2 fix/pkg-config-version fix/subcrash fix/undedupe fix/uturn_bearing_after fix/3076 fix/3311 fix/4286 fix/4984 gdg_trace ghoshkaj_mmaperize guidance/geojson_logging_forks guidance/geojson_logging_obvious guidance/silence-name-changes guidance/silver-bullet guidance/sub-exits guidance/use-turn-tag hack/less-stxxl implement-cache intersection-validation-pass invalidate-conditional-turns isochrone_tool junction-circular kdiluca-internal-intersection kdiluca-turn-angle-adjustments libosrm-forward-base-params libosrm-namespace-pollution macau_hongkong maneuver_straight master mld-distances-tbd moar_flames motorway/continue multi_exit_roundabout_nodes new-branch-for-nld-distances nodejs-unlimited nosudo optimize/less-mutex osrm-routed.js osrm-runner-dev-deps osx-circleci pearce_scc penalize-uturns-viterbi permissive-routability potayto_potahto pr_checklist_improvement pr_template_changelog pre5-api process_relevant_nodes_only profile/cross_traffic_penalty profile_testing profile/tuning_baseline profiles_routes_handler prototype/dump_lua prototype/fast-geojson prototype/normalized_graph real_osm_cucumber refactor/bicycle_better_push_handling refactor/bike_profile_cleanup refactor/ebgf-guidance refactor_edge_based_nodes refactor/sharedmem-locking refactor/simplify_ebn refactor/start-points renumber-remove-dummy-edges reset_master restrictions rewrite/profiles road-priorities rtree_str_packing service_road_access shared-storage-cache snapping_name_hint stabilize_alternative_tests stacktraces table_plugin_benchmark temporary-demo-server-state test-updates test-walk test/assertion_in_compare test/no-flush test_valhalla_guidance tidy-traces units-for-profiles uturn-restriction v5.20.1 v8 variant-1-1-4 version-5-6-0-cmakelists version_from_packagejson way_locations waypoint_bug
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (34 sloc) 1.31 KB
#ifndef OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
#define OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
#include "contractor/contractor_graph.hpp"
#include "util/filtered_graph.hpp"
#include <tuple>
#include <vector>
namespace osrm
{
namespace contractor
{
std::vector<bool> contractGraph(ContractorGraph &graph,
std::vector<bool> node_is_uncontracted,
std::vector<bool> node_is_contractable,
std::vector<EdgeWeight> node_weights,
double core_factor = 1.0);
// Overload for contracting all nodes
inline auto contractGraph(ContractorGraph &graph,
std::vector<EdgeWeight> node_weights,
double core_factor = 1.0)
{
return contractGraph(graph, {}, {}, std::move(node_weights), core_factor);
}
// Overload no contracted nodes
inline auto contractGraph(ContractorGraph &graph,
std::vector<bool> node_is_contractable,
std::vector<EdgeWeight> node_weights,
double core_factor = 1.0)
{
return contractGraph(
graph, {}, std::move(node_is_contractable), std::move(node_weights), core_factor);
}
} // namespace contractor
} // namespace osrm
#endif // OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP