CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
trafficmanager
RandomGenerator.h
浏览该文件的文档.
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
12
class
RandomGenerator
{
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
ActorId.h
carla::traffic_manager::RandomGenerator
Definition
RandomGenerator.h:12
carla::traffic_manager::RandomGenerator::RandomGenerator
RandomGenerator(const uint64_t seed)
Definition
RandomGenerator.h:14
carla::traffic_manager::RandomGenerator::next
double next()
Definition
RandomGenerator.h:15
carla::traffic_manager::RandomGenerator::dist
std::uniform_real_distribution< double > dist
Definition
RandomGenerator.h:18
carla::traffic_manager::RandomGenerator::mt
std::mt19937 mt
Definition
RandomGenerator.h:17
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
std
Definition
CarlaRecorderCollision.h:31
制作者
1.10.0