Awali
Another Weighted Automata library
Data Structures | Typedefs | Enumerations | Functions
awali::sttc::rat Namespace Reference

Namespace about static rational expressions. More...

Data Structures

class  atom
 
class  compact_thompson_visitor
 
class  const_visitor
 
class  constant
 
class  constant_term_visitor
 
class  copier
 
class  derivation_visitor
 
class  drawexp_visitor
 
class  equal_visit
 
class  exp
 The abstract, non-parameterized, root for all rational expression node types. More...
 
class  exp_stats_visitor
 
class  expand_visitor
 
class  hash
 
class  info
 
class  inner
 An inner node. More...
 
class  json_visitor
 
class  leaf
 The root from which to derive the final node types. More...
 
class  less_than
 
class  node
 The abstract parameterized, root for all rational expression types. More...
 
class  print_visitor
 
class  printer
 
class  ratexpset_impl
 A typed ratexp set. More...
 
class  size
 
class  split_visitor
 
class  standard_visitor
 Convert a ratexp to a standard automaton. More...
 
class  star_normal_form_visitor
 
class  thompson_visitor
 
class  unary
 
class  variadic
 An inner node with multiple children. More...
 
class  weight_node
 An inner node implementing a weight. More...
 
class  weighted_thompson_visitor
 

Typedefs

template<typename Label , typename Weight >
using complement = unary< type_t::complement, Label, Weight >
 
template<typename Label , typename Weight >
using conjunction = variadic< type_t::conjunction, Label, Weight >
 
using exp_t = std::shared_ptr< const exp >
 
template<typename Label , typename Weight >
using ldiv = variadic< type_t::ldiv, Label, Weight >
 
template<typename Label , typename Weight >
using lweight = weight_node< type_t::lweight, Label, Weight >
 
template<typename Label , typename Weight >
using one = constant< type_t::one, Label, Weight >
 
template<typename Label , typename Weight >
using prod = variadic< type_t::prod, Label, Weight >
 
template<typename Label , typename Weight >
using ratexp = std::shared_ptr< const node< Label, Weight > >
 
template<typename RatExpSet >
using ratexp_polynomial_t = typename ratexp_polynomialset_t< RatExpSet >::value_t
 Type of polynomials of ratexps from the RatExpSet type. More...
 
template<typename RatExpSet >
using ratexp_polynomialset_t = polynomialset< context< RatExpSet, weightset_t_of< RatExpSet > >>
 Type of PolynomialSet of RatExps from the RatExpSet type. More...
 
template<typename Label , typename Weight >
using rweight = weight_node< type_t::rweight, Label, Weight >
 
template<typename Label , typename Weight >
using shuffle = variadic< type_t::shuffle, Label, Weight >
 
template<typename Label , typename Weight >
using star = unary< type_t::star, Label, Weight >
 
template<typename Label , typename Weight >
using sum = variadic< type_t::sum, Label, Weight >
 
template<typename Label , typename Weight >
using transposition = unary< type_t::transposition, Label, Weight >
 
template<typename Label , typename Weight >
using zero = constant< type_t::zero, Label, Weight >
 

Enumerations

enum class  identities { trivial , associativity , series }
 A ratexpset can implement several different sets of identities on expressions. More...
 
enum class  type_t {
  zero , one , atom , sum ,
  prod , ldiv , conjunction , shuffle ,
  star , transposition , lweight , rweight ,
  complement
}
 The possible types of ratexps. More...
 

Functions

template<typename InRatExpSet , typename OutRatExpSet = InRatExpSet>
OutRatExpSet::value_t copy (const InRatExpSet &in_rs, const OutRatExpSet &out_rs, const typename InRatExpSet::value_t &v)
 
constexpr bool is_constant (type_t t)
 Whether is a constant (\z or \e). More...
 
constexpr bool is_unary (type_t t)
 Whether star, complement. More...
 
constexpr bool is_variadic (type_t t)
 Whether one of the variadic types. More...
 
identities join (identities i1, identities i2)
 
template<typename RatExpSet >
ratexp_polynomialset_t< RatExpSet > make_ratexp_polynomialset (const RatExpSet &rs)
 From a RatExpSet to its polynomialset. More...
 
identities meet (identities i1, identities i2)
 
std::ostream & operator<< (std::ostream &o, type_t t)
 
std::ostream & operator<< (std::ostream &os, identities i)
 
std::istream & operator>> (std::istream &is, identities &i)
 
std::string to_string (identities i)
 

Detailed Description

Namespace about static rational expressions.

Typedef Documentation

◆ complement

template<typename Label , typename Weight >
using awali::sttc::rat::complement = typedef unary<type_t::complement, Label, Weight>

