Vcsn  2.2
Be Rational
vcsn::detail::q_impl Class Reference

#include <q.hh>

Collaboration diagram for vcsn::detail::q_impl:

Classes

struct  value_t
 

Public Types

using self_t = q
 

Public Member Functions

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 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 lgcd (const value_t l, const value_t r)
 GCD: arbitrarily the first argument. More...
 
static value_t rgcd (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 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 value_t conv (std::istream &i, bool=true)
 
static std::ostream & print (const value_t v, std::ostream &o, format fmt={})
 

Detailed Description

Definition at line 23 of file q.hh.

Member Typedef Documentation

Definition at line 26 of file q.hh.

Member Function Documentation

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

Definition at line 61 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 170 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 76 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_t  ,
const value_t  v 
)
inlinestatic

Definition at line 190 of file q.hh.

References vcsn::detail::v.

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

Definition at line 196 of file q.hh.

References vcsn::detail::v.

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

Definition at line 202 of file q.hh.

References vcsn::detail::v.

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

Definition at line 208 of file q.hh.

References vcsn::eat(), 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::equal ( const value_t  l,
const value_t  r 
)
inlinestatic

Definition at line 151 of file q.hh.

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

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

Definition at line 164 of file q.hh.

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

Definition at line 181 of file q.hh.

References vcsn::detail::q_impl::value_t::den, vcsn::hash_combine(), vcsn::detail::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 163 of file q.hh.

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

Definition at line 145 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 135 of file q.hh.

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

Definition at line 140 of file q.hh.

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

Referenced by lgcd(), and rdiv().

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

Definition at line 121 of file q.hh.

References rdiv().

Here is the call graph for this function:

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

Whether lhs < rhs.

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::lgcd ( const value_t  l,
const value_t  r 
)
inlinestatic

GCD: arbitrarily the first argument.

Definition at line 97 of file q.hh.

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

Referenced by rgcd().

Here is the call graph for this function:

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

Build from the description in is.

Definition at line 35 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 90 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 71 of file q.hh.

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

Definition at line 241 of file q.hh.

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

Definition at line 261 of file q.hh.

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

Definition at line 111 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 value_t vcsn::detail::q_impl::rgcd ( const value_t  l,
const value_t  r 
)
inlinestatic

Definition at line 105 of file q.hh.

References lgcd().

Here is the call graph for this function:

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

Definition at line 166 of file q.hh.

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

Definition at line 28 of file q.hh.

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

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

Definition at line 126 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 167 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 83 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 176 of file q.hh.

References vcsn::detail::v.

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

Definition at line 66 of file q.hh.


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