Skip to content

Commit

Permalink
No need to pass profile to get_sparse_matrices.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoupey committed Jul 16, 2024
1 parent 6cb896d commit 1813055
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/routing/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ class Wrapper {
virtual Matrices get_matrices(const std::vector<Location>& locs) const = 0;

Matrices
get_sparse_matrices(const std::string& profile,
const std::vector<Location>& locs,
get_sparse_matrices(const std::vector<Location>& locs,
const std::vector<Vehicle>& vehicles,
const std::vector<Job>& jobs,
std::unordered_map<Id, std::string>& v_id_to_geom) const {
Expand Down Expand Up @@ -97,7 +96,7 @@ class Wrapper {
vehicles_threads.reserve(vehicles.size());

for (const auto& v : vehicles) {
if (v.profile == profile) {
if (v.profile == this->profile) {
vehicles_threads.emplace_back(run_on_vehicle, v);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/structures/vroom/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,7 @@ routing::Matrices Input::get_matrices_by_profile(const std::string& profile,
});
assert(rw != _routing_wrappers.end());

return sparse_filling ? (*rw)->get_sparse_matrices(profile,
_locations,
return sparse_filling ? (*rw)->get_sparse_matrices(_locations,
this->vehicles,
this->jobs,
_vehicle_id_to_geometry)
Expand Down

0 comments on commit 1813055

Please sign in to comment.