ComPWA
Common Partial-Wave-Analysis Framework
Random.cpp
Go to the documentation of this file.
1
// Copyright (c) 2015, 2017 The ComPWA Team.
2
// This file is part of the ComPWA framework, check
3
// https://github.com/ComPWA/ComPWA/license.txt for details.
4
5
#include "
Random.hpp
"
6
7
namespace
ComPWA
{
8
9
StdUniformRealGenerator::StdUniformRealGenerator
(
int
seed)
10
: MersenneTwisterRandomGenerator(seed), UniformDistribution(0.0, 1.0),
11
Seed(seed) {}
12
13
double
StdUniformRealGenerator::operator()
() {
14
return
UniformDistribution
(
MersenneTwisterRandomGenerator
);
15
}
16
17
int
StdUniformRealGenerator::getSeed
()
const
{
return
Seed
; }
18
19
void
StdUniformRealGenerator::setSeed
(
int
seed) {
20
Seed
= seed;
21
MersenneTwisterRandomGenerator
.seed(seed);
22
}
23
24
}
/* namespace ComPWA */
ComPWA::StdUniformRealGenerator::setSeed
void setSeed(int seed) final
Definition:
Random.cpp:19
ComPWA::StdUniformRealGenerator::getSeed
int getSeed() const final
Definition:
Random.cpp:17
ComPWA::StdUniformRealGenerator::MersenneTwisterRandomGenerator
std::mt19937 MersenneTwisterRandomGenerator
Definition:
Random.hpp:26
ComPWA
Definition:
Efficiency.cpp:7
Random.hpp
ComPWA::StdUniformRealGenerator::operator()
double operator()() final
Definition:
Random.cpp:13
ComPWA::StdUniformRealGenerator::UniformDistribution
std::uniform_real_distribution< double > UniformDistribution
Definition:
Random.hpp:27
ComPWA::StdUniformRealGenerator::StdUniformRealGenerator
StdUniformRealGenerator(int seed=123456)
Definition:
Random.cpp:9
ComPWA::StdUniformRealGenerator::Seed
int Seed
Definition:
Random.hpp:28
Core
Random.cpp
Generated on Mon Jun 22 2020 13:03:33 for ComPWA by
1.8.13