17 template <
typename Value>
26 return std::min(l, r);
57 raise(
"star: invalid value: ",
to_string(*
this, v));
69 return std::numeric_limits<value_t>::max();
131 if (is.peek() ==
'o')
138 else if (!(is >> res))
#define VCSN_REQUIRE(Cond,...)
A macro similar to require.
valid iff proper succeeds.
static size_t hash(value_t v)
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static constexpr bool is_special(value_t)
static constexpr bool show_one()
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
std::string to_string(direction d)
Conversion to string.
std::ostream & str_escape(std::ostream &os, const std::string &str, const char *special=nullptr)
Output a string, escaping special characters.
static bool is_zero(const value_t v)
weightset_mixin< detail::r_impl > r
An input/output format for valuesets.
static value_t conv(std::istream &is, bool=true)
Provide a variadic mul on top of a binary mul(), and one().
static bool equal(const value_t l, const value_t r)
static constexpr bool is_commutative()
static bool is_one(const value_t v)
static value_t mul(const value_t l, const value_t r)
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
std::istringstream is
The input stream: the specification to translate.
static value_t rdiv(const value_t l, const value_t r)
static constexpr star_status_t star_status()
value_t star(const value_t v) const
static value_t transpose(const value_t v)
static value_t add(const value_t l, const value_t r)
static constexpr bool is_idempotent()
static std::ostream & print(const value_t v, std::ostream &o, format fmt={})
static bool less(value_t lhs, value_t rhs)
Whether lhs < rhs.
static value_t ldiv(const value_t l, const value_t r)
static value_t conv(b, b::value_t v)