osrm-backend/include/partition/edge_based_graph.hpp
Patrick Niklaus 0266c9d969 Renumber nodes after running osrm-partition
The new numbering uses the partition information
to sort border nodes first to compactify storages
that need access indexed by border node ID.

We also get an optimized cache performance for free
sincr we can also recursively sort the nodes by cell ID.

This implements issue #3779.
2017-06-02 18:12:13 +00:00

50 lines
1.2 KiB
C++

#ifndef OSRM_EDGE_BASED_GRAPH_HPP
#define OSRM_EDGE_BASED_GRAPH_HPP
#include "extractor/edge_based_edge.hpp"
#include "storage/io.hpp"
#include "util/coordinate.hpp"
#include "util/dynamic_graph.hpp"
#include "util/typedefs.hpp"
#include <cstdint>
#include <algorithm>
#include <iterator>
#include <memory>
#include <vector>
namespace osrm
{
namespace partition
{
struct EdgeBasedGraphEdgeData : extractor::EdgeBasedEdge::EdgeData
{
using Base = extractor::EdgeBasedEdge::EdgeData;
using Base::Base;
EdgeBasedGraphEdgeData(const EdgeBasedGraphEdgeData &) = default;
EdgeBasedGraphEdgeData(EdgeBasedGraphEdgeData &&) = default;
EdgeBasedGraphEdgeData &operator=(const EdgeBasedGraphEdgeData &) = default;
EdgeBasedGraphEdgeData &operator=(EdgeBasedGraphEdgeData &&) = default;
EdgeBasedGraphEdgeData(const Base &base) : Base(base) {}
EdgeBasedGraphEdgeData() : Base() {}
};
struct DynamicEdgeBasedGraph : util::DynamicGraph<EdgeBasedGraphEdgeData>
{
using Base = util::DynamicGraph<EdgeBasedGraphEdgeData>;
using Base::Base;
};
struct DynamicEdgeBasedGraphEdge : DynamicEdgeBasedGraph::InputEdge
{
using Base = DynamicEdgeBasedGraph::InputEdge;
using Base::Base;
};
}
}
#endif