Skip to content

Commit

Permalink
Requested changes from review of PR #79
Browse files Browse the repository at this point in the history
  • Loading branch information
mority committed Apr 11, 2024
1 parent 87d1ef9 commit 66d9c43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions include/nigiri/query_generator/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ struct timetable;

namespace nigiri::query_generation {

constexpr static std::uint32_t const kMaxGenAttempts = 10000U;
constexpr auto const kMaxGenAttempts = 10000U;

constexpr static int const kTimeOfDayWeights[] = {
constexpr auto const kTimeOfDayWeights = std::array<int, 24>{
1, // 01: 00:00 - 01:00
1, // 02: 01:00 - 02:00
1, // 03: 02:00 - 03:00
Expand Down Expand Up @@ -104,8 +104,8 @@ struct generator {
std::uniform_int_distribution<day_idx_t::value_t> day_d_;
std::uniform_int_distribution<std::uint32_t> start_mode_range_d_;
std::uniform_int_distribution<std::uint32_t> dest_mode_range_d_;
std::discrete_distribution<std::uint16_t> hours_d_{
std::begin(kTimeOfDayWeights), std::end(kTimeOfDayWeights)};
std::discrete_distribution<std::uint16_t> hours_d_{begin(kTimeOfDayWeights),
end(kTimeOfDayWeights)};
std::uniform_int_distribution<std::uint16_t> minutes_d_{0, 59};
std::uniform_int_distribution<std::uint16_t> bearing_d_{0, 359};
};
Expand Down
12 changes: 6 additions & 6 deletions include/nigiri/query_generator/transport_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ struct transport_mode {
std::uint16_t max_duration_; // [minutes]
};

constexpr static transport_mode kWalk{
.mode_id_ = 1, .speed_ = 50U, .max_duration_ = 15U};
constexpr static transport_mode kBicycle{
.mode_id_ = 2, .speed_ = 200U, .max_duration_ = 15U};
constexpr static transport_mode kCar{
.mode_id_ = 3, .speed_ = 800U, .max_duration_ = 15U};
constexpr auto const kWalk =
transport_mode{.mode_id_ = 1, .speed_ = 50U, .max_duration_ = 15U};
constexpr auto const kBicycle =
transport_mode{.mode_id_ = 2, .speed_ = 200U, .max_duration_ = 15U};
constexpr auto const kCar =
transport_mode{.mode_id_ = 3, .speed_ = 800U, .max_duration_ = 15U};

} // namespace nigiri::query_generation

0 comments on commit 66d9c43

Please sign in to comment.