CARLA
RandomGenerator.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include <random>
5 #include <unordered_map>
6 
7 #include "carla/rpc/ActorId.h"
8 
9 namespace carla {
10 namespace traffic_manager {
11 
13 public:
14  RandomGenerator(const uint64_t seed): mt(std::mt19937(seed)), dist(0.0, 100.0) {}
15  double next() { return dist(mt); }
16 private:
17  std::mt19937 mt;
18  std::uniform_real_distribution<double> dist;
19 };
20 
21 } // namespace traffic_manager
22 } // namespace carla
std::uniform_real_distribution< double > dist
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133