Vcsn  2.8
Be Rational
vcsn::detail::qmp_impl Class Reference

#include <qmp.hh>

Collaboration diagram for vcsn::detail::qmp_impl:

Public Types

using self_t = qmp
 
using value_t = mpq_class
 

Public Member Functions

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
 
std::ostream & print_set (std::ostream &o, format fmt={}) const
 

Static Public Member Functions

static symbol sname ()
 
static qmp 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 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 int compare (const value_t &l, const value_t &r)
 Three-way comparison between l and r. More...
 
static bool equal (const value_t &l, const value_t &r)
 Whether l == r. More...
 
static bool less (const value_t &l, const value_t &r)
 Whether < r. 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, z::value_t v)
 
static value_t conv (b, b::value_t v)
 
static value_t conv (std::istream &i, bool=true)
 
static std::ostream & print (const value_t &v, std::ostream &o=std::cout, format fmt={})
 

Detailed Description

Definition at line 26 of file qmp.hh.

Member Typedef Documentation

◆ self_t

Definition at line 29 of file qmp.hh.

◆ value_t

Definition at line 44 of file qmp.hh.

Member Function Documentation

◆ abs()

static value_t vcsn::detail::qmp_impl::abs ( const value_t v)
inlinestatic

Definition at line 156 of file qmp.hh.

Referenced by star().

◆ add()

static value_t vcsn::detail::qmp_impl::add ( const value_t l,
const value_t r 
)
inlinestatic

Definition at line 78 of file qmp.hh.

◆ compare()

static int vcsn::detail::qmp_impl::compare ( const value_t l,
const value_t r 
)
inlinestatic

Three-way comparison between l and r.

Definition at line 132 of file qmp.hh.

◆ conv() [1/4]

static value_t vcsn::detail::qmp_impl::conv ( self_t  ,
const value_t v 
)
inlinestatic

Definition at line 174 of file qmp.hh.

References vcsn::detail::v.

◆ conv() [2/4]

static value_t vcsn::detail::qmp_impl::conv ( z  ,
z::value_t  v 
)
inlinestatic

Definition at line 180 of file qmp.hh.

References vcsn::detail::v.

◆ conv() [3/4]

static value_t vcsn::detail::qmp_impl::conv ( b  ,
b::value_t  v 
)
inlinestatic

Definition at line 186 of file qmp.hh.

References vcsn::detail::v.

◆ conv() [4/4]

static value_t vcsn::detail::qmp_impl::conv ( std::istream &  i,
bool  = true 
)
inlinestatic

Definition at line 192 of file qmp.hh.

References vcsn::res.

◆ equal()

static bool vcsn::detail::qmp_impl::equal ( const value_t l,
const value_t r 
)
inlinestatic

Whether l == r.

Definition at line 138 of file qmp.hh.

◆ has_lightening_weights()

static constexpr bool vcsn::detail::qmp_impl::has_lightening_weights ( )
inlinestatic

Definition at line 150 of file qmp.hh.

◆ hash()

static size_t vcsn::detail::qmp_impl::hash ( const value_t v)
inlinestatic

Definition at line 167 of file qmp.hh.

References vcsn::detail::hash_value(), and vcsn::to_string().

Here is the call graph for this function:

◆ is_commutative()

static constexpr bool vcsn::detail::qmp_impl::is_commutative ( )
inlinestatic

Definition at line 149 of file qmp.hh.

◆ is_one()

static bool vcsn::detail::qmp_impl::is_one ( const value_t v)
inlinestatic

Definition at line 125 of file qmp.hh.

◆ is_special()

static bool vcsn::detail::qmp_impl::is_special ( const value_t )
inlinestatic

Definition at line 115 of file qmp.hh.

◆ is_zero()

static bool vcsn::detail::qmp_impl::is_zero ( const value_t v)
inlinestatic

Definition at line 120 of file qmp.hh.

Referenced by rdivide().

◆ ldivide()

value_t vcsn::detail::qmp_impl::ldivide ( const value_t l,
const value_t r 
) const
inline

Definition at line 101 of file qmp.hh.

References rdivide().

Here is the call graph for this function:

◆ less()

static bool vcsn::detail::qmp_impl::less ( const value_t l,
const value_t r 
)
inlinestatic

Whether < r.

Definition at line 144 of file qmp.hh.

◆ make()

static qmp vcsn::detail::qmp_impl::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 38 of file qmp.hh.

References vcsn::eat(), and sname().

Here is the call graph for this function:

◆ max()

static value_t vcsn::detail::qmp_impl::max ( )
inlinestatic

Definition at line 72 of file qmp.hh.

◆ min()

static value_t vcsn::detail::qmp_impl::min ( )
inlinestatic

Definition at line 65 of file qmp.hh.

References vcsn::min.

◆ mul()

static value_t vcsn::detail::qmp_impl::mul ( const value_t l,
const value_t r 
)
inlinestatic

Definition at line 88 of file qmp.hh.

◆ one()

static value_t vcsn::detail::qmp_impl::one ( )
inlinestatic

Definition at line 59 of file qmp.hh.

◆ print()

static std::ostream& vcsn::detail::qmp_impl::print ( const value_t v,
std::ostream &  o = std::cout,
format  fmt = {} 
)
inlinestatic

Definition at line 200 of file qmp.hh.

References vcsn::format::latex, and vcsn::detail::v.

◆ print_set()

std::ostream& vcsn::detail::qmp_impl::print_set ( std::ostream &  o,
format  fmt = {} 
) const
inline

Definition at line 216 of file qmp.hh.

References vcsn::format::latex, vcsn::format::raw, vcsn::format::sname, sname(), vcsn::format::text, and vcsn::format::utf8.

Here is the call graph for this function:

◆ rdivide()

value_t vcsn::detail::qmp_impl::rdivide ( const value_t l,
const value_t r 
) const
inline

Definition at line 94 of file qmp.hh.

References is_zero(), and vcsn::require().

Referenced by ldivide().

Here is the call graph for this function:

◆ show_one()

static constexpr bool vcsn::detail::qmp_impl::show_one ( )
inlinestatic

Definition at line 152 of file qmp.hh.

◆ sname()

static symbol vcsn::detail::qmp_impl::sname ( )
inlinestatic

Definition at line 31 of file qmp.hh.

References vcsn::res.

Referenced by make(), and print_set().

◆ star()

value_t vcsn::detail::qmp_impl::star ( const value_t v) const
inline

Definition at line 106 of file qmp.hh.

References abs(), and vcsn::raise_not_starrable().

Here is the call graph for this function:

◆ star_status()

static constexpr star_status_t vcsn::detail::qmp_impl::star_status ( )
inlinestatic

Definition at line 153 of file qmp.hh.

References vcsn::ABSVAL.

◆ sub()

static value_t vcsn::detail::qmp_impl::sub ( const value_t l,
const value_t r 
)
inlinestatic

Definition at line 83 of file qmp.hh.

◆ transpose()

static value_t vcsn::detail::qmp_impl::transpose ( const value_t v)
inlinestatic

Definition at line 162 of file qmp.hh.

References vcsn::detail::v.

◆ value()

static value_t vcsn::detail::qmp_impl::value ( int  num,
unsigned  den 
)
inlinestatic

Create rational weight from num and den.

Definition at line 47 of file qmp.hh.

◆ zero()

static value_t vcsn::detail::qmp_impl::zero ( )
inlinestatic

Definition at line 52 of file qmp.hh.


The documentation for this class was generated from the following file: