13 template <
typename WeightSet>
14 typename WeightSet::value_t
20 random_w.parse_param(param);
21 return random_w.generate_random_weight();
29 template <
typename Context,
typename String>
33 const auto& c = ctx->
as<Context>();
34 const auto& ws = *c.weightset();
value_impl< detail::weight_tag > weight
weight random_weight(const context &ctx, const std::string ¶m)
Bridge.
WeightSet::value_t random_weight(const WeightSet &ws, const std::string ¶m={})
Generate a random weight.
std::mt19937 & make_random_engine()
Generate a unique random device.
auto & as()
Downcast to the exact type.
Template-less root for contexts.