Refactor processing_chain by splitting into sub functions
This commit is contained in:
@@ -186,9 +186,8 @@ NodeBasedDynamicGraphFromImportEdges(int number_of_nodes, std::vector<ImportEdge
|
||||
SimpleLogger().Write() << "merged " << edges_list.size() - edge_count << " edges out of "
|
||||
<< edges_list.size();
|
||||
|
||||
auto graph = std::make_shared<NodeBasedDynamicGraph>(
|
||||
return std::make_shared<NodeBasedDynamicGraph>(
|
||||
static_cast<NodeBasedDynamicGraph::NodeIterator>(number_of_nodes), edges_list);
|
||||
return graph;
|
||||
}
|
||||
|
||||
#endif // NODE_BASED_GRAPH_HPP
|
||||
|
||||
@@ -91,6 +91,7 @@ template <> struct hash<RestrictionTarget>
|
||||
class RestrictionMap
|
||||
{
|
||||
public:
|
||||
RestrictionMap() = default;
|
||||
RestrictionMap(const std::vector<TurnRestriction> &restriction_list);
|
||||
|
||||
// Replace end v with w in each turn restriction containing u as via node
|
||||
@@ -98,7 +99,7 @@ class RestrictionMap
|
||||
void FixupArrivingTurnRestriction(const NodeID node_u,
|
||||
const NodeID node_v,
|
||||
const NodeID node_w,
|
||||
const std::shared_ptr<GraphT> &graph)
|
||||
const GraphT &graph)
|
||||
{
|
||||
BOOST_ASSERT(node_u != SPECIAL_NODEID);
|
||||
BOOST_ASSERT(node_v != SPECIAL_NODEID);
|
||||
@@ -112,9 +113,9 @@ class RestrictionMap
|
||||
// find all potential start edges. It is more efficent to get a (small) list
|
||||
// of potential start edges than iterating over all buckets
|
||||
std::vector<NodeID> predecessors;
|
||||
for (const EdgeID current_edge_id : graph->GetAdjacentEdgeRange(node_u))
|
||||
for (const EdgeID current_edge_id : graph.GetAdjacentEdgeRange(node_u))
|
||||
{
|
||||
const NodeID target = graph->GetTarget(current_edge_id);
|
||||
const NodeID target = graph.GetTarget(current_edge_id);
|
||||
if (node_v != target)
|
||||
{
|
||||
predecessors.push_back(target);
|
||||
|
||||
@@ -344,7 +344,7 @@ class StaticRTree
|
||||
StaticRTree(const StaticRTree &) = delete;
|
||||
|
||||
// Construct a packed Hilbert-R-Tree with Kamel-Faloutsos algorithm [1]
|
||||
explicit StaticRTree(std::vector<EdgeDataT> &input_data_vector,
|
||||
explicit StaticRTree(const std::vector<EdgeDataT> &input_data_vector,
|
||||
const std::string tree_node_filename,
|
||||
const std::string leaf_node_filename,
|
||||
const std::vector<QueryNode> &coordinate_list)
|
||||
|
||||
Reference in New Issue
Block a user