27 static auto res =
symbol{
"z"};
89 "z: div: invalid division: ", l,
'/', r);
105 raise(
"z: star: invalid value: ",
to_string(*
this, v));
static constexpr bool is_idempotent()
static value_t rgcd(const value_t l, const value_t r)
static value_t mul(const value_t l, const value_t r)
Print as rich UTF-8 text, escaped.
static bool less(value_t lhs, value_t rhs)
Whether lhs < rhs.
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static constexpr bool show_one()
static bool is_one(const value_t v)
static value_t rdiv(const value_t l, const value_t r)
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
static constexpr star_status_t star_status()
std::string to_string(direction d)
Conversion to string.
Print as is. For instance, don't try to escape labels.
static bool is_zero(const value_t v)
weightset_mixin< detail::z_impl > z
weightset_mixin< detail::r_impl > r
An input/output format for valuesets.
char eat(std::istream &is, char c)
Check lookahead character and advance.
Provide a variadic mul on top of a binary mul(), and one().
static z make(std::istream &is)
Build from the description in is.
value_t star(const value_t v) const
static bool equal(const value_t l, const value_t r)
static value_t conv(b, b::value_t v)
static value_t lgcd(const value_t l, const value_t r)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
std::ostream & print_set(std::ostream &o, format fmt={}) const
Print as plain (ASCII) text, escaped.
static value_t conv(self_t, value_t v)
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
static value_t ldiv(const value_t l, const value_t r)
static value_t add(const value_t l, const value_t r)
static value_t sub(const value_t l, const value_t r)
std::istringstream is
The input stream: the specification to translate.
static value_t transpose(const value_t v)
static std::ostream & print(const value_t v, std::ostream &o, format={})
static value_t conv(std::istream &is, bool=true)
Print as a parsable type string.
static constexpr bool is_special(value_t)
static constexpr bool has_lightening_weights()
ATTRIBUTE_PURE unsigned int gcd(unsigned int a, unsigned int b)
Greatest common divisor.
static size_t hash(value_t v)
weightset_mixin< detail::b_impl > b
static constexpr bool is_commutative()