Awali
Another Weighted Automata library
Public Member Functions
awali::dyn::abstract_context_t Struct Referenceabstract

Abstract interface representing the weightset and labelset of an automaton, a rational expression or a transducer. More...

#include <abstract_context.hh>

Public Member Functions

virtual ~abstract_context_t ()
 
virtual void add_letter (label_t let)=0
 Adds a letter in the alphabet. More...
 
virtual weight_t add_weights (weight_t l, weight_t r) const =0
 
virtual std::vector< any_talphabet () const =0
 Returns the alphabet. More...
 
virtual weight_t div_weights (weight_t l, weight_t r) const =0
 
virtual label_t epsilon () const =0
 
virtual std::list< any_texpand_label (any_t l) const =0
 
virtual label_t get_label (std::string w) const =0
 
virtual label_t get_label (std::string w, size_t i) const =0
 
virtual weight_t get_weight (std::string w) const =0
 
virtual bool has_letter (label_t let) const =0
 Tests whether let is a valid letter. More...
 
virtual bool is_eps_allowed () const =0
 Returns true if epsilon is allowed as label. More...
 
virtual bool is_finite_weightset () const =0
 
virtual bool is_locally_finite_weightset () const =0
 
virtual std::string label_to_string (label_t w) const =0
 
virtual std::string labelset_name () const =0
 Gives the name of the labelset. More...
 
virtual weight_t mul_weights (weight_t l, weight_t r) const =0
 
virtual bool show_one () const =0
 Returns true if one (neutral multiplicative element of the weightset) should be printed in expressions. More...
 
virtual std::string sname () const =0
 Returns the compile-time internal name of the context. More...
 
virtual std::string vname (bool full=true) const =0
 Returns the runtime internal name of the context. More...
 
virtual weight_t weight_one () const =0
 Returns the value one, that is, the neutral multiplicative element of the weightset. More...
 
virtual std::string weight_to_string (weight_t w) const =0
 
virtual weight_t weight_zero () const =0
 Gives the value zero, that is, the neutral additive element of the weightset. More...
 
virtual std::string weightset_name (std::string format="text") const =0
 Gives the name of the weightset. More...
 

Detailed Description

Abstract interface representing the weightset and labelset of an automaton, a rational expression or a transducer.

Constructor & Destructor Documentation

◆ ~abstract_context_t()

virtual awali::dyn::abstract_context_t::~abstract_context_t ( )
virtual

Member Function Documentation

◆ add_letter()

virtual void awali::dyn::abstract_context_t::add_letter ( label_t  let)
pure virtual

Adds a letter in the alphabet.

◆ add_weights()

virtual weight_t awali::dyn::abstract_context_t::add_weights ( weight_t  l,
weight_t  r 
) const
pure virtual

◆ alphabet()

virtual std::vector<any_t> awali::dyn::abstract_context_t::alphabet ( ) const
pure virtual

Returns the alphabet.

◆ div_weights()

virtual weight_t awali::dyn::abstract_context_t::div_weights ( weight_t  l,
weight_t  r 
) const
pure virtual

◆ epsilon()

virtual label_t awali::dyn::abstract_context_t::epsilon ( ) const
pure virtual

◆ expand_label()

virtual std::list<any_t> awali::dyn::abstract_context_t::expand_label ( any_t  l) const
pure virtual

◆ get_label() [1/2]

virtual label_t awali::dyn::abstract_context_t::get_label ( std::string  w) const
pure virtual

◆ get_label() [2/2]

virtual label_t awali::dyn::abstract_context_t::get_label ( std::string  w,
size_t  i 
) const
pure virtual

◆ get_weight()

virtual weight_t awali::dyn::abstract_context_t::get_weight ( std::string  w) const
pure virtual

◆ has_letter()

virtual bool awali::dyn::abstract_context_t::has_letter ( label_t  let) const
pure virtual

Tests whether let is a valid letter.

◆ is_eps_allowed()

virtual bool awali::dyn::abstract_context_t::is_eps_allowed ( ) const
pure virtual

Returns true if epsilon is allowed as label.

◆ is_finite_weightset()

virtual bool awali::dyn::abstract_context_t::is_finite_weightset ( ) const
pure virtual

◆ is_locally_finite_weightset()

virtual bool awali::dyn::abstract_context_t::is_locally_finite_weightset ( ) const
pure virtual

◆ label_to_string()

virtual std::string awali::dyn::abstract_context_t::label_to_string ( label_t  w) const
pure virtual

◆ labelset_name()

virtual std::string awali::dyn::abstract_context_t::labelset_name ( ) const
pure virtual

Gives the name of the labelset.

◆ mul_weights()

virtual weight_t awali::dyn::abstract_context_t::mul_weights ( weight_t  l,
weight_t  r 
) const
pure virtual

◆ show_one()

virtual bool awali::dyn::abstract_context_t::show_one ( ) const
pure virtual

Returns true if one (neutral multiplicative element of the weightset) should be printed in expressions.

◆ sname()

virtual std::string awali::dyn::abstract_context_t::sname ( ) const
pure virtual

Returns the compile-time internal name of the context.

Two automaton_t (resp. ratexp_t, resp. transducer_t) wraps static objects of the exact same type if and only if with contexts that have equal sname.

◆ vname()

virtual std::string awali::dyn::abstract_context_t::vname ( bool  full = true) const
pure virtual

Returns the runtime internal name of the context.

The difference with sname is that the vname contains additional information that are not part of the static type (for instance the alphabet in the case of automata).

◆ weight_one()

virtual weight_t awali::dyn::abstract_context_t::weight_one ( ) const
pure virtual

Returns the value one, that is, the neutral multiplicative element of the weightset.

◆ weight_to_string()

virtual std::string awali::dyn::abstract_context_t::weight_to_string ( weight_t  w) const
pure virtual

◆ weight_zero()

virtual weight_t awali::dyn::abstract_context_t::weight_zero ( ) const
pure virtual

Gives the value zero, that is, the neutral additive element of the weightset.

◆ weightset_name()

virtual std::string awali::dyn::abstract_context_t::weightset_name ( std::string  format = "text") const
pure virtual

Gives the name of the weightset.


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