2017-01-13 02:32:17 -05:00
|
|
|
#ifndef OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
|
|
|
|
#define OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
|
2016-01-07 13:19:55 -05:00
|
|
|
|
2017-01-13 02:32:17 -05:00
|
|
|
#include "contractor/contractor_graph.hpp"
|
2016-01-07 13:19:55 -05:00
|
|
|
|
2017-08-19 18:01:35 -04:00
|
|
|
#include <tuple>
|
2016-01-07 13:19:55 -05:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace contractor
|
|
|
|
{
|
|
|
|
|
2017-08-19 18:01:35 -04:00
|
|
|
using LevelAndCore = std::tuple<std::vector<float>, std::vector<bool>>;
|
2016-01-07 13:19:55 -05:00
|
|
|
|
2017-08-19 18:01:35 -04:00
|
|
|
LevelAndCore contractGraph(ContractorGraph &graph,
|
|
|
|
std::vector<float> cached_node_levels,
|
|
|
|
std::vector<EdgeWeight> node_weights,
|
|
|
|
double core_factor = 1.0);
|
2017-08-19 07:01:32 -04:00
|
|
|
|
2017-08-19 18:01:35 -04:00
|
|
|
// Overload for contracting withcout cache
|
|
|
|
inline LevelAndCore contractGraph(ContractorGraph &graph,
|
|
|
|
std::vector<EdgeWeight> node_weights,
|
|
|
|
double core_factor = 1.0)
|
|
|
|
{
|
|
|
|
return contractGraph(graph, {}, std::move(node_weights), core_factor);
|
|
|
|
}
|
2016-01-07 13:19:55 -05:00
|
|
|
|
|
|
|
|
2017-01-13 02:32:17 -05:00
|
|
|
} // namespace contractor
|
|
|
|
} // namespace osrm
|
|
|
|
|
|
|
|
#endif // OSRM_CONTRACTOR_GRAPH_CONTRACTOR_HPP
|