1 #ifndef VCSN_WEIGHTSET_Z_HH
2 # define VCSN_WEIGHTSET_Z_HH
28 std::string
vname(
bool =
true)
const
77 "z: div: invalid division: ", l,
'/', r);
93 raise(
"z: star: invalid value: ",
to_string(*
this, v));
167 const std::string& =
"text")
175 if (format ==
"latex")
177 else if (format ==
"text")
180 raise(
"invalid format: ", format);
195 #endif // !VCSN_WEIGHTSET_Z_HH
static std::string sname()
static bool is_one(const value_t v)
static std::ostream & print(const value_t v, std::ostream &o, const std::string &="text")
static value_t add(const value_t l, const value_t r)
static value_t ldiv(const value_t l, const value_t r)
static bool is_zero(const value_t v)
static constexpr bool is_special(value_t)
static constexpr star_status_t star_status()
boost::flyweight< std::string, boost::flyweights::no_tracking > symbol
An internalized string.
static size_t hash(value_t v)
static bool less_than(value_t lhs, value_t rhs)
Whether lhs < rhs.
variadic_mul_mixin< detail::b_impl > b
std::size_t hash_value(const T &v)
static value_t rdiv(const value_t l, const value_t r)
variadic_mul_mixin< detail::z_impl > z
std::istringstream is
The input stream: the specification to translate.
std::string vname(bool=true) const
value_t star(const value_t v) const
static value_t conv(std::istream &stream)
static value_t sub(const value_t l, const value_t r)
Provide a variadic mul on top of a binary mul(), and one().
static value_t conv(self_type, value_t v)
static z make(std::istream &is)
Build from the description in is.
char eat(std::istream &is, char c)
Check lookahead character and advance.
static bool equals(const value_t l, const value_t r)
std::ostream & print_set(std::ostream &o, symbol format=symbol{"text"}) const
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, std::string explanation)
Throw an exception after failing to read from is.
static value_t mul(const value_t l, const value_t r)
static constexpr bool show_one()
static value_t conv(b, b::value_t v)
static constexpr bool is_idempotent()
static value_t transpose(const value_t v)
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.
std::string to_string(direction d)
Conversion to string.
static constexpr bool is_commutative()