Remove pruning in IncrementalFindPhantomNode
This commit is contained in:
parent
2cd616dd30
commit
4c03ace9eb
@ -651,20 +651,11 @@ class StaticRTree
|
|||||||
unsigned inspected_elements = 0;
|
unsigned inspected_elements = 0;
|
||||||
unsigned number_of_elements_from_big_cc = 0;
|
unsigned number_of_elements_from_big_cc = 0;
|
||||||
unsigned number_of_elements_from_tiny_cc = 0;
|
unsigned number_of_elements_from_tiny_cc = 0;
|
||||||
// is true if a big cc was added to the queue to we also have a lower bound
|
|
||||||
// for them. it actives pruning for big components
|
|
||||||
bool has_big_cc = false;
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
|
||||||
unsigned pruned_elements = 0;
|
|
||||||
#endif
|
|
||||||
std::pair<double, double> projected_coordinate = {
|
std::pair<double, double> projected_coordinate = {
|
||||||
mercator::lat2y(input_coordinate.lat / COORDINATE_PRECISION),
|
mercator::lat2y(input_coordinate.lat / COORDINATE_PRECISION),
|
||||||
input_coordinate.lon / COORDINATE_PRECISION};
|
input_coordinate.lon / COORDINATE_PRECISION};
|
||||||
|
|
||||||
// upper bound pruning technique
|
|
||||||
upper_bound<float> pruning_bound(max_number_of_phantom_nodes);
|
|
||||||
|
|
||||||
// initialize queue with root element
|
// initialize queue with root element
|
||||||
std::priority_queue<IncrementalQueryCandidate> traversal_queue;
|
std::priority_queue<IncrementalQueryCandidate> traversal_queue;
|
||||||
traversal_queue.emplace(0.f, m_search_tree[0]);
|
traversal_queue.emplace(0.f, m_search_tree[0]);
|
||||||
@ -699,19 +690,7 @@ class StaticRTree
|
|||||||
// distance must be non-negative
|
// distance must be non-negative
|
||||||
BOOST_ASSERT(0.f <= current_perpendicular_distance);
|
BOOST_ASSERT(0.f <= current_perpendicular_distance);
|
||||||
|
|
||||||
if (pruning_bound.get() >= current_perpendicular_distance ||
|
|
||||||
(!has_big_cc && !current_edge.is_in_tiny_cc()))
|
|
||||||
{
|
|
||||||
pruning_bound.insert(current_perpendicular_distance);
|
|
||||||
traversal_queue.emplace(current_perpendicular_distance, current_edge);
|
traversal_queue.emplace(current_perpendicular_distance, current_edge);
|
||||||
has_big_cc = has_big_cc || !current_edge.is_in_tiny_cc();
|
|
||||||
}
|
|
||||||
#ifdef NDEBUG
|
|
||||||
else
|
|
||||||
{
|
|
||||||
++pruned_elements;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user