Prevent comment splicing from backslash at end of line
This commit is contained in:
parent
0dda98384b
commit
0d971a70cc
@ -31,33 +31,35 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
|||||||
explicit BasicRoutingInterface(DataFacadeT *facade) : facade(facade) {}
|
explicit BasicRoutingInterface(DataFacadeT *facade) : facade(facade) {}
|
||||||
~BasicRoutingInterface() {}
|
~BasicRoutingInterface() {}
|
||||||
|
|
||||||
// min_edge_offset is needed in case we use multiple
|
/*
|
||||||
// nodes as start/target nodes with different (even negative) offsets.
|
min_edge_offset is needed in case we use multiple
|
||||||
// In that case the termination criterion is not correct
|
nodes as start/target nodes with different (even negative) offsets.
|
||||||
// anymore.
|
In that case the termination criterion is not correct
|
||||||
//
|
anymore.
|
||||||
// Example:
|
|
||||||
// forward heap: a(-100), b(0),
|
Example:
|
||||||
// reverse heap: c(0), d(100)
|
forward heap: a(-100), b(0),
|
||||||
//
|
reverse heap: c(0), d(100)
|
||||||
// a --- d
|
|
||||||
// \ /
|
a --- d
|
||||||
// / \
|
\ /
|
||||||
// b --- c
|
/ \
|
||||||
//
|
b --- c
|
||||||
// This is equivalent to running a bi-directional Dijkstra on the following graph:
|
|
||||||
//
|
This is equivalent to running a bi-directional Dijkstra on the following graph:
|
||||||
// a --- d
|
|
||||||
// / \ / \
|
a --- d
|
||||||
// y x z
|
/ \ / \
|
||||||
// \ / \ /
|
y x z
|
||||||
// b --- c
|
\ / \ /
|
||||||
//
|
b --- c
|
||||||
// The graph is constructed by inserting nodes y and z that are connected to the initial nodes
|
|
||||||
// using edges (y, a) with weight -100, (y, b) with weight 0 and,
|
The graph is constructed by inserting nodes y and z that are connected to the initial nodes
|
||||||
// (d, z) with weight 100, (c, z) with weight 0 corresponding.
|
using edges (y, a) with weight -100, (y, b) with weight 0 and,
|
||||||
// Since we are dealing with a graph that contains _negative_ edges,
|
(d, z) with weight 100, (c, z) with weight 0 corresponding.
|
||||||
// we need to add an offset to the termination criterion.
|
Since we are dealing with a graph that contains _negative_ edges,
|
||||||
|
we need to add an offset to the termination criterion.
|
||||||
|
*/
|
||||||
void RoutingStep(SearchEngineData::QueryHeap &forward_heap,
|
void RoutingStep(SearchEngineData::QueryHeap &forward_heap,
|
||||||
SearchEngineData::QueryHeap &reverse_heap,
|
SearchEngineData::QueryHeap &reverse_heap,
|
||||||
NodeID &middle_node_id,
|
NodeID &middle_node_id,
|
||||||
@ -293,9 +295,12 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
|||||||
{
|
{
|
||||||
BOOST_ASSERT(i < id_vector.size());
|
BOOST_ASSERT(i < id_vector.size());
|
||||||
BOOST_ASSERT(phantom_node_pair.target_phantom.forward_travel_mode > 0);
|
BOOST_ASSERT(phantom_node_pair.target_phantom.forward_travel_mode > 0);
|
||||||
unpacked_path.emplace_back(PathData{
|
unpacked_path.emplace_back(
|
||||||
id_vector[i], phantom_node_pair.target_phantom.name_id, TurnInstruction::NoTurn,
|
PathData{id_vector[i],
|
||||||
0, phantom_node_pair.target_phantom.forward_travel_mode});
|
phantom_node_pair.target_phantom.name_id,
|
||||||
|
TurnInstruction::NoTurn,
|
||||||
|
0,
|
||||||
|
phantom_node_pair.target_phantom.forward_travel_mode});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,8 +498,8 @@ template <class DataFacadeT, class Derived> class BasicRoutingInterface
|
|||||||
|
|
||||||
// TODO check if unordered_set might be faster
|
// TODO check if unordered_set might be faster
|
||||||
// sort by id and increasing by distance
|
// sort by id and increasing by distance
|
||||||
auto entry_point_comparator = [](const std::pair<NodeID, EdgeWeight> &lhs,
|
auto entry_point_comparator =
|
||||||
const std::pair<NodeID, EdgeWeight> &rhs)
|
[](const std::pair<NodeID, EdgeWeight> &lhs, const std::pair<NodeID, EdgeWeight> &rhs)
|
||||||
{
|
{
|
||||||
return lhs.first < rhs.first || (lhs.first == rhs.first && lhs.second < rhs.second);
|
return lhs.first < rhs.first || (lhs.first == rhs.first && lhs.second < rhs.second);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user