2015-06-23 19:55:30 -04:00
|
|
|
#ifndef GEOMETRY_COMPRESSOR_HPP
|
|
|
|
#define GEOMETRY_COMPRESSOR_HPP
|
|
|
|
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "util/typedefs.hpp"
|
2015-06-23 19:55:30 -04:00
|
|
|
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "extractor/speed_profile.hpp"
|
|
|
|
#include "util/node_based_graph.hpp"
|
2015-06-23 19:55:30 -04:00
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <unordered_set>
|
|
|
|
|
2015-06-24 13:55:36 -04:00
|
|
|
class CompressedEdgeContainer;
|
2015-06-23 19:55:30 -04:00
|
|
|
class RestrictionMap;
|
|
|
|
|
|
|
|
class GraphCompressor
|
|
|
|
{
|
|
|
|
using EdgeData = NodeBasedDynamicGraph::EdgeData;
|
|
|
|
|
|
|
|
public:
|
2015-08-18 06:56:34 -04:00
|
|
|
GraphCompressor(SpeedProfileProperties speed_profile);
|
2015-06-23 19:55:30 -04:00
|
|
|
|
|
|
|
void Compress(const std::unordered_set<NodeID>& barrier_nodes,
|
|
|
|
const std::unordered_set<NodeID>& traffic_lights,
|
|
|
|
RestrictionMap& restriction_map,
|
|
|
|
NodeBasedDynamicGraph& graph,
|
2015-06-24 13:55:36 -04:00
|
|
|
CompressedEdgeContainer& geometry_compressor);
|
2015-06-23 19:55:30 -04:00
|
|
|
private:
|
|
|
|
|
|
|
|
void PrintStatistics(unsigned original_number_of_nodes,
|
|
|
|
unsigned original_number_of_edges,
|
|
|
|
const NodeBasedDynamicGraph& graph) const;
|
|
|
|
|
|
|
|
SpeedProfileProperties speed_profile;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|