CARLA
 
载入中...
搜索中...
未找到
RandomGenerator.h
浏览该文件的文档.
1
2#pragma once
3
4#include <random>
5#include <unordered_map>
6
7#include "carla/rpc/ActorId.h"
8
9namespace carla {
10namespace traffic_manager {
11
13public:
14 RandomGenerator(const uint64_t seed): mt(std::mt19937(seed)), dist(0.0, 100.0) {}
15 double next() { return dist(mt); }
16private:
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