CARLA
LibCarla
source
carla
trafficmanager
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
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
carla::traffic_manager::RandomGenerator::dist
std::uniform_real_distribution< double > dist
Definition:
RandomGenerator.h:18
carla::traffic_manager::RandomGenerator
Definition:
RandomGenerator.h:12
std
Definition:
CarlaRecorderCollision.h:30
carla::traffic_manager::RandomGenerator::next
double next()
Definition:
RandomGenerator.h:15
carla
This file contains definitions of common data structures used in traffic manager. ...
Definition:
Carla.cpp:133
carla::traffic_manager::RandomGenerator::RandomGenerator
RandomGenerator(const uint64_t seed)
Definition:
RandomGenerator.h:14
carla::traffic_manager::RandomGenerator::mt
std::mt19937 mt
Definition:
RandomGenerator.h:17
ActorId.h
Generated by
1.8.13