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

#include <r.hh>

Collaboration diagram for vcsn::detail::r_impl:

Public Types

using self_t = r
 
using value_t = double
 

Public Member Functions

value_t lgcd (const value_t l, const value_t r) const
 
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 r make (std::istream &is)
 Build from the description in is. 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 constexpr 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 lhs, const value_t rhs)
 Whether lhs < rhs. More...
 
static constexpr bool is_commutative ()
 
static constexpr bool is_idempotent ()
 
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 (q, const q::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={})
 

Detailed Description

Definition at line 22 of file r.hh.

Member Typedef Documentation

◆ self_t

Definition at line 25 of file r.hh.

◆ value_t

Definition at line 40 of file r.hh.

Member Function Documentation

◆ abs()

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

Definition at line 165 of file r.hh.

References vcsn::detail::v.

◆ add()

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

Definition at line 67 of file r.hh.

◆ compare()

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

Three-way comparison between l and r.

Definition at line 139 of file r.hh.

◆ conv() [1/5]

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

Definition at line 182 of file r.hh.

References vcsn::detail::v.

◆ conv() [2/5]

static value_t vcsn::detail::r_impl::conv ( q  ,
const q::value_t  v 
)
inlinestatic

Definition at line 188 of file r.hh.

◆ conv() [3/5]

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

Definition at line 194 of file r.hh.

References vcsn::detail::v.

◆ conv() [4/5]

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

Definition at line 200 of file r.hh.

References vcsn::detail::v.

◆ conv() [5/5]

value_t vcsn::detail::r_impl::conv ( std::istream &  i,
bool  = true 
) const
inline

Definition at line 206 of file r.hh.

References vcsn::res.

◆ equal()

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

Whether l == r.

Definition at line 146 of file r.hh.

◆ has_lightening_weights()

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

Definition at line 159 of file r.hh.

◆ hash()

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

Definition at line 176 of file r.hh.

References vcsn::detail::hash_value().

Here is the call graph for this function:

◆ is_commutative()

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

Definition at line 157 of file r.hh.

◆ is_idempotent()

static constexpr bool vcsn::detail::r_impl::is_idempotent ( )
inlinestatic

Definition at line 158 of file r.hh.

◆ is_one()

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

Definition at line 132 of file r.hh.

◆ is_special()

static constexpr bool vcsn::detail::r_impl::is_special ( const value_t  )
inlinestatic

Definition at line 120 of file r.hh.

◆ is_zero()

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

Definition at line 126 of file r.hh.

Referenced by lgcd(), and rdivide().

◆ ldivide()

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

Definition at line 106 of file r.hh.

References rdivide().

Here is the call graph for this function:

◆ less()

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

Whether lhs < rhs.

Definition at line 152 of file r.hh.

◆ lgcd()

value_t vcsn::detail::r_impl::lgcd ( const value_t  l,
const value_t  r 
) const
inline

Definition at line 85 of file r.hh.

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

Referenced by rgcd().

Here is the call graph for this function:

◆ make()

static r vcsn::detail::r_impl::make ( std::istream &  is)
inlinestatic

Build from the description in is.

Definition at line 34 of file r.hh.

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

Here is the call graph for this function:

◆ max()

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

Definition at line 61 of file r.hh.

◆ min()

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

Definition at line 55 of file r.hh.

References vcsn::min.

◆ mul()

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

Definition at line 79 of file r.hh.

◆ one()

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

Definition at line 49 of file r.hh.

◆ print()

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

Definition at line 216 of file r.hh.

References vcsn::detail::v.

◆ print_set()

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

Definition at line 223 of file r.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::r_impl::rdivide ( const value_t  l,
const value_t  r 
) const
inline

Definition at line 99 of file r.hh.

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

Referenced by ldivide().

Here is the call graph for this function:

◆ rgcd()

value_t vcsn::detail::r_impl::rgcd ( const value_t  l,
const value_t  r 
) const
inline

Definition at line 93 of file r.hh.

References lgcd().

Here is the call graph for this function:

◆ show_one()

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

Definition at line 161 of file r.hh.

◆ sname()

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

Definition at line 27 of file r.hh.

References vcsn::res.

Referenced by make(), and print_set().

◆ star()

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

Definition at line 112 of file r.hh.

References vcsn::raise_not_starrable(), and vcsn::detail::v.

Here is the call graph for this function:

◆ star_status()

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

Definition at line 162 of file r.hh.

References vcsn::ABSVAL.

◆ sub()

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

Definition at line 73 of file r.hh.

◆ transpose()

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

Definition at line 171 of file r.hh.

References vcsn::detail::v.

◆ zero()

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

Definition at line 43 of file r.hh.


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