Awali
Another Weighted Automata library
|
Main class for representing rational expresson at the dynamical layer. More...
#include <ratexp.hh>
Data Structures | |
struct | with_int_labels |
Helper class that contains convenience factories to build expressions whose labels are integers. More... | |
struct | with_tuple_labels |
Helper class that contains convenience factories to build expressions whose labels are tuples. More... | |
Public Member Functions | |
ratexp_t () | |
Buils an automaton_t that is essentially a nullptr ; should generally not be used. More... | |
template<class T > | |
ratexp_t (const std::shared_ptr< T > &ptr, typename std::enable_if< std::is_base_of< abstract_ratexp_t, T >::value, int >::type=0) | |
Builds a ratexp_t from a shared pointer to a class derived of abstract_ratexp_t; should generally not be used. More... | |
ratexp_t (std::string str, context::labelset_description ld, context::weightset_description wd, bool fixed_alphabet=true) | |
Builds the expression represented by str and whose labelset is described by ld and weightset by wd . More... | |
ratexp_t | operator* (ratexp_t exp) |
ratexp_t | operator+ (ratexp_t exp) |
Sum of two rational expressions. More... | |
Static Public Member Functions | |
static ratexp_t | from (std::string str, std::string weightset="B", std::string alphabet="auto") |
Builds a rational expression from its string representation. More... | |
static ratexp_t | from_context (std::string str, context::labelset_description ld, context::weightset_description wd, bool fixed_alphabet=true) |
static ratexp_t | from_context (std::string str, context_t ctx, bool fixed_alphabet=true) |
Builds a rational expression from a string representation and a context. More... | |
Main class for representing rational expresson at the dynamical layer.
A ratexp_t is essentially a shared pointer to a abstract_ratexp_t. See the documentation of that class for help on the methods on ratexps.
Aside from that, this class contain static methods to constructs rational expressions in different context. See also group Factories.
All examples below assume:
awali::dyn::ratexp_t::ratexp_t | ( | ) |
Buils an automaton_t that is essentially a nullptr
; should generally not be used.
awali::dyn::ratexp_t::ratexp_t | ( | const std::shared_ptr< T > & | ptr, |
typename std::enable_if< std::is_base_of< abstract_ratexp_t, T >::value, int >::type | = 0 |
||
) |
Builds a ratexp_t from a shared pointer to a class derived of abstract_ratexp_t; should generally not be used.
Both ptr
and the built automaton_t will share ownership of pointed object.