|
CARLA
|
#include <RandomEngine.h>
Inheritance diagram for URandomEngine:Public Member Functions | |
| uint32 | GetState () const |
| The engine's state, to continue its exact sequence elsewhere (a Multi-GPU secondary's mirror of a sensor). | |
| void | SetState (uint32 State) |
| Continue from State, as GetState returned it; an impossible value is ignored. | |
Uniform distribution | |
| float | GetUniformFloat () |
| float | GetUniformFloatInRange (float Minimum, float Maximum) |
| int32 | GetUniformIntInRange (int32 Minimum, int32 Maximum) |
| bool | GetUniformBool () |
Other distributions | |
| bool | GetBernoulliDistribution (float P) |
| int32 | GetBinomialDistribution (int32 T, float P) |
| int32 | GetPoissonDistribution (float Mean) |
| float | GetExponentialDistribution (float Lambda) |
| float | GetNormalDistribution (float Mean, float StandardDeviation) |
Sampling distributions | |
| bool | GetBoolWithWeight (float Weight) |
| int32 | GetIntWithWeight (const TArray< float > &Weights) |
Elements in TArray | |
| template<typename T > | |
| auto & | PickOne (const TArray< T > &Array) |
| template<typename T > | |
| void | Shuffle (TArray< T > &Array) |
Static Public Member Functions | |
Generate Ids | |
| static uint64 | GenerateRandomId () |
| Generate a non-deterministic random id. | |
Private Attributes | |
| std::minstd_rand | Engine |
Seed | |
| static int32 | GenerateRandomSeed () |
| Generate a non-deterministic random seed. | |
| int32 | GenerateSeed () |
| Generate a seed derived from previous seed. | |
| void | Seed (int32 InSeed) |
| Seed the random engine. | |
Definition at line 14 of file RandomEngine.h.
|
static |
Generate a non-deterministic random id.
Definition at line 16 of file RandomEngine.cpp.
References Engine.
|
static |
Generate a non-deterministic random seed.
Definition at line 26 of file RandomEngine.cpp.
Referenced by AWheeledVehicleAIController::AWheeledVehicleAIController(), UActorBlueprintFunctionLibrary::SetAutowareGnss(), UActorBlueprintFunctionLibrary::SetCustomV2X(), UActorBlueprintFunctionLibrary::SetGnss(), UActorBlueprintFunctionLibrary::SetIMU(), and UActorBlueprintFunctionLibrary::SetV2X().
| int32 URandomEngine::GenerateSeed | ( | ) |
Generate a seed derived from previous seed.
Definition at line 35 of file RandomEngine.cpp.
References GetUniformIntInRange().
|
inline |
Definition at line 86 of file RandomEngine.h.
|
inline |
Definition at line 92 of file RandomEngine.h.
|
inline |
Definition at line 122 of file RandomEngine.h.
|
inline |
Definition at line 104 of file RandomEngine.h.
|
inline |
Definition at line 128 of file RandomEngine.h.
Referenced by PickARoute().
|
inline |
Definition at line 110 of file RandomEngine.h.
Referenced by PathLossModel::CalculateShadowFading(), AInertialMeasurementUnit::ComputeAccelerometerNoise(), CaService::ComputeAccelerometerNoise(), AInertialMeasurementUnit::ComputeGyroscopeNoise(), CaService::ComputeSpeed(), CaService::ComputeYawNoise(), CaService::GetHeading(), CaService::GetReferencePosition(), AAutowareGnssSensor::PostPhysTick(), AGnssSensor::PostPhysTick(), AHSSLidar::PostprocessDetection(), ARayCastLidar::PostprocessDetection(), and ADVSCamera::Simulation().
|
inline |
Definition at line 98 of file RandomEngine.h.
| uint32 URandomEngine::GetState | ( | ) | const |
The engine's state, to continue its exact sequence elsewhere (a Multi-GPU secondary's mirror of a sensor).
Definition at line 42 of file RandomEngine.cpp.
References Engine, and carla::multigpu::GetEngineState().
Referenced by AAutowareGnssSensor::GetMirrorState(), AGnssSensor::GetMirrorState(), AInertialMeasurementUnit::GetMirrorState(), ARadar::GetMirrorState(), and ARayCastSemanticLidar::GetMirrorState().
|
inline |
Definition at line 74 of file RandomEngine.h.
|
inline |
Definition at line 56 of file RandomEngine.h.
Referenced by AHSSLidar::PostprocessDetection(), ARayCastLidar::PostprocessDetection(), AHSSLidar::PreprocessRays(), ARayCastLidar::PreprocessRays(), and ARadar::SendLineTraces().
|
inline |
Definition at line 62 of file RandomEngine.h.
Referenced by ARadar::SendLineTraces().
|
inline |
Definition at line 68 of file RandomEngine.h.
Referenced by GenerateSeed().
|
inline |
Definition at line 142 of file RandomEngine.h.
|
inline |
Seed the random engine.
Definition at line 44 of file RandomEngine.h.
Referenced by AWheeledVehicleAIController::AWheeledVehicleAIController(), AActorWithRandomEngine::GetSeed(), AActorWithRandomEngine::OnConstruction(), ASensor::SetSeed(), and AActorWithRandomEngine::SetSeed().
| void URandomEngine::SetState | ( | uint32 | State | ) |
Continue from State, as GetState returned it; an impossible value is ignored.
Definition at line 47 of file RandomEngine.cpp.
References Engine, carla::multigpu::SetEngineState(), and State.
Referenced by AAutowareGnssSensor::SetMirrorState(), AGnssSensor::SetMirrorState(), AInertialMeasurementUnit::SetMirrorState(), ARadar::SetMirrorState(), and ARayCastSemanticLidar::SetMirrorState().
|
inline |
Definition at line 149 of file RandomEngine.h.
|
private |
Definition at line 166 of file RandomEngine.h.
Referenced by GenerateRandomId(), GetState(), and SetState().