32 static auto res =
symbol{
"qmp"};
49 return value_t{mpz_class(0), 1};
87 if (
abs(v.get_num()) < v.get_den())
89 return {v.get_den(), v.get_den() - v.get_num()};
101 return v.get_num() == 0;
107 return v.get_num() == 1 && v.get_den() == 1;
164 conv(std::istream& i,
bool =
true)
177 if (v.get_den() == 1)
180 o <<
"\\frac{" << v.get_num() <<
"}{" << v.get_den() <<
'}';
193 o <<
"\\mathbb{Q}_{\\text{mp}}";
static value_t transpose(const value_t v)
weightset_mixin< detail::qmp_impl > qmp
Print as rich UTF-8 text, escaped.
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
std::ostream & print_set(std::ostream &o, format fmt={}) const
static value_t add(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.
std::string to_string(direction d)
Conversion to string.
static value_t conv(z, z::value_t v)
static std::ostream & print(const value_t v, std::ostream &o, format fmt={})
Print as is. For instance, don't try to escape labels.
static value_t ldiv(const value_t l, const value_t r)
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 bool is_one(const value_t v)
value_t star(const value_t v) const
static constexpr bool has_lightening_weights()
static constexpr bool is_commutative()
valid iff proper succeeds on the "absolute value" of the automaton
static constexpr bool show_one()
static bool equal(const value_t l, const value_t r)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static size_t hash(value_t v)
Print as plain (ASCII) text, escaped.
static value_t conv(self_t, value_t v)
static qmp make(std::istream &is)
Build from the description in is.
std::istringstream is
The input stream: the specification to translate.
static value_t conv(std::istream &i, bool=true)
Print as a parsable type string.
static constexpr star_status_t star_status()
static value_t conv(b, b::value_t v)
static value_t mul(const value_t l, const value_t r)
static value_t sub(const value_t l, const value_t r)
static bool less(value_t l, value_t r)
Whether < r.
static bool is_zero(const value_t v)
static bool is_special(const value_t)
static value_t abs(const value_t v)
weightset_mixin< detail::b_impl > b
static value_t rdiv(const value_t l, const value_t r)
weightset_mixin< detail::q_impl > q