29 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT = std::mt19937>
35 template <
class Generator,
class Dist >
45 result_type
min()
const {
return D.min(); }
46 result_type
max()
const {
return D.max(); }
50 distribution_type D0) : G(G0), D(D0) {}
51 template <
class ValT >
59 const engine_value_type &
engine()
const 94 ImplementationT&
impl();
95 const ImplementationT&
impl()
const;
98 ImplementationT m_generator;
117 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
119 m_generator(EngineT(), DistributionT<T>())
123 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
125 m_generator(EngineT(), DistributionT<T>(minValue, maxValue))
129 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
131 m_generator(EngineT(), DistributionT<T>())
136 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
138 m_generator(EngineT(), DistributionT<T>(minValue, maxValue))
143 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
146 return m_generator();
149 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
152 m_generator.engine().
seed(seed);
153 m_generator.distribution().reset();
156 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
159 return m_generator();
163 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
169 template<
typename T,
template<
typename>
class DistributionT,
typename EngineT>
RandomGenerator< agx::Int32, std::uniform_int_distribution > UniformInt32Generator
RandomGenerator()
Implementation.
RandomGenerator< agx::Real64, std::uniform_real_distribution > UniformReal64Generator
RandomGenerator< agx::Real, std::uniform_real_distribution > UniformRealGenerator
RandomGenerator< agx::Int, std::uniform_int_distribution > UniformIntGenerator
variate_generator< EngineT, DistributionT< T > > ImplementationT
T rand()
Returns random number between minValue and maxValue (from constructor).
RandomGenerator< agx::Int64, std::uniform_int_distribution > UniformInt64Generator
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
void seed(agx::UInt32 seed)
Generator engine_value_type
engine_value_type & engine()
const engine_value_type & engine() const
RandomGenerator< agx::Real32, std::uniform_real_distribution > UniformReal32Generator
variate_generator(engine_type G0, distribution_type D0)
Dist::result_type result_type
distribution_type & distribution()
const distribution_type & distribution() const