Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::dyn::detail::ratexpset_base Class Referenceabstract

Abstract wrapper around a (typeful) ratexpset. More...

#include <ratexpset.hh>

Inheritance diagram for vcsn::dyn::detail::ratexpset_base:
Collaboration diagram for vcsn::dyn::detail::ratexpset_base:

Public Types

using value_t = rat::exp_t
 
using letter_class_t = std::set< std::pair< std::string, std::string >>
 

Public Member Functions

virtual std::string vname (bool full=true) const =0
 A description of the ratexp type. More...
 
template<typename RatExpSet >
ratexpset_wrapper< RatExpSet > & as ()
 Extract wrapped typed ratexpset. More...
 
template<typename RatExpSet >
const ratexpset_wrapper
< RatExpSet > & 
as () const
 Extract wrapped typed ratexp. More...
 
virtual rat::identities identities () const =0
 
virtual value_t zero () const =0
 
virtual value_t one () const =0
 
virtual value_t atom (const std::string &w) const =0
 
virtual value_t add (value_t l, value_t r) const =0
 
virtual value_t mul (value_t l, value_t r) const =0
 Explicit product. More...
 
virtual value_t conjunction (value_t l, value_t r) const =0
 
virtual value_t shuffle (value_t l, value_t r) const =0
 
virtual value_t ldiv (value_t l, value_t r) const =0
 
virtual value_t rdiv (value_t l, value_t r) const =0
 
virtual value_t concat (value_t l, value_t r) const =0
 Implicit product. More...
 
virtual value_t star (value_t e) const =0
 
virtual value_t complement (value_t e) const =0
 Add a complement operator. More...
 
virtual value_t transposition (value_t e) const =0
 Add a transposition operator. More...
 
virtual value_t lmul (const std::string &w, value_t e) const =0
 Left-multiplication by a weight. More...
 
virtual value_t rmul (value_t e, const std::string &w) const =0
 Right-multiplication by a weight. More...
 
virtual value_t letter_class (const letter_class_t &chars, bool accept=true) const =0
 A ratexp matching one character amongst chars. More...
 
virtual dyn::ratexp make_ratexp (const value_t &v) const =0
 
virtual value_t conv (std::istream &s) const =0
 Parsing. More...
 
virtual std::ostream & print (const value_t v, std::ostream &o) const =0
 

Detailed Description

Abstract wrapper around a (typeful) ratexpset.

Use it when you want to avoid depending on the ratexpset parameters (e.g., from a parser). To use it, actually create a derived class (ratexpset_wrapper) with the given parameters, but handle as a reference to a ratexpset_base.

Definition at line 25 of file ratexpset.hh.

Member Typedef Documentation

using vcsn::dyn::detail::ratexpset_base::letter_class_t = std::set<std::pair<std::string, std::string>>

Definition at line 78 of file ratexpset.hh.

Member Function Documentation

virtual value_t vcsn::dyn::detail::ratexpset_base::add ( value_t  l,
value_t  r 
) const
pure virtual
template<typename RatExpSet >
ratexpset_wrapper<RatExpSet>& vcsn::dyn::detail::ratexpset_base::as ( )
inline

Extract wrapped typed ratexpset.

Definition at line 37 of file ratexpset.hh.

template<typename RatExpSet >
const ratexpset_wrapper<RatExpSet>& vcsn::dyn::detail::ratexpset_base::as ( ) const
inline

Extract wrapped typed ratexp.

Definition at line 44 of file ratexpset.hh.

virtual value_t vcsn::dyn::detail::ratexpset_base::atom ( const std::string &  w) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::complement ( value_t  e) const
pure virtual

Add a complement operator.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::concat ( value_t  l,
value_t  r 
) const
pure virtual

Implicit product.

If both l and r are weightless words, produce a new word that concatenates them. Otherwise, use mul.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::conjunction ( value_t  l,
value_t  r 
) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::conv ( std::istream &  s) const
pure virtual
virtual rat::identities vcsn::dyn::detail::ratexpset_base::identities ( ) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::ldiv ( value_t  l,
value_t  r 
) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::letter_class ( const letter_class_t chars,
bool  accept = true 
) const
pure virtual

A ratexp matching one character amongst chars.

Parameters
charsThe letter class as a set of ranges.
acceptWhether to accept these characters ([abc]) as opposed to refusing them ([^abc]).

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::lmul ( const std::string &  w,
value_t  e 
) const
pure virtual

Left-multiplication by a weight.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual dyn::ratexp vcsn::dyn::detail::ratexpset_base::make_ratexp ( const value_t v) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::mul ( value_t  l,
value_t  r 
) const
pure virtual

Explicit product.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::one ( ) const
pure virtual
virtual std::ostream& vcsn::dyn::detail::ratexpset_base::print ( const value_t  v,
std::ostream &  o 
) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::rdiv ( value_t  l,
value_t  r 
) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::rmul ( value_t  e,
const std::string &  w 
) const
pure virtual

Right-multiplication by a weight.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::shuffle ( value_t  l,
value_t  r 
) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::star ( value_t  e) const
pure virtual
virtual value_t vcsn::dyn::detail::ratexpset_base::transposition ( value_t  e) const
pure virtual

Add a transposition operator.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual std::string vcsn::dyn::detail::ratexpset_base::vname ( bool  full = true) const
pure virtual

A description of the ratexp type.

Parameters
fullwhether to include the genset. if false, same as sname.

Implemented in vcsn::dyn::detail::ratexpset_wrapper< RatExpSet >.

virtual value_t vcsn::dyn::detail::ratexpset_base::zero ( ) const
pure virtual

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