Awali
Another Weighted Automata library
Public Types | Public Member Functions | Static Public Member Functions
awali::sttc::r Class Reference

The semiring of floating Numbers. More...

#include <r.hh>

Public Types

using self_type = r
 
using value_t = double
 

Public Member Functions

std::ostream & print_set (std::ostream &o, const std::string &format="text") const
 
value_t star (const value_t v) const
 
template<unsigned version = version::fsm_json>
value_t value_from_json (json::node_t const *p) const
 
template<unsigned version = version::fsm_json>
json::node_tvalue_to_json (value_t v) const
 
std::string vname (bool=true) const
 

Static Public Member Functions

static value_t abs (const value_t v)
 
static value_t add (const value_t l, const value_t r)
 
static value_t conv (b, b::value_t v)
 
static value_t conv (n, n::value_t v)
 
static value_t conv (q, q::value_t v)
 
static value_t conv (self_type, value_t v)
 
static value_t conv (std::istream &i)
 
static value_t conv (z, z::value_t v)
 
static bool equals (const value_t l, const value_t r)
 
static size_t hash (value_t v)
 
static constexpr bool is_commutative_semiring ()
 
static bool is_one (const value_t v)
 
constexpr static bool is_special (value_t)
 
static bool is_zero (const value_t v)
 
static value_t ldiv (const value_t l, const value_t r)
 
static bool less_than (value_t lhs, value_t rhs)
 Whether lhs < rhs. More...
 
static r make (std::istream &is)
 Build from the description in is. More...
 
static value_t mul (const value_t l, const value_t r)
 
static value_t one ()
 
static value_t parse (const std::string &s, size_t &p)
 
static std::ostream & print (const value_t v, std::ostream &o, const std::string &="text")
 
static value_t rdiv (const value_t l, const value_t r)
 
static constexpr bool show_one ()
 
static std::string sname ()
 
static constexpr star_status_t star_status ()
 
static value_t sub (const value_t l, const value_t r)
 
template<unsigned version = version::fsm_json>
static json::node_tto_json ()
 
static value_t transpose (const value_t v)
 
static value_t zero ()
 

Detailed Description

The semiring of floating Numbers.

The values are implemented with double.

Member Typedef Documentation

◆ self_type

◆ value_t

using awali::sttc::r::value_t = double

Member Function Documentation

◆ abs()

static value_t awali::sttc::r::abs ( const value_t  v)
static

◆ add()

static value_t awali::sttc::r::add ( const value_t  l,
const value_t  r 
)
static

◆ conv() [1/6]

static value_t awali::sttc::r::conv ( b  ,
b::value_t  v 
)
static

◆ conv() [2/6]

static value_t awali::sttc::r::conv ( n  ,
n::value_t  v 
)
static

◆ conv() [3/6]

static value_t awali::sttc::r::conv ( q  ,
q::value_t  v 
)
static

◆ conv() [4/6]

static value_t awali::sttc::r::conv ( self_type  ,
value_t  v 
)
static

◆ conv() [5/6]

static value_t awali::sttc::r::conv ( std::istream &  i)
static

◆ conv() [6/6]

static value_t awali::sttc::r::conv ( z  ,
z::value_t  v 
)
static

◆ equals()

static bool awali::sttc::r::equals ( const value_t  l,
const value_t  r 
)
static

◆ hash()

static size_t awali::sttc::r::hash ( value_t  v)
static

◆ is_commutative_semiring()

static constexpr bool awali::sttc::r::is_commutative_semiring ( )
staticconstexpr

◆ is_one()

static bool awali::sttc::r::is_one ( const value_t  v)
static

◆ is_special()

constexpr static bool awali::sttc::r::is_special ( value_t  )
staticconstexpr

◆ is_zero()

static bool awali::sttc::r::is_zero ( const value_t  v)
static

◆ ldiv()

static value_t awali::sttc::r::ldiv ( const value_t  l,
const value_t  r 
)
static

◆ less_than()

static bool awali::sttc::r::less_than ( value_t  lhs,
value_t  rhs 
)
static

Whether lhs < rhs.

◆ make()

static r awali::sttc::r::make ( std::istream &  is)
static

Build from the description in is.

◆ mul()

static value_t awali::sttc::r::mul ( const value_t  l,
const value_t  r 
)
static

◆ one()

static value_t awali::sttc::r::one ( )
static

◆ parse()

static value_t awali::sttc::r::parse ( const std::string &  s,
size_t &  p 
)
static

◆ print()

static std::ostream& awali::sttc::r::print ( const value_t  v,
std::ostream &  o,
const std::string &  = "text" 
)
static

◆ print_set()

std::ostream& awali::sttc::r::print_set ( std::ostream &  o,
const std::string &  format = "text" 
) const

◆ rdiv()

static value_t awali::sttc::r::rdiv ( const value_t  l,
const value_t  r 
)
static

◆ show_one()

static constexpr bool awali::sttc::r::show_one ( )
staticconstexpr

◆ sname()

static std::string awali::sttc::r::sname ( )
static

◆ star()

value_t awali::sttc::r::star ( const value_t  v) const

◆ star_status()

static constexpr star_status_t awali::sttc::r::star_status ( )
staticconstexpr

◆ sub()

static value_t awali::sttc::r::sub ( const value_t  l,
const value_t  r 
)
static

◆ to_json()

template<unsigned version = version::fsm_json>
static json::node_t* awali::sttc::r::to_json ( )
static

◆ transpose()

static value_t awali::sttc::r::transpose ( const value_t  v)
static

◆ value_from_json()

template<unsigned version = version::fsm_json>
value_t awali::sttc::r::value_from_json ( json::node_t const *  p) const

◆ value_to_json()

template<unsigned version = version::fsm_json>
json::node_t* awali::sttc::r::value_to_json ( value_t  v) const

◆ vname()

std::string awali::sttc::r::vname ( bool  = true) const

◆ zero()

static value_t awali::sttc::r::zero ( )
static

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