Skip to content

Commit

Permalink
set the magic number to -1
Browse files Browse the repository at this point in the history
  • Loading branch information
xlqian committed Nov 19, 2019
1 parent e30a4ac commit 2572595
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions source/georef/georef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,11 +698,10 @@ edge_t GeoRef::nearest_edge(const type::GeographicalCoord& coordinates,
float min_dist = 0., cur_dist = 0.;
double coslat = ::cos(coordinates.lat() * type::GeographicalCoord::N_DEG_TO_RAD);

// Magic Number!
// The number indicates the number of nearest vertices that should be returned by find_with
// This number is determined by balancing the performance and the practical results (Artemis)
// The bigger the number is, the better the projection will be and slower it will run.
constexpr int nb_nearest_vertices = 50;
// TODO: set different nb for different modes
// we can set -1 for both walking and bike mode
// set smaller number (ex: 50) for car
constexpr int nb_nearest_vertices = -1;

for (const auto& u : prox.find_within<proximitylist::IndexOnly>(coordinates, horizon, nb_nearest_vertices)) {
BOOST_FOREACH (const edge_t& e, boost::out_edges(u, graph)) {
Expand Down

0 comments on commit 2572595

Please sign in to comment.