43 conv(std::istream& is,
bool =
true)
const
46 fail_reading(is, *
this,
": negative values are invalid");
59 o <<
"\\mathbb{N}_{\\text{min}}";
79 template <
typename RandomGenerator>
87 using super_t::super_t;
93 std::uniform_int_distribution<nmin::value_t>(super_t::min_, super_t::max_);
94 return dis(super_t::gen_);
Print as is. For instance, don't try to escape labels.
char eat(std::istream &is, char c)
Check lookahead character and advance.
Print as a parsable type string.
Generic declaration of the class which is specialized in each weightset.
static constexpr bool has_lightening_weights()
An input/output format for valuesets.
value_t pick_value_() const
Abstract class for random weight generation.
typename super_t::value_t value_t
Provide a variadic mul on top of a binary mul(), and one().
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static nmin make(std::istream &is)
Build from the description in is.
Print as rich UTF-8 text, escaped.
static value_t conv(b, b::value_t v)
Print as plain (ASCII) text, escaped.
weightset_mixin< detail::nmin_impl > nmin
typename nmin::value_t weight_t
typename super_t::weight_t value_t
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
std::ostream & print_set(std::ostream &o, format fmt={}) const
value_t conv(std::istream &is, bool=true) const
static value_t conv(self_t, value_t v)