1 #ifndef VCSN_WEIGHTSET_MIN_PLUS_HH
2 # define VCSN_WEIGHTSET_MIN_PLUS_HH
15 template <
typename Value>
24 return std::min(l, r);
55 raise(
"star: invalid value: ",
to_string(*
this, v));
67 return std::numeric_limits<value_t>::max();
129 if (is.peek() ==
'o')
136 else if (!(is >> res))
147 return o << (format ==
"latex" ?
"\\infty" :
"oo");
155 #endif // !VCSN_WEIGHTSET_MIN_PLUS_HH
static value_t ldiv(const value_t l, const value_t r)
static constexpr bool is_special(value_t)
static std::ostream & print(const value_t v, std::ostream &o, symbol format=symbol{"text"})
static size_t hash(value_t v)
static value_t add(const value_t l, const value_t r)
value_t star(const value_t v) const
boost::flyweight< std::string, boost::flyweights::no_tracking > symbol
An internalized string.
static value_t transpose(const value_t v)
std::ostream & str_escape(std::ostream &os, const std::string &str)
Output a string, escaping special characters.
std::size_t hash_value(const T &v)
static value_t mul(const value_t l, const value_t r)
static bool is_zero(const value_t v)
static value_t conv(std::istream &is)
std::istringstream is
The input stream: the specification to translate.
static bool equals(const value_t l, const value_t r)
static constexpr star_status_t star_status()
static constexpr bool show_one()
static value_t rdiv(const value_t l, const value_t r)
Provide a variadic mul on top of a binary mul(), and one().
static value_t conv(b, b::value_t v)
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, std::string explanation)
Throw an exception after failing to read from is.
static constexpr bool is_idempotent()
static bool is_one(const value_t v)
static bool less_than(value_t lhs, value_t rhs)
Whether lhs < rhs.
variadic_mul_mixin< detail::r_impl > r
void require(bool b, Args &&...args)
If b is not verified, raise an error with args as message.
static constexpr bool is_commutative()
std::string to_string(direction d)
Conversion to string.