◆ conjunction

template<typename Label , typename Weight >
using awali::sttc::rat::conjunction = typedef variadic<type_t::conjunction, Label, Weight>

◆ exp_t

using awali::sttc::rat::exp_t = typedef std::shared_ptr<const exp>

◆ ldiv

template<typename Label , typename Weight >
using awali::sttc::rat::ldiv = typedef variadic<type_t::ldiv, Label, Weight>

◆ lweight

template<typename Label , typename Weight >
using awali::sttc::rat::lweight = typedef weight_node<type_t::lweight, Label, Weight>

◆ one

template<typename Label , typename Weight >
using awali::sttc::rat::one = typedef constant<type_t::one, Label, Weight>

◆ prod

template<typename Label , typename Weight >
using awali::sttc::rat::prod = typedef variadic<type_t::prod, Label, Weight>

◆ ratexp

template<typename Label , typename Weight >
using awali::sttc::rat::ratexp = typedef std::shared_ptr<const node<Label, Weight> >

◆ ratexp_polynomial_t

template<typename RatExpSet >
using awali::sttc::rat::ratexp_polynomial_t = typedef typename ratexp_polynomialset_t<RatExpSet>::value_t

Type of polynomials of ratexps from the RatExpSet type.

◆ ratexp_polynomialset_t

template<typename RatExpSet >
using awali::sttc::rat::ratexp_polynomialset_t = typedef polynomialset<context<RatExpSet, weightset_t_of<RatExpSet> >>

Type of PolynomialSet of RatExps from the RatExpSet type.

◆ rweight

template<typename Label , typename Weight >
using awali::sttc::rat::rweight = typedef weight_node<type_t::rweight, Label, Weight>

◆ shuffle

template<typename Label , typename Weight >
using awali::sttc::rat::shuffle = typedef variadic<type_t::shuffle, Label, Weight>

◆ star

template<typename Label , typename Weight >
using awali::sttc::rat::star = typedef unary<type_t::star, Label, Weight>

◆ sum

template<typename Label , typename Weight >
using awali::sttc::rat::sum = typedef variadic<type_t::sum, Label, Weight>

◆ transposition

template<typename Label , typename Weight >
using awali::sttc::rat::transposition = typedef unary<type_t::transposition, Label, Weight>

◆ zero

template<typename Label , typename Weight >
using awali::sttc::rat::zero = typedef constant<type_t::zero, Label, Weight>

Enumeration Type Documentation

◆ identities

A ratexpset can implement several different sets of identities on expressions.

This type can represents one of those sets.

Enumerator
trivial 

Trivial identities only.

associativity 

Trivial identities only + associativity.

series 

Trivial identities plus series identities.

◆ type_t

The possible types of ratexps.

They also code the order in which they are sorted by less_than, so that, for instance, polynomials always display \e + a, and never a + \e.

Enumerator
zero 
one 
atom 
sum 
prod 
ldiv 
conjunction 
shuffle 
star 
transposition 
lweight 
rweight 
complement 

Function Documentation

◆ copy()

template<typename InRatExpSet , typename OutRatExpSet = InRatExpSet>
OutRatExpSet::value_t awali::sttc::rat::copy ( const InRatExpSet &  in_rs,
const OutRatExpSet &  out_rs,
const typename InRatExpSet::value_t &  v 
)

◆ is_constant()

constexpr bool awali::sttc::rat::is_constant ( type_t  t)
constexpr

Whether is a constant (\z or \e).

◆ is_unary()

constexpr bool awali::sttc::rat::is_unary ( type_t  t)
constexpr

Whether star, complement.

◆ is_variadic()

constexpr bool awali::sttc::rat::is_variadic ( type_t  t)
constexpr

Whether one of the variadic types.

◆ join()

identities awali::sttc::rat::join ( identities  i1,
identities  i2 
)

◆ make_ratexp_polynomialset()

template<typename RatExpSet >
ratexp_polynomialset_t<RatExpSet> awali::sttc::rat::make_ratexp_polynomialset ( const RatExpSet &  rs)

From a RatExpSet to its polynomialset.

◆ meet()

identities awali::sttc::rat::meet ( identities  i1,
identities  i2 
)

◆ operator<<() [1/2]

std::ostream & awali::sttc::rat::operator<< ( std::ostream &  o,
type_t  t 
)

◆ operator<<() [2/2]

std::ostream& awali::sttc::rat::operator<< ( std::ostream &  os,
identities  i 
)

◆ operator>>()

std::istream& awali::sttc::rat::operator>> ( std::istream &  is,
identities i 
)

◆ to_string()

std::string awali::sttc::rat::to_string ( identities  i)