1 #ifndef SIMPT_DEFAULT_MOVE_GEN_STANDARD_NORMAL_H_INCLUDED
2 #define SIMPT_DEFAULT_MOVE_GEN_STANDARD_NORMAL_H_INCLUDED
26 #include <trng/normal_dist.hpp>
27 #include <trng/uniform01_dist.hpp>
32 namespace MoveGenerator {
46 assert( cd.
Check() &&
"CoreData not ok.");
53 m_normal_generator = cd.m_random_engine->GetGenerator(trng::normal_dist<double>(0.0, 1.0));
54 m_uniform_generator = cd.m_random_engine->GetGenerator(trng::uniform01_dist<double>());
61 const double angle = m_uniform_generator() *
pi();
62 const double ampli = m_normal_generator();
63 return std::array<double, 3>{{ ampli * std::sin(angle), ampli * std::cos(angle), 0.0 }};
67 std::function<double()> m_normal_generator;
68 std::function<double()> m_uniform_generator;
74 #endif // end_of_include_guard
Move Generator with normal distribution (no directional bias).
Core data with mesh, parameters, random engine and time data.
Core data used during model execution.
Namespace for miscellaneous utilities.
Interface of RandomEngine.
Namespace for components of the Default model group.
Namespace for the core simulator.
StandardNormal(const CoreData &cd)
Straight initialization.
void Initialize(const CoreData &cd)
Initialize or re-initialize.
std::array< double, 3 > operator()()
Generate a random move.
constexpr double pi()
Math constant pi.
bool Check() const
Verify all pointers non-null.