![]() |
Vcsn
2.3a
Be Rational
|
#include <q.hh>
Classes | |
struct | value_t |
Public Types | |
using | self_t = q |
Public Member Functions | |
value_t | lgcd (const value_t &l, const value_t &r) const |
GCD: arbitrarily the first argument. More... | |
value_t | rgcd (const value_t &l, const value_t &r) const |
value_t | rdivide (const value_t &l, const value_t &r) const |
value_t | ldivide (const value_t &l, const value_t &r) const |
value_t | star (const value_t &v) const |
value_t | conv (std::istream &i, bool=true) const |
std::ostream & | print_set (std::ostream &o, format fmt={}) const |
Static Public Member Functions | |
static symbol | sname () |
static q | make (std::istream &is) |
Build from the description in is. More... | |
static value_t | value (int num, unsigned den) |
Create rational weight from num and den. More... | |
static unsigned | abs (int a) |
static value_t | zero () |
static value_t | one () |
static value_t | min () |
static value_t | max () |
static value_t | add (const value_t &l, const value_t &r) |
static value_t | sub (const value_t &l, const value_t &r) |
static value_t | mul (const value_t &l, const value_t &r) |
static bool | is_special (const value_t &) |
static bool | is_zero (const value_t &v) |
static bool | is_one (const value_t &v) |
static bool | equal (const value_t &l, const value_t &r) |
static bool | less (const value_t &lhs, const value_t &rhs) |
Whether lhs < rhs. More... | |
static constexpr bool | is_commutative () |
static constexpr bool | has_lightening_weights () |
static constexpr bool | show_one () |
static constexpr star_status_t | star_status () |
static value_t | abs (const value_t &v) |
static value_t | transpose (const value_t &v) |
static size_t | hash (const value_t &v) |
static value_t | conv (self_t, const value_t &v) |
static value_t | conv (z, const z::value_t v) |
static value_t | conv (b, const b::value_t v) |
static std::ostream & | print (const value_t &v, std::ostream &o=std::cout, format fmt={}) |
using vcsn::detail::q_impl::self_t = q |
|
inlinestatic |
Definition at line 188 of file q.hh.
References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.
Definition at line 94 of file q.hh.
References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::lcm(), and vcsn::detail::q_impl::value_t::num.
Definition at line 208 of file q.hh.
References vcsn::detail::v.
|
inlinestatic |
Definition at line 214 of file q.hh.
References vcsn::detail::v.
|
inlinestatic |
Definition at line 220 of file q.hh.
References vcsn::detail::v.
|
inline |
Definition at line 226 of file q.hh.
References vcsn::eat(), vcsn::detail::q_impl::value_t::reduce(), and vcsn::require().
Definition at line 169 of file q.hh.
References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.
|
inlinestatic |
|
inlinestatic |
Definition at line 199 of file q.hh.
References vcsn::detail::q_impl::value_t::den, vcsn::hash_combine(), vcsn::detail::hash_value(), vcsn::detail::q_impl::value_t::num, and vcsn::res.
|
inlinestatic |
|
inlinestatic |
Definition at line 163 of file q.hh.
References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.
|
inlinestatic |
|
inlinestatic |
Definition at line 158 of file q.hh.
References vcsn::detail::q_impl::value_t::num.
Whether lhs < rhs.
Definition at line 175 of file q.hh.
References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.
GCD: arbitrarily the first argument.
Definition at line 115 of file q.hh.
References is_zero(), and vcsn::require().
Referenced by rgcd().
|
inlinestatic |
Build from the description in is.
Definition at line 35 of file q.hh.
References vcsn::eat(), and sname().
|
inlinestatic |
Definition at line 108 of file q.hh.
References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.
|
inline |
Definition at line 129 of file q.hh.
References vcsn::detail::q_impl::value_t::den, is_zero(), vcsn::detail::q_impl::value_t::num, and vcsn::require().
Referenced by ldivide().
|
inlinestatic |
|
inlinestatic |
Definition at line 144 of file q.hh.
References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::q_impl::value_t::num, and vcsn::raise_not_starrable().
|
inlinestatic |
Definition at line 185 of file q.hh.
References vcsn::ABSVAL.
Definition at line 101 of file q.hh.
References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::lcm(), and vcsn::detail::q_impl::value_t::num.
Definition at line 194 of file q.hh.
References vcsn::detail::v.
|
inlinestatic |
Create rational weight from num and den.
Definition at line 62 of file q.hh.
References vcsn::detail::q_impl::value_t::reduce().