1 #ifndef SIMPT_DEFAULT_MOVE_GEN_STANDARD_UNIFORM_H_INCLUDED
2 #define SIMPT_DEFAULT_MOVE_GEN_STANDARD_UNIFORM_H_INCLUDED
26 #include <trng/uniform01_dist.hpp>
31 namespace MoveGenerator {
45 assert( cd.
Check() &&
"CoreData not ok.");
52 m_uniform_generator = cd.m_random_engine->GetGenerator(trng::uniform01_dist<double>());
59 const double angle = m_uniform_generator() *
two_pi();
60 const double ampli = m_uniform_generator();
61 return std::array<double, 3>{{ ampli * std::sin(angle), ampli * std::cos(angle), 0.0 }};
65 std::function<double()> m_uniform_generator;
71 #endif // end_of_include_guard
Core data with mesh, parameters, random engine and time data.
StandardUniform(const CoreData &cd)
Straight initialization.
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.
constexpr double two_pi()
Math constant 2*pi.
Move Generator with uniform distribution (no directional bias).
std::array< double, 3 > operator()()
Generate a random move.
void Initialize(const CoreData &cd)
Straight initialization of empty object.
bool Check() const
Verify all pointers non-null.