osrm-backend/include/contractor/graph_contractor.hpp
Patrick Niklaus 61c430c098 Implement exclude flags on CH using shared core
The core is fully contracted for each exclude flag
and stored in a merged graph data structure.
2017-09-01 21:26:00 +02:00

44 lines
1.3 KiB
C++

#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