Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::detail::q_impl Class Reference

#include <q.hh>

Collaboration diagram for vcsn::detail::q_impl:

Classes

struct  value_t
 

Public Types

using self_type = q
 

Public Member Functions

std::string vname (bool=true) const
 
value_t star (const value_t v) const
 
std::ostream & print_set (std::ostream &o, symbol format=symbol{"text"}) const
 

Static Public Member Functions

static std::string sname ()
 
static q make (std::istream &is)
 Build from the description in is. More...
 
static unsigned int abs (int a)
 
static value_t zero ()
 
static value_t one ()
 
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 value_t rdiv (const value_t l, const value_t r)
 
static value_t ldiv (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 equals (const value_t l, const value_t r)
 
static bool less_than (value_t lhs, value_t rhs)
 Whether lhs < rhs. More...
 
static constexpr bool is_commutative ()
 
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 (value_t v)
 
static value_t conv (self_type, 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)
 
static std::ostream & print (const value_t v, std::ostream &o, symbol format=symbol{"text"})
 

Detailed Description

Definition at line 22 of file q.hh.

Member Typedef Documentation

Definition at line 25 of file q.hh.

Member Function Documentation

static unsigned int vcsn::detail::q_impl::abs ( int  a)
inlinestatic

Definition at line 64 of file q.hh.

Referenced by add(), vcsn::detail::q_impl::value_t::reduce(), star(), and sub().

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

Definition at line 157 of file q.hh.

References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.

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

Definition at line 79 of file q.hh.

References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::lcm(), and vcsn::detail::q_impl::value_t::num.

Here is the call graph for this function:

static value_t vcsn::detail::q_impl::conv ( self_type  ,
value_t  v 
)
inlinestatic

Definition at line 177 of file q.hh.

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

Definition at line 183 of file q.hh.

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

Definition at line 189 of file q.hh.

static value_t vcsn::detail::q_impl::conv ( std::istream &  i)
inlinestatic

Definition at line 195 of file q.hh.

References vcsn::eat(), vcsn::fail_reading(), vcsn::detail::q_impl::value_t::reduce(), vcsn::require(), and sname().

Here is the call graph for this function:

static bool vcsn::detail::q_impl::equals ( const value_t  l,
const value_t  r 
)
inlinestatic

Definition at line 140 of file q.hh.

References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.

static size_t vcsn::detail::q_impl::hash ( value_t  v)
inlinestatic

Definition at line 168 of file q.hh.

References vcsn::detail::q_impl::value_t::den, vcsn::hash_value(), and vcsn::detail::q_impl::value_t::num.

Here is the call graph for this function:

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

Definition at line 151 of file q.hh.

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

Definition at line 134 of file q.hh.

References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.

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

Definition at line 124 of file q.hh.

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

Definition at line 129 of file q.hh.

References vcsn::detail::q_impl::value_t::num.

Referenced by rdiv().

static value_t vcsn::detail::q_impl::ldiv ( const value_t  l,
const value_t  r 
)
inlinestatic

Definition at line 109 of file q.hh.

References rdiv().

Here is the call graph for this function:

static bool vcsn::detail::q_impl::less_than ( value_t  lhs,
value_t  rhs 
)
inlinestatic

Whether lhs < rhs.

Definition at line 146 of file q.hh.

References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.

static q vcsn::detail::q_impl::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 38 of file q.hh.

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

Here is the call graph for this function:

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

Definition at line 93 of file q.hh.

References vcsn::detail::q_impl::value_t::den, and vcsn::detail::q_impl::value_t::num.

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

Definition at line 74 of file q.hh.

static std::ostream& vcsn::detail::q_impl::print ( const value_t  v,
std::ostream &  o,
symbol  format = symbol{"text"} 
)
inlinestatic

Definition at line 229 of file q.hh.

std::ostream& vcsn::detail::q_impl::print_set ( std::ostream &  o,
symbol  format = symbol{"text"} 
) const
inline

Definition at line 249 of file q.hh.

static value_t vcsn::detail::q_impl::rdiv ( const value_t  l,
const value_t  r 
)
inlinestatic

Definition at line 99 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 ldiv().

Here is the call graph for this function:

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

Definition at line 153 of file q.hh.

static std::string vcsn::detail::q_impl::sname ( )
inlinestatic

Definition at line 27 of file q.hh.

Referenced by conv(), make(), star(), and vname().

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

Definition at line 114 of file q.hh.

References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::q_impl::value_t::num, sname(), and vcsn::to_string().

Here is the call graph for this function:

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

Definition at line 154 of file q.hh.

References vcsn::ABSVAL.

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

Definition at line 86 of file q.hh.

References abs(), vcsn::detail::q_impl::value_t::den, vcsn::detail::lcm(), and vcsn::detail::q_impl::value_t::num.

Here is the call graph for this function:

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

Definition at line 163 of file q.hh.

std::string vcsn::detail::q_impl::vname ( bool  = true) const
inline

Definition at line 32 of file q.hh.

References sname().

Here is the call graph for this function:

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

Definition at line 69 of file q.hh.


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