24 template <
typename DistibutionType,
typename EngineType>
26 typedef EngineType engine_type;
27 typedef typename engine_type::state_type state_type;
28 typedef typename engine_type::seed_type seed_type;
29 typedef typename engine_type::advance_type advance_type;
30 typedef typename engine_type::init_type init_type;
32 typedef DistibutionType distribution_type;
33 typedef typename distribution_type::result_type result_type;
37 EngineCaller(distribution_type
const& dist, seed_type seed, uint32_t stream)
43 : distribution_(other.distribution_)
45 , stream_(other.stream_) {}
50 if (
this == &other)
return *
this;
52 distribution_ = other.distribution_;
54 stream_ = other.stream_;
59 inline result_type operator()(advance_type n)
const {
61 EngineType eng(seed_, stream_);
64 return static_cast<distribution_type
>(distribution_)(eng);
67 distribution_type distribution_;