63 return std::numeric_limits<value_t>::max();
167 return v < 0 ? -
v :
v;
206 conv(std::istream& i,
bool =
true)
const 212 raise(*
this,
": invalid value: ", i);
248 template <
typename RandomGenerator>
256 using super_t::super_t;
261 auto dis = std::uniform_real_distribution<>(super_t::min_, super_t::max_);
262 return dis(super_t::gen_);
static constexpr bool show_one()
Print as a parsable type string.
weightset_mixin< detail::r_impl > r
static r make(std::istream &is)
Build from the description in is.
static constexpr star_status_t star_status()
static int compare(const value_t l, const value_t r)
Three-way comparison between l and r.
static constexpr bool has_lightening_weights()
value_t conv(std::istream &i, bool=true) const
static value_t conv(b, const b::value_t v)
static value_t abs(const value_t v)
char eat(std::istream &is, char c)
Check lookahead character and advance.
static constexpr bool is_commutative()
static value_t sub(const value_t l, const value_t r)
value_t pick_value_() const
value_t rgcd(const value_t l, const value_t r) const
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static value_t transpose(const value_t v)
value_t ldivide(const value_t l, const value_t r) const
static value_t add(const value_t l, const value_t r)
valid iff proper succeeds on the "absolute value" of the automaton
Print as rich UTF-8 text, escaped.
An input/output format for valuesets.
Abstract class for random weight generation.
Provide a variadic mul on top of a binary mul(), and one().
static std::ostream & print(const value_t v, std::ostream &o=std::cout, format={})
static value_t conv(z, const z::value_t v)
value_t rdivide(const value_t l, const value_t r) const
typename super_t::weight_t value_t
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static value_t conv(q, const q::value_t v)
static value_t mul(const value_t l, const value_t r)
static bool less(const value_t lhs, const value_t rhs)
Whether lhs < rhs.
static value_t conv(self_t, const value_t v)
Print as plain (ASCII) text, escaped.
value_t lgcd(const value_t l, const value_t r) const
value_t star(const value_t v) const
std::ostream & print_set(std::ostream &o, format fmt={}) const
ATTRIBUTE_NORETURN void raise_not_starrable(const WeightSet &ws, const typename WeightSet::value_t &w)
This value is not starrable.
static constexpr bool is_idempotent()
static bool is_zero(const value_t v)
Print as is. For instance, don't try to escape labels.
static bool is_one(const value_t v)
static constexpr bool is_special(const value_t)
static bool equal(const value_t l, const value_t r)
Whether l == r.
Generic declaration of the class which is specialized in each weightset.
void require(Bool b, Args &&... args)
If b is not verified, raise an error with args as message.
typename weightset_t::value_t weight_t
static size_t hash(const value_t v)