Vaucanson 1.4
Classes | Files | Functions
Algorithms

Classes

struct  KRatExpFlatten< Series, T, Dispatch >
struct  linearize_element< S, T >
 The types of a linearized expression. More...
struct  FindBestSearch
 Specific implementation for search(). More...
struct  WindowedBackSearch
 Specific implementation for search(). More...

Files

file  accessible.hh
 

Algorithms for accessible/coaccessible states computation.


file  aci_canonical.hh
 

Declaration for the canonical() algorithm.


file  aut_projection.hh
 

Projections for automata that support it (it depends on the letter type).


file  aut_to_exp.hh
 

This file provides converter from automaton to expression.


file  berry_sethi.hh
 

Contains the declaration for the Berry-Sethi algorithm.


file  brzozowski.hh
 

Contains the declaration for the Brzozowski algorithm.


file  complement.hh
 

Complementation algorithm for Boolean automata.


file  complete.hh
 

Testing and building complete automata.


file  composition_cover.hh
 

Composition for normalized and sub-normalized transducers seen as automata over a free monoid product.


file  derived_term_automaton.hh
 

Provides a converter from expression to automaton based on derivatives.


file  determinize.hh
 

Boolean automata determinization.


file  domain.hh
 

Domain algorithm.


file  eps_removal.hh
 

This files declares the backward and forward eps_removal algorithm.


file  eps_removal_sp.hh
 

This files declares the backward and forward eps_removal algorithm.


file  equivalent.hh
 

This file contains the declarations for the are_equivalent() algorithm.


file  eval.hh
 

This file provides the evaluation of a word w.r.t an automaton.


file  evaluation_fmp.hh
 

Evaluation over normalized and sub-normalized transducers seen as automata over a free monoid product.


file  evaluation_rw.hh
 

Evaluation of an RW transducer over a realtime automaton.


file  extension.hh
 

Declarations for extension().


file  factor.hh
 

Compute an automaton which accepts any factor of the language accepted by the given automaton.


file  finite_support_conversion.hh
 

Conversion between finite support application types.


file  fmp_to_rw.hh
 

This file provides a transformation function that computes the Rational Weight transducer of a FMP automaton.


file  image.hh
 

Image projection for transducers.


file  infiltration.hh
 

Declarations of infiltration().


file  initial_derivation.hh
 

Declaration of the initial derivation visitor, used for smart_derivative_automaton.


file  evaluation.hh
 

Internal functions used by the rw_composition algorithm.


file  outsplitting.hh
 

Outsplitting and insplitting algorithms for normalized and sub-normalized fmp_transducers.


file  is_ambiguous.hh
 

Test for ambiguity.


file  is_deterministic.hh
 

Boolean automata determinization.


file  is_empty.hh
 

Declaration of is_empty().


file  is_ltl.hh
 

Letter-to-letter feature testing.


file  is_normalized.hh
 

Test for transducer normalization.


file  is_trim.hh
 

Declaration of is_trim()


file  is_useless.hh
 

Declaration of is_useless().


file  isomorph.hh
 

This files contains the declaration for the are_isomorphic() algorithm.


file  krat_exp_cderivation.hh
 

Declaration for the cderivate() algorithms.


file  krat_exp_constant_term.hh
 

Declaration for the constant_term() algorithm.


file  krat_exp_derivation.hh
 

Declaration for the derivate() algorithms.


file  krat_exp_expand.hh
 

Expand a k-rational-expression.


file  krat_exp_flatten.hh
 

This file holds the declaration of the flatten() algorithm.


file  krat_exp_linearize.hh
 

Declarations for the linearize() algorithm.


file  krat_exp_partial_derivation.hh
 

Declarations for the partial_derivate() algorithm.


file  krat_exp_realtime.hh
 

Declarations of the realtime() algorithm for rational expressions.


file  letter_to_letter_composition.hh
 

Undocumented stuff.


file  ltl_to_pair.hh
 

This file provides a transformation function that computes the pair letter automaton of an FMP automaton.


file  minimization_hopcroft.hh
 

This file provides minimization and quotient algorithms.


file  minimization_moore.hh
 

This file containes the declaration of minimization_moore().


file  normalized.hh
 

Thompson normalization operations.


file  normalized_composition.hh
 

Composition for normalized and sub-normalized transducers seen as automata over a free monoid product.


file  one_eps_closure.hh
 

This file declares the backward and forward one_eps_closure algorithm.


file  pair_to_fmp.hh
 

This file provides a transformation function that computes the FMP transducer of a pair letter automaton.


file  prefix.hh
 

Compute an automaton which accepts any prefix of the language accepted by the given automaton.


file  product.hh
 

Declarations of product().


file  projection.hh
 

Build an FMP transducer that realizes the identity relation.


file  realtime.hh
 

General algorithms concerning realtime aspect of automata.


file  realtime_decl.hh
 

Declaration of the realtime() function.


file  reduce.hh
 

This files declares the reduce algorithm.


file  rw_composition.hh
 

Composition of two Rational-Weight transducers.


file  rw_to_fmp.hh
 

This file provides a transformation function that computes the equivalent FMP automaton of a Rational Weight tranducer.


file  search.hh
 

Rational expression search in text.


file  shortest.hh
 

Algorithms for enumeration of short words in a language.


file  shuffle.hh
 

Declarations of shuffle().


file  standard.hh
 

Several algorithms concerning standard automata.


file  standard_of.hh
 

This file provides a converter from expression to standard automaton.


file  sub_automaton.hh
 

This file provides the extraction of sub automaton.


file  sub_normalize.hh
 

Sub-normalization algorithm for FMP transducers.


file  suffix.hh
 

Compute an automaton which accepts any suffix of the language accepted by the given automaton.


file  thompson.hh
 

The thompson automaton.


file  algorithms/transpose.hh
 

This file contains the function which transposes an automaton.


file  trim.hh
 

Declaration of useful_states() and trim().


file  universal.hh
 

Universal automaton for Boolean rational languages.


Functions

template<typename A , typename AI >
std::set< typename Element< A,
AI >::hstate_t > 
accessible_states (const Element< A, AI > &a)
 Return accessible states.
template<typename A , typename AI >
Element< A, AI > accessible (const Element< A, AI > &a)
 Extract the sub-automaton composed of accessible states.
template<typename A , typename AI >
void accessible_here (Element< A, AI > &a)
 In-place extract the sub-automaton of accessible states.
template<typename A , typename AI >
std::set< typename Element< A,
AI >::hstate_t > 
coaccessible_states (const Element< A, AI > &a)
 Return co-accessible states.
template<typename A , typename AI >
Element< A, AI > coaccessible (const Element< A, AI > &a)
 Extract the sub-automaton composed of co-accessible states.
template<typename A , typename AI >
void coaccessible_here (Element< A, AI > &a)
 In-place extract the sub-automaton of co-accessible states.
template<typename S , typename SI >
Element< S, SI > canonical (const Element< S, SI > &exp)
 Transform a krat expression into a canonical form using only ACI-rules.
template<typename A , typename AI >
Element< A, AI >::series_set_elt_t aut_to_exp (const Element< A, AI > &a)
 Returns a series which describes the language of the automaton.
template<typename A , typename AI , typename Chooser >
Element< A, AI >::series_set_elt_t aut_to_exp (const Element< A, AI > &a, const Chooser &c)
 Returns a series which describes the language of the automaton.
template<typename A , typename T , typename Exp >
void berry_sethi (Element< A, T > &, const Exp &)
 Build an automaton from an expression using the Berry-Sethi construction.
template<typename A , typename T , typename Exp >
void brzozowski (Element< A, T > &, const Exp &)
 Build an automaton from an expression using the Brzozowski construction.
template<typename A , typename AI >
void complement_here (Element< A, AI > &a)
 Complement in place the set of final states.
template<typename A , typename AI >
Element< A, AI > complement (const Element< A, AI > &a)
 Complement the set of final states.
template<typename A , typename AI >
void complete_here (Element< A, AI > &a)
 Make the transition function of an automaton total w.r.t.
template<typename A , typename AI >
Element< A, AI > complete (const Element< A, AI > &a)
 Make the transition function of an automaton total w.r.t.
template<typename A , typename AI >
bool is_complete (const Element< A, AI > &a)
 Test whether an automaton is complete.
template<typename S , typename T >
Element< S, T > composition_cover (const Element< S, T > &fmp)
 Facade for composition cover.
template<typename S , typename T >
Element< S, T > composition_co_cover (const Element< S, T > &fmp)
 Facade for composition co-cover.
template<typename A , typename T , typename Exp >
void derived_term_automaton (Element< A, T > &a, const Exp &e)
 Convert a krat expression into an automaton using derivatives.
template<typename A , typename T , typename Exp >
Element< A, T > derived_term_automaton (const Exp &e)
 Convert a krat expression into an automaton using derivatives.
template<typename A , typename T , typename Exp >
Element< A, T > broken_derived_term_automaton (const Exp &e)
 Convert a krat expression into an automaton using derivatives.
template<typename A , typename AI >
bool is_proper (const Element< A, AI > &a)
 Test whether an automaton is proper.
template<typename A , typename AI >
void eps_removal_here (Element< A, AI > &a, misc::direction_type dir=misc::backward)
 In place eps_removal of an automaton (default is backward eps_removal).
template<typename A , typename AI >
Element< A, AI > eps_removal (const Element< A, AI > &a, misc::direction_type dir=misc::backward)
 Eps_Removal of an automaton (default is backward eps_removal).
template<typename A , typename AI >
void backward_eps_removal_here (Element< A, AI > &a)
 In place backward eps_removal of an automaton.
template<typename A , typename AI >
Element< A, AI > backward_eps_removal (const Element< A, AI > &a)
 Backward eps_removal of an automaton.
template<typename A , typename AI >
void forward_eps_removal_here (Element< A, AI > &a)
 In place forward eps_removal of an automaton.
template<typename A , typename AI >
Element< A, AI > forward_eps_removal (const Element< A, AI > &a)
 Forward eps_removal of an automaton.
template<typename A , typename AI >
void eps_removal_here_sp (Element< A, AI > &a, misc::direction_type dir=misc::backward)
 In place eps_removal_sp of an automaton (default is backward eps_removal).
template<typename A , typename AI >
Element< A, AI > eps_removal_sp (const Element< A, AI > &a, misc::direction_type dir=misc::backward)
 Eps_Removal of an automaton (default is backward eps_removal).
template<typename A , typename AI >
void backward_eps_removal_here_sp (Element< A, AI > &a)
 In place backward eps_removal_sp of an automaton.
template<typename A , typename AI >
Element< A, AI > backward_eps_removal_sp (const Element< A, AI > &a)
 Backward eps_removal_sp of an automaton.
template<typename A , typename AI >
void forward_eps_removal_here_sp (Element< A, AI > &a)
 In place forward eps_removal_sp of an automaton.
template<typename A , typename AI >
Element< A, AI > forward_eps_removal_sp (const Element< A, AI > &a)
 Forward eps_removal_sp of an automaton.
template<typename S , typename A , typename B >
bool are_equivalent (const Element< S, A > &a, const Element< S, B > &b)
 Returns true iff the two boolean automata are equivalents, i.e., if they recognize the same language.
template<typename A , typename AI , typename W >
Element< A, AI >::semiring_elt_t eval (const Element< A, AI > &a, const W &word)
 Return the image of a word by an automaton.
template<typename ST , typename TT >
void evaluation_fmp (const Element< ST, TT > &trans, const typename input_projection_helper< ST, TT >::ret &aut, typename output_projection_helper< ST, TT >::ret &res)
 Evaluation over normalized and sub-normalized transducers, seen as automata over a free monoid product.
template<typename SA , typename TA , typename ST , typename TT , typename SRET , typename TRET >
void evaluation_rw (const Element< SA, TA > &a, const Element< ST, TT > &t, Element< SRET, TRET > &ret)
 Evaluate for a "letterized" automaton and a realtime transducer.
template<typename S , typename K , typename T >
identity_transducer_helper< S,
K, T >::ret 
extension (const Element< S, T > &)
 Extend an automaton to a transducer.
template<typename SA , typename TA , typename ST , typename TT >
Element< ST, TT > extension (const Element< SA, TA > &, const Element< ST, TT > &)
 Extend an automaton to a transducer.
template<typename A , typename AI >
void factor_here (const Element< A, AI > &a)
 Make every states of the automaton initial and final states (in place).
template<typename A , typename AI >
Element< A, AI > factor (const Element< A, AI > &a)
 Make every states of the automaton initial and final states.
template<typename S , typename T , typename Ss , typename Ts >
void finite_support_convert (Element< S, T > &dst, const Element< Ss, Ts > &org)
 Finite support conversion.
template<typename SA , typename TA , typename M >
void partial_elimination (const Element< SA, TA > &a, M &state_exp_pair)
 This function computes a set of expression, after having eliminated all states which are not initial or final.
template<typename S1 , typename T1 , typename S2 , typename T2 , typename M >
void partial_evaluation (const Element< S1, T1 > &E, const Element< S2, T2 > &S, const typename Element< S2, T2 >::hstate_t &p, M &res)
 Partial evaluation of a K RatExp E over a realtime transducer S, starting from a given state p.
template<typename A , typename AI >
bool is_ambiguous (const Element< A, AI > &aut)
 Test the ambiguity of automaton.
template<typename A , typename AI >
bool is_deterministic (const Element< A, AI > &a)
 Test if an automaton is deterministic.
template<typename A , typename AI >
bool is_empty (const Element< A, AI > &a)
 Evaluate if an automaton is empty.
template<typename S , typename A >
bool is_ltl (const Element< S, A > &t)
 Test whether an FMP transducer is letter-to-letter.
template<typename S , typename A >
bool is_normalized_transducer (const Element< S, A > &t)
 Test the normalization of transducer.
template<typename A , typename AI >
bool is_trim (const Element< A, AI > &a)
 Return true is all states are reachable and co-reachable.
template<typename A , typename AI >
bool is_useless (const Element< A, AI > &a)
 Return true if the automaton has no successful computation.
template<typename A , typename T >
bool are_isomorphic (const Element< A, T > &a, const Element< A, T > &b)
 Returns true if the two automata are isomorphic.
template<class Series , class T , class Letter >
Element< Series, T > cderivate (const Element< Series, T > &exp, Letter a)
 The c-derivative of the krat expression w.r.t to a letter.
template<class Series , class T , class Word >
Element< Series, T > word_cderivate (const Element< Series, T > &exp, Word a)
 The c-derivative of the krat expression w.r.t to a word.
template<class Series , class T >
std::pair< typename Element
< Series, T >::semiring_elt_t,
bool > 
constant_term (const Element< Series, T > &exp)
 Return the constant term of the krat expression.
template<class Series , class T , class Letter >
std::pair< Element< Series, T >
, bool > 
derivate (const Element< Series, T > &exp, Letter a)
 The antimirov derivative of the krat expression w.r.t to a letter.
template<class Series , class T , class Word >
std::pair< Element< Series, T >
, bool > 
word_derivate (const Element< Series, T > &exp, Word a)
 The antimirov derivative of the krat expression w.r.t to a word.
template<class Series , class T >
std::list< typename
Series::monoid_t::alphabet_t::letter_t > 
flatten (const Element< Series, T > &exp)
 This algorithm extracts the letters from a rational expression.
template<class Series , class T >
linearize_element< Series, T >
::element_t 
linearize (const Element< Series, T > &exp)
 The linearization of the krat expression.
template<class Series , class T , class Letter >
std::pair< std::set< Element
< Series, T > >, bool > 
partial_derivate (const Element< Series, T > &exp, Letter a)
 The partial derivative of the krat expression w.r.t to a letter.
template<class S , class T >
Element< S, T > letter_to_letter_composition (const Element< S, T > &lhs, const Element< S, T > &rhs)
 Undocumented.
template<typename A , typename AI >
Element< A, AI > minimization_hopcroft (const Element< A, AI > &a)
 Return the minimal automaton using the hopcroft algorithm.
template<typename A , typename AI >
Element< A, AI > quotient (const Element< A, AI > &a)
 Return the quotient of a non-deterministic acceptor.
template<typename A , typename AI >
Element< A, AI > minimization_moore (const Element< A, AI > &a)
 Returns the minimal deterministic automaton associated to the input one.
template<typename A , typename AI >
Element< A, AI > co_minimization_moore (const Element< A, AI > &a)
 Returns the co-minimal co-deterministic automaton associated to the input one.
template<typename A , typename AI >
void minimization_moore_here (Element< A, AI > &a)
 Minimalize the deterministic input automaton.
template<typename A , typename AI >
void co_minimization_moore_here (Element< A, AI > &a)
 Co-minimalize the co-deterministic input automaton.
template<typename A , typename AI >
Element< A, AI > normalize (const Element< A, AI > &a)
 Return the fresh thompson-normalized automaton.
template<typename A , typename AI >
void normalize_here (Element< A, AI > &a)
 In-place normalize to the thompson form.
template<typename A , typename AI >
bool is_normalized (const Element< A, AI > &a)
 Return true if the input automaton is thompson-normalized.
template<typename A , typename AI1 , typename AI2 >
void union_of_normalized_here (Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Do the in-place union of two thompson-normalized automata.
template<typename A , typename AI1 , typename AI2 >
Element< A, AI1 > union_of_normalized (const Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Return the fresh union of two thompson-normalized automata.
template<typename A , typename AI1 , typename AI2 >
void concatenate_of_normalized_here (Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Do the in-place concatenation of two thompson-normalized automata.
template<typename A , typename AI1 , typename AI2 >
Element< A, AI1 > concatenate_of_normalized (const Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Return the fresh concatenation of two thompson-normalized automata.
template<typename A , typename AI >
void star_of_normalized_here (Element< A, AI > &a)
 Do in-place star transformation on the thompson-normalized input.
template<typename A , typename AI >
Element< A, AI > star_of_normalized (const Element< A, AI > &a)
 Return the fresh star transformation of its normalized input.
template<typename S , typename T >
void compose (const Element< S, T > &lhs, const Element< S, T > &rhs, Element< S, T > &ret)
 Composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.
template<typename S , typename T >
Element< S, T > compose (const Element< S, T > &lhs, const Element< S, T > &rhs)
 Composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.
template<typename S , typename T >
void u_compose (const Element< S, T > &lhs, const Element< S, T > &rhs, Element< S, T > &ret)
 Unambiguous composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.
template<typename S , typename T >
Element< S, T > u_compose (const Element< S, T > &lhs, const Element< S, T > &rhs)
 Unambiguous composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.
template<typename A , typename AI , typename EPS >
void one_eps_closure (Element< A, AI > &a, const EPS &eps, misc::direction_type dir=misc::backward)
 In place one_eps_closure of an automaton (default is backward eps_closure).
template<typename A , typename AI , typename EPS >
void backward_one_eps_closure (Element< A, AI > &a, const EPS &eps)
 In place backward_one_eps_closure of an automaton.
template<typename A , typename AI , typename EPS >
void forward_one_eps_closure (Element< A, AI > &a, const EPS &eps)
 In place forward one_eps_closure of an automaton.
template<typename A , typename AI >
void prefix_here (const Element< A, AI > &a)
 Make every states of the automaton final states (in place).
template<typename A , typename AI >
Element< A, AI > prefix (const Element< A, AI > &a)
 Make every states of the automaton final states.
template<typename auto_t , typename trans_t >
void set_states (const trans_t &, auto_t &, std::map< typename trans_t::hstate_t, typename auto_t::hstate_t > &)
template<typename A , typename AI >
void realtime_here (Element< A, AI > &a, misc::direction_type dir)
 Modify an automaton in place to make it realtime.
template<typename A , typename AI >
Element< A, AI > realtime (const Element< A, AI > &a, misc::direction_type dir)
 Create a realtime automaton from another one.
template<typename S , typename T >
Element< S, T > realtime (const Element< S, T > &e)
 Compute the realtime version of a rational expression or an automata.
template<typename S , typename T >
void realtime_here (Element< S, T > &e)
 Modify a rational expression or automata in place to make it realtime.
template<typename S , typename T >
bool is_realtime (const Element< S, T > &e)
 Test whether an automaton or a rational expression is realtime.
template<typename S , typename T >
void rw_composition (const Element< S, T > &lhs, const Element< S, T > &rhs, Element< S, T > &ret)
 Composition for Rational-Weight transducers.
template<typename S , typename T >
Element< S, T > rw_composition (const Element< S, T > &lhs, const Element< S, T > &rhs)
 Composition for Rational-Weight transducers.
template<typename InputIterator , typename FoundFunctor , typename Series , typename Kind , typename T >
void search (const Element< Automata< Series, Kind >, T > &a, const InputIterator &begin, const InputIterator &end, typename Element< Automata< Series, Kind >, T >::letter_t eol, FoundFunctor &f)
 Search for a rational expression into a text.
template<typename Series , typename Kind , typename T , typename StatesSet >
static unsigned int compute_distances (const Element< Automata< Series, Kind >, T > &a, std::vector< StatesSet > &distances)
 Compute distances from initial states to final states.
template<typename InputIterator , typename Series , typename Kind , typename T , typename StatesSet >
static std::pair< bool,
unsigned int > 
window_backsearch (const misc::Window< InputIterator, typename Element< Automata< Series, Kind >, T >::letter_t > &w, const Element< Automata< Series, Kind >, T > &a, const std::vector< StatesSet > &distances)
 Back search inside a window.
template<typename InputIterator , typename FoundFunctor , typename Series , typename Kind , typename T >
static InputIterator confirm_and_report_match (const misc::Window< InputIterator, typename Element< Automata< Series, Kind >, T >::letter_t > &w, const Element< Automata< Series, Kind >, T > &a, FoundFunctor &f)
 Finds the longest match of a starting from w, and report it to the functor.
template<typename Automaton >
Automaton::monoid_elt_t shortest (const Automaton &autom)
 Return the smallest accepted word.
template<typename Automaton , typename MonoidElt >
bool shortest (const Automaton &autom, MonoidElt &word)
 Compute the smallest accepted word.
template<typename Automaton , typename MonoidElt , typename Alloc >
void enumerate (const Automaton &autom, unsigned max_length, std::list< MonoidElt, Alloc > &word_list)
 Compute the list of short accepted words.
template<typename A , typename AI1 , typename AI2 >
void union_here (Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 In place union of two automata.
template<typename A , typename AI1 , typename AI2 >
Element< A, AI1 > union_ (const Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Union of two automata.
template<typename A , typename AI >
bool is_standard (const Element< A, AI > &a)
 Returns true iff the input automaton is standard.
template<typename A , typename AI >
void standardize (Element< A, AI > &a)
 Returns a standard automaton associated to the input.
template<typename A , typename AI1 , typename AI2 >
void sum_of_standard_here (Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 In-place sum of two standard automata.
template<typename A , typename AI1 , typename AI2 >
Element< A, AI1 > sum_of_standard (const Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Return a fresh sum of two standard automata.
template<typename A , typename AI1 , typename AI2 >
void concat_of_standard_here (Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 In-place concatenation of two standard automata.
template<typename A , typename AI1 , typename AI2 >
Element< A, AI1 > concat_of_standard (const Element< A, AI1 > &lhs, const Element< A, AI2 > &rhs)
 Return a fresh concatenation of two standard automata.
template<typename A , typename AI >
void star_of_standard_here (Element< A, AI > &a)
 In-place star transformation of a standard automaton.
template<typename A , typename AI >
Element< A, AI > star_of_standard (const Element< A, AI > &a)
 Return the fresh star transformation of a standard automata.
template<typename A , typename AI >
void left_mult_of_standard_here (Element< A, AI > &aut, const typename Element< A, AI >::series_set_elt_t &k)
 In-place left exterior multiplication by a weight.
template<typename A , typename AI >
void right_mult_of_standard_here (Element< A, AI > &aut, const typename Element< A, AI >::series_set_elt_t &k)
 In-place right exterior multiplication by a weight.
template<typename A , typename T , typename Exp >
void standard_of (Element< A, T > &a, const Exp &e)
 Convert a rational expression into a standard automaton.
template<typename A , typename AI , typename HStatesSet >
Element< A, AI > sub_automaton (const Element< A, AI > &a, const HStatesSet &s, bool check_states=true)
 Returns a fresh automaton that is the sub-automaton defined by a set.
template<typename A , typename AI , typename HStatesSet >
void sub_automaton_here (Element< A, AI > &a, const HStatesSet &s, bool check_states=true)
 Select a sub-automaton into a given automaton.
template<class S , class T >
Element< S, T > sub_normalize (const Element< S, T > &a)
 Sub-normalize a FMP transducer.
template<class S , class T1 , class T2 >
void sub_normalize (const Element< S, T1 > &a, Element< S, T2 > &res)
 Sub-normalize a FMP transducer.
template<class S , class T >
void sub_normalize_here (Element< S, T > &a)
 Sub-normalize a FMP transducer, in place version.
template<class S , class T >
bool is_sub_normalized (const Element< S, T > &a)
 Check if a FMP transducer is sub-normalized.
template<typename A , typename AI >
void suffix_here (const Element< A, AI > &a)
 Make every states of the automaton initial states (in place).
template<typename A , typename AI >
Element< A, AI > suffix (const Element< A, AI > &a)
 Make every states of the automaton initial states.
template<typename A , typename T , typename Letter , typename Weight >
void thompson_of (Element< A, T > &out, const rat::exp< Letter, Weight > &kexp)
 The Thompson automaton associated to the krat expression.
template<typename AutoType , typename S , typename K , class T >
Element< Automata< S, K >
, AutoType > 
thompson_of (const Element< S, T > &exp)
 The Thompson automaton associated to the krat expression.
template<typename A , typename AI1 , typename AI2 >
void transpose (Element< A, AI1 > &dst, const Element< A, AI2 > &src)
 Transposition of an automaton.
template<typename A , typename AI >
Element< A, AI > transpose (const Element< A, AI > &src)
 Return a fresh transposed automaton.
template<typename A , typename AI >
std::set< typename Element< A,
AI >::hstate_t > 
useful_states (const Element< A, AI > &a)
 Returns a useful states of the automaton.
template<typename A , typename AI >
Element< A, AI > trim (const Element< A, AI > &a)
 Return a fresh automaton in which non useful states are removed.
template<typename A , typename AI >
void trim_here (Element< A, AI > &a)
 Trim a.

Determinization algorithms

template<typename A , typename AI >
Element< A, AI > determinize (const Element< A, AI > &a)
 Build a deterministic automaton from a Boolean automaton.
template<typename A , typename AI >
Element< A, AI > determinize (const Element< A, AI > &a, std::map< typename Element< A, AI >::hstate_t, std::set< typename Element< A, AI >::hstate_t > > &m)
 Build a deterministic automaton from a Boolean automaton, keeping trace of state-to-states correspondences.

FMP automaton to rational weight transducer algorithm.

Compute the equivalent Rational Weight transducer of a FMP automaton.

Please note that for the moment this function works only if the support of each transition is finite.

Algorithm : If the FMP contains transitions with "complex" expression (E), i.e. infinite support, then Thompson of E. With the resulting automaton apply a conversion. i.e. (a,x) -> a|x

template<typename S , typename T , typename SS , typename TT >
Element< SS, TT > & fmp_to_rw (const Element< S, T > &fmp, Element< SS, TT > &res)

Infiltration algorithm

Returns a fresh automaton that is the infiltration of the two input ones.

Precondition:
The two input automata must be realtime.
template<typename A , typename T , typename U >
Element< A, T > infiltration (const Element< A, T > &lhs, const Element< A, U > &rhs, const bool use_geometry=false)
template<typename A , typename T , typename U >
Element< A, T > infiltration (const Element< A, T > &lhs, const Element< A, U > &rhs, std::map< typename T::hstate_t, std::pair< typename T::hstate_t, typename U::hstate_t > > &, const bool use_geometry=false)

Letter-to-letter FMP automaton to pair letter automaton algorithm.

Compute the pair letter automaton associated to an ltl FMP automaton.

template<typename S , typename T >
void ltl_to_pair (const Element< S, T > &ltl, typename mute_ltl_to_pair< S, T >::ret &res)
template<typename S , typename T >
mute_ltl_to_pair< S, T >::ret ltl_to_pair (const Element< S, T > &ltl)

Pair letter automaton to FMP transducer algorithm.

Compute the FMP transducer associated to a pair letter automaton.

template<typename S , typename T >
void pair_to_fmp (const Element< S, T > &aut, typename mute_pair_to_fmp< S, T >::ret &res)
template<typename S , typename T >
mute_pair_to_fmp< S, T >::ret pair_to_fmp (const Element< S, T > &aut)

Product algorithm

Returns a fresh automaton that is the product of the two input ones.

Precondition:
The two input automata must be realtime.
template<typename A , typename T , typename U >
Element< A, T > product (const Element< A, T > &lhs, const Element< A, U > &rhs, const bool use_geometry=false)
template<typename A , typename T , typename U >
Element< A, T > product (const Element< A, T > &lhs, const Element< A, U > &rhs, std::map< typename T::hstate_t, std::pair< typename T::hstate_t, typename U::hstate_t > > &, const bool use_geometry=false)

Rational Weight transducer to FMP automaton conversion

template<typename S , typename T , typename SS , typename TT >
Element< SS, TT > & rw_to_fmp (const Element< S, T > &trans, Element< SS, TT > &res)
 Compute the equivalent FMP automaton of a Rational Weight transducer.

Shuffle algorithm

Returns a fresh automaton that is the shuffle of the two input ones.

Precondition:
The two input automata must be realtime.
template<typename A , typename T , typename U >
Element< A, T > shuffle (const Element< A, T > &lhs, const Element< A, U > &rhs, const bool use_geometry=false)
template<typename A , typename T , typename U >
Element< A, T > shuffle (const Element< A, T > &lhs, const Element< A, U > &rhs, std::map< typename T::hstate_t, std::pair< typename T::hstate_t, typename U::hstate_t > > &, const bool use_geometry=false)

Universal algorithm

template<typename A , typename AI >
Element< A, AI > universal (const Element< A, AI > &a)
 Build a universal automaton from a Boolean automaton.

Function Documentation

std::set< typename Element< A, AI >::hstate_t > accessible_states ( const Element< A, AI > &  a)

Return accessible states.

This functions returns the accessible states set of its input automaton.

Parameters:
aThe input automaton.
See also:
accessible(), coaccessible(), coaccessible_states()

Definition at line 83 of file accessible.hxx.

References Element< S, T >::structure().

Referenced by vcsn::accessible(), vcsn::accessible_here(), and vcsn::is_trim().

Element< A, AI > accessible ( const Element< A, AI > &  a)

Extract the sub-automaton composed of accessible states.

This function returns a fresh sub-automaton of its input containing only accessible states.

Parameters:
aThe input automaton.
See also:
accessible_here(), accessible_states(), coaccessible(), coaccessible_states()

Definition at line 98 of file accessible.hxx.

References vcsn::accessible_states(), and vcsn::sub_automaton().

void accessible_here ( Element< A, AI > &  a)

In-place extract the sub-automaton of accessible states.

This function computes the sub-autmaton of accessible states from its input automaton. The operation is performed in-place.

Parameters:
aAn in/out parameter which contains the automaton to work on as input and the result as output.
See also:
accessible(), accessible_states(), coaccessible(), coaccessible_states()

Definition at line 91 of file accessible.hxx.

References vcsn::accessible_states(), and vcsn::sub_automaton_here().

std::set< typename Element< A, AI >::hstate_t > coaccessible_states ( const Element< A, AI > &  a)

Return co-accessible states.

This functions returns the co-accessible states set of its input automaton, i.e. states which are accessible from final states.

Parameters:
aThe input automaton.
See also:
coaccessible(), accessible(), accessible_states()

Definition at line 117 of file accessible.hxx.

References Element< S, T >::structure().

Referenced by vcsn::coaccessible(), vcsn::coaccessible_here(), and vcsn::is_trim().

Element< A, AI > coaccessible ( const Element< A, AI > &  a)

Extract the sub-automaton composed of co-accessible states.

This function returns a fresh sub-automaton of its input containing only co-accessible states, i.e. states which are accessible from final states.

Parameters:
aThe input automaton.
See also:
coaccessible_here(), coaccessible_states(), accessible(), accessible_states()

Definition at line 124 of file accessible.hxx.

References vcsn::coaccessible_states(), and vcsn::sub_automaton().

void coaccessible_here ( Element< A, AI > &  a)

In-place extract the sub-automaton of co-accessible states.

This function computes the sub-autmaton of co-accessible states from its input automaton. The operation is performed in-place.

Parameters:
aAn in/out parameter which contains the automaton to work on as input and the result as output.
See also:
coaccessible(), coaccessible_states(), accessible(), accessible_states()

Definition at line 131 of file accessible.hxx.

References vcsn::coaccessible_states(), and vcsn::sub_automaton_here().

Element< S, SI > canonical ( const Element< S, SI > &  exp)

Transform a krat expression into a canonical form using only ACI-rules.

We call ACI-rules the following equivalences:

  • Associativity of the sum: (E+F)+G = E+(F+G)
  • Commutativity of the sum: E+F = F+E
  • Idempotence of the sum: E+E = E

This algorithm will take a krat expression, and rebuild it from the ground up. Each time a sum (or a sum of sums) is found, its operands are ordered in a way that is unique and duplicate operands are removed.

Note that two krat expressions can be equivalent even though their canonical forms are different. For instance E.E* and E*.E are equivalent, but they will not be rewritten by this algorithm since they do not contain any sum.

This algorithm will run in $ O(n\log n) $, where $n$ is the number of nodes of the input expression.

Parameters:
expThe input krat expression.

Definition at line 181 of file aci_canonical.hxx.

References Element< S, T >::structure().

Referenced by BrzozowskiAlgo< T_auto, Exp >::on_state().

Element< A, AI >::series_set_elt_t aut_to_exp ( const Element< A, AI > &  a)

Returns a series which describes the language of the automaton.

This algorithm works on every kind of series. However, if, during the computation, it must take the star of it, it can fail. By passing a "generalized" automaton, that is an automaton with rational expression as label, you will be sure to have the algorithm succeed since we can always take the star of a rational expression.

Parameters:
aThe automaton to convert.
Returns:
A rational series that describes the language of the automaton.
See also:
generalized()

Definition at line 368 of file aut_to_exp.hxx.

Element< A, AI >::series_set_elt_t aut_to_exp ( const Element< A, AI > &  a,
const Chooser &  c 
)

Returns a series which describes the language of the automaton.

This algorithm works on every kind of series. However, if, during the computation, it must take the star of it, it can fail. By passing a "generalized" automaton, that is an automaton with rational expression as label, you will be sure to have the algorithm succeed since we can always take the star of a rational expression.

Parameters:
aThe automaton to work on.
cAn object-function that returns the next state to remove from the current state and the automaton.
Returns:
A rational series that describes the language of the automaton.
See also:
generalized()

Definition at line 359 of file aut_to_exp.hxx.

References Element< S, T >::structure().

void complement_here ( Element< A, AI > &  a)

Complement in place the set of final states.

Parameters:
aThe deterministic Boolean automaton to complement.
Precondition:
a must be complete.
a must be deterministic.
See also:
complement()
Author:
Yann Régis-Gianas

Definition at line 38 of file complement.hxx.

References vcsn::is_complete(), and vcsn::is_deterministic().

Referenced by vcsn::complement().

Element< A, AI > complement ( const Element< A, AI > &  a)

Complement the set of final states.

Parameters:
athe deterministic Boolean automaton to complement.
Precondition:
a must be complete.
a must be deterministic.
See also:
complement_here()
Author:
Yann Régis-Gianas

Definition at line 59 of file complement.hxx.

References vcsn::complement_here().

void complete_here ( Element< A, AI > &  a)

Make the transition function of an automaton total w.r.t.

the alphabet.

See is_complete() for the definition of a complete automaton.

Note:
This algorithm works in place.
Parameters:
athe automaton to complete.
Precondition:
a must be a realtime automaton over a free-monoid.
See also:
complete(), is_complete()
Author:
Yann Régis-Gianas

Definition at line 40 of file complete.hxx.

References vcsn::is_realtime(), Element< S, T >::structure(), and Element< S, T >::value().

Referenced by vcsn::complete().

Element< A, AI > complete ( const Element< A, AI > &  a)

Make the transition function of an automaton total w.r.t.

the alphabet.

See is_complete() for the definition of a complete automaton.

Note:
This algorithm returns a new automaton.
Parameters:
athe automaton to complete.
Precondition:
a must be a realtime automaton over a free-monoid.
See also:
complete_here(), is_complete()
Author:
Yann Régis-Gianas

Definition at line 94 of file complete.hxx.

References vcsn::complete_here().

bool is_complete ( const Element< A, AI > &  a)

Test whether an automaton is complete.

An automaton over a free-monoid is complete if each letter of the alphabet can be read from any of its state (i.e., for each state s and each letter l, there is at least one outgoing transition labeled by s), and if there is at least one initial state.

Note:
Complete automata are not necessarily deterministic.
The above definition will also work with non-boolean automata.
Parameters:
aautomaton to test.
Returns:
true if the automaton a is complete.
Precondition:
a must be a realtime automaton over a free-monoid.
See also:
complete(), complete_here(), is_deterministic()
Author:
Yann Régis-Gianas

Definition at line 107 of file complete.hxx.

References vcsn::is_realtime(), Element< S, T >::structure(), and Element< S, T >::value().

Referenced by vcsn::co_minimization_moore(), vcsn::co_minimization_moore_here(), vcsn::complement_here(), vcsn::minimization_hopcroft(), vcsn::minimization_moore(), and vcsn::minimization_moore_here().

Element< S, T > composition_cover ( const Element< S, T > &  fmp)

Facade for composition cover.

Definition at line 70 of file composition_cover.hxx.

References Element< S, T >::structure().

void derived_term_automaton ( Element< A, T > &  a,
const Exp &  e 
)

Convert a krat expression into an automaton using derivatives.

This algorithm produces an automaton from an expression using the Brzozowski construction. This construction involves multiple derivations on the initial expression.

Parameters:
aAn automaton to store the results.
eThe expression to convert.
Note:
'a' is generally an empty automaton. It enables the choice of the series to work with. Thus, the series can be different from the expresion ones.

Definition at line 164 of file derived_term_automaton.hxx.

Referenced by vcsn::derived_term_automaton().

Element< A, T > derived_term_automaton ( const Exp &  e)

Convert a krat expression into an automaton using derivatives.

Parameters:
eThe expression to convert.
Returns:
A fresh automaton which recognizes the language denoted by 'e'.
Note:
The series of the expression are used to define the automaton.

Definition at line 174 of file derived_term_automaton.hxx.

References vcsn::derived_term_automaton().

Element< A, T > broken_derived_term_automaton ( const Exp &  e)

Convert a krat expression into an automaton using derivatives.

Derivations are first performed on the starting expression with the following formulae: d(0)={0}, d(1)={1}, d(a)={a} for all a in the alphabet, d(E+F)=d(E) union d(F), d(E.F)=[d(E)].F, d(E*)={E*}

Parameters:
eThe expression to convert.
Returns:
A fresh automaton which recognizes the language denoted by 'e'.
Note:
The series of the expression are used to define the automaton.

Definition at line 215 of file derived_term_automaton.hxx.

Element< A, AI > determinize ( const Element< A, AI > &  a)

Build a deterministic automaton from a Boolean automaton.

This function build a complete and deterministic automaton using the so called "subset construction".

See also:
is_deterministic() for the definition of a deterministic automaton.
Parameters:
aThe Boolean automaton to determinize.
Precondition:
a must be a Boolean automaton.
a must be a realtime automaton.
Returns:
A new Boolean automaton that is an accessible, complete and deterministic automaton recognizing the same language as a.

Definition at line 176 of file determinize.hxx.

Element< A, AI > determinize ( const Element< A, AI > &  a,
std::map< typename Element< A, AI >::hstate_t, std::set< typename Element< A, AI >::hstate_t > > &  m 
)

Build a deterministic automaton from a Boolean automaton, keeping trace of state-to-states correspondences.

This function build a complete and deterministic automaton using the so called "subset construction" but also returns the map associating each state of the new automaton to the corresponding subset of states from the original automaton.

See also:
is_deterministic() for the definition of a deterministic automaton.
Parameters:
aThe Boolean automaton to determinize.
mA map which will be augmented with the correspondance from one state of the resulting automaton to a subset of states of the input automaton.
Precondition:
a must be a Boolean automaton.
a must be a realtime automaton.
Returns:
A new Boolean automaton that is an accessible, complete and deterministic automaton recognizing the same language as a.

Definition at line 165 of file determinize.hxx.

References Element< S, T >::structure().

bool is_proper ( const Element< A, AI > &  a)

Test whether an automaton is proper.

This function returns true if the input is proper.

An automaton (of any type) is proper if none of its transitions has the empty word in its support. (Weights do not matter.)

Parameters:
aThe automaton to test.
See also:
eps_removal()

Definition at line 77 of file eps_removal.hxx.

References Element< S, T >::structure().

void eps_removal_here ( Element< A, AI > &  a,
misc::direction_type  dir = misc::backward 
)

In place eps_removal of an automaton (default is backward eps_removal).

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
dirThe orientation of the eps_removal.
See also:
eps_removal(), forward_eps_removal(), forward_eps_removal_here(), backward_eps_removal(), backward_eps_removal_here(), is_proper()
Author:
Sylvain Lombardy

Definition at line 697 of file eps_removal.hxx.

References SELECT, and Element< S, T >::structure().

Referenced by vcsn::do_compose(), and vcsn::do_u_compose().

Element< A, AI > eps_removal ( const Element< A, AI > &  a,
misc::direction_type  dir = misc::backward 
)

Eps_Removal of an automaton (default is backward eps_removal).

This algorithm completes the given automaton into a copy to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
dirThe orientation of the eps_removal.
See also:
eps_removal_here(), forward_eps_removal(), forward_eps_removal_here(), backward_eps_removal(), backward_eps_removal_here(), is_proper()
Author:
Sylvain Lombardy

Definition at line 709 of file eps_removal.hxx.

References SELECT.

void backward_eps_removal_here ( Element< A, AI > &  a)

In place backward eps_removal of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
See also:
backward_eps_removal(), eps_removal_here(), eps_removal(), forward_eps_removal_here(), forward_eps_removal(), is_proper()
Author:
Sylvain Lombardy

Definition at line 723 of file eps_removal.hxx.

References SELECT, and Element< S, T >::structure().

Element< A, AI > backward_eps_removal ( const Element< A, AI > &  a)

Backward eps_removal of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
See also:
backward_eps_removal_here(), eps_removal(), eps_removal_here(), forward_eps_removal(), forward_eps_removal_here(), is_proper()
Author:
Sylvain Lombardy

Definition at line 735 of file eps_removal.hxx.

References SELECT.

void forward_eps_removal_here ( Element< A, AI > &  a)

In place forward eps_removal of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
See also:
forward_eps_removal(), eps_removal_here(), eps_removal(), backward_eps_removal_here(), backward_eps_removal(), is_proper()
Author:
Sylvain Lombardy

Definition at line 749 of file eps_removal.hxx.

References SELECT, and Element< S, T >::structure().

Element< A, AI > forward_eps_removal ( const Element< A, AI > &  a)

Forward eps_removal of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the Floyd/McNaughton/Yamada algorithm.

Parameters:
aThe weighted automaton to close.
See also:
forward_eps_removal_here(), eps_removal(), eps_removal_here(), backward_eps_removal(), backward_eps_removal_here(), is_proper()
Author:
Sylvain Lombardy

Definition at line 761 of file eps_removal.hxx.

References SELECT.

void eps_removal_here_sp ( Element< A, AI > &  a,
misc::direction_type  dir = misc::backward 
)

In place eps_removal_sp of an automaton (default is backward eps_removal).

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
dirThe orientation of the eps_removal.
See also:
eps_removal(), forward_eps_removal(), forward_eps_removal_here(), backward_eps_removal(), backward_eps_removal_here()
Author:
Vivien Delmon

Definition at line 358 of file eps_removal_sp.hxx.

References SELECT, and Element< S, T >::structure().

Element< A, AI > eps_removal_sp ( const Element< A, AI > &  a,
misc::direction_type  dir = misc::backward 
)

Eps_Removal of an automaton (default is backward eps_removal).

This algorithm completes the given automaton into a copy to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
dirThe orientation of the eps_removal.
See also:
eps_removal_here(), forward_eps_removal(), forward_eps_removal_here(), backward_eps_removal(), backward_eps_removal_here()
Author:
Vivien Delmon

Definition at line 370 of file eps_removal_sp.hxx.

References SELECT.

void backward_eps_removal_here_sp ( Element< A, AI > &  a)

In place backward eps_removal_sp of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
See also:
backward_eps_removal(), eps_removal_here(), eps_removal(), forward_eps_removal_here(), forward_eps_removal()
Author:
Vivien Delmon

Definition at line 384 of file eps_removal_sp.hxx.

References SELECT, and Element< S, T >::structure().

Element< A, AI > backward_eps_removal_sp ( const Element< A, AI > &  a)

Backward eps_removal_sp of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
See also:
backward_eps_removal_here(), eps_removal(), eps_removal_here(), forward_eps_removal(), forward_eps_removal_here()
Author:
Vivien Delmon

Definition at line 396 of file eps_removal_sp.hxx.

References SELECT.

void forward_eps_removal_here_sp ( Element< A, AI > &  a)

In place forward eps_removal_sp of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
See also:
forward_eps_removal(), eps_removal_here(), eps_removal(), backward_eps_removal_here(), backward_eps_removal()
Author:
Vivien Delmon

Definition at line 410 of file eps_removal_sp.hxx.

References SELECT, and Element< S, T >::structure().

Element< A, AI > forward_eps_removal_sp ( const Element< A, AI > &  a)

Forward eps_removal_sp of an automaton.

This algorithm completes in place the given automaton to make it close over epsilon transition.

It is based on the shortest-path algorithm.

Parameters:
aThe weighted automaton to close.
See also:
forward_eps_removal_here(), eps_removal(), eps_removal_here(), backward_eps_removal(), backward_eps_removal_here()
Author:
Vivien Delmon

Definition at line 422 of file eps_removal_sp.hxx.

References SELECT.

bool are_equivalent ( const Element< S, A > &  a,
const Element< S, B > &  b 
)

Returns true iff the two boolean automata are equivalents, i.e., if they recognize the same language.

Definition at line 75 of file equivalent.hxx.

References Element< S, T >::structure().

Element< A, AI >::semiring_elt_t eval ( const Element< A, AI > &  a,
const W &  word 
)

Return the image of a word by an automaton.

eval(a, w) returns a series that is the image of the word 'w' in the automaton. This version of computation is the most general one : it works on every types of automaton, deterministic or not. Yet, the automaton must be realtime.

Definition at line 111 of file eval.hxx.

References vcsn::is_empty(), and Element< S, T >::structure().

void evaluation_fmp ( const Element< ST, TT > &  trans,
const typename input_projection_helper< ST, TT >::ret &  aut,
typename output_projection_helper< ST, TT >::ret &  res 
)

Evaluation over normalized and sub-normalized transducers, seen as automata over a free monoid product.

Precondition:
trans is a subnormalized automaton, aut is realtime.

Definition at line 49 of file evaluation_fmp.hxx.

References Element< S, T >::structure().

void evaluation_rw ( const Element< SA, TA > &  a,
const Element< ST, TT > &  t,
Element< SRET, TRET > &  ret 
)

Evaluate for a "letterized" automaton and a realtime transducer.

Parameters:
alhs
trhs
retthe result of the evaluation

Definition at line 45 of file evaluation_rw.hxx.

References Element< S, T >::structure().

identity_transducer_helper< S, K, T >::ret extension ( const Element< S, T > &  a)

Extend an automaton to a transducer.

Extend an automaton to a transducer whose multiplicity is the series of the automaton.

Definition at line 111 of file extension.hxx.

References Element< S, T >::structure().

Element< ST, TT > extension ( const Element< SA, TA > &  a,
const Element< ST, TT > &  t 
)

Extend an automaton to a transducer.

Extend an automaton to a transducer whose set is the one of another transducer passed in the second argument. This extension is required if we want to make a product of an automaton with a transducer. If this is not the case, we need simply call extension(automaton_t) above.

Definition at line 205 of file extension.hxx.

References Element< S, T >::structure().

void vcsn::factor_here ( const Element< A, AI > &  a)

Make every states of the automaton initial and final states (in place).

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Referenced by vcsn::factor().

Element< A, AI > factor ( const Element< A, AI > &  a)

Make every states of the automaton initial and final states.

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Definition at line 57 of file factor.hxx.

References vcsn::factor_here().

void finite_support_convert ( Element< S, T > &  dst,
const Element< Ss, Ts > &  org 
)

Finite support conversion.

This algorithm copies the value of a finite support application to another, possibly changing its type.

Parameters:
orgThe source application to convert.
dstThe destination application.

Definition at line 31 of file finite_support_conversion.hxx.

References Element< S, T >::structure().

void vcsn::partial_elimination ( const Element< SA, TA > &  a,
M &  state_exp_pair 
)

This function computes a set of expression, after having eliminated all states which are not initial or final.

Parameters:
ainput automaton
state_exp_pairthe output mapping
state_exp_paira mapping from the final to the expression of the label connecting it to the initial state.
Bug:
The algorithm should be inplace.
void partial_evaluation ( const Element< S1, T1 > &  E,
const Element< S2, T2 > &  S,
const typename Element< S2, T2 >::hstate_t &  p,
M &  res 
)

Partial evaluation of a K RatExp E over a realtime transducer S, starting from a given state p.

The result is a set of states accessible by reading a word in E from p and for each state q, the corresponding image of all the paths from p to q labeled by words from E.

S must be realtime. Note though, that we do not add a precondition as this function is internal, and may be called a lot of time.

Parameters:
Elhs
Srhs
pthe state from which the evaluation is run
resthe output map

Definition at line 181 of file evaluation.hxx.

References Element< S, T >::structure().

bool is_ambiguous ( const Element< A, AI > &  aut)

Test the ambiguity of automaton.

Note:
A trim automaton A is ambiguous if there exists a word f which is the label of two distinct accepting paths A.
Parameters:
autThe automaton to test.
Returns:
true if the automaton is ambiguous.

Definition at line 58 of file is_ambiguous.hxx.

bool is_deterministic ( const Element< A, AI > &  a)

Test if an automaton is deterministic.

A realtime boolean automaton is deterministic if for each state s and each letter l, there is at most one outgoing transition labeled by s, and if there is at most one initial state.

Note:
Being realtime implies that the automaton is defined over a free monoid.
The empty automaton is deterministic (but not complete).
Parameters:
athe automaton to check.
Precondition:
a is a realtime Boolean automaton.
Returns:
true if a is deterministic.
See also:
is_complete(), determinize().

Definition at line 98 of file is_deterministic.hxx.

Referenced by vcsn::co_minimization_moore(), vcsn::co_minimization_moore_here(), vcsn::complement_here(), vcsn::minimization_hopcroft(), vcsn::minimization_moore(), and vcsn::minimization_moore_here().

bool is_empty ( const Element< A, AI > &  a)

Evaluate if an automaton is empty.

Return true if the automaton is empty (has no state), false otherwise.

Parameters:
aThe input automaton.

Definition at line 30 of file is_empty.hxx.

Referenced by vcsn::eval().

bool is_ltl ( const Element< S, A > &  t)

Test whether an FMP transducer is letter-to-letter.

Precondition:
t must be an FMP transducer.
Parameters:
tThe FMP transducer to test.
Returns:
true if the FMP transducer is letter-to-letter.

Definition at line 87 of file is_ltl.hxx.

References Element< S, T >::structure().

bool is_normalized_transducer ( const Element< S, A > &  t)

Test the normalization of transducer.

Parameters:
tThe transducer to test.
Returns:
true if the transducer is normalized.

Definition at line 50 of file is_normalized.hxx.

References Element< S, T >::structure().

bool is_trim ( const Element< A, AI > &  a)

Return true is all states are reachable and co-reachable.

This function return true if all states are reachable and co-reachable

Parameters:
aThe input automaton.

Definition at line 33 of file is_trim.hxx.

References vcsn::accessible_states(), and vcsn::coaccessible_states().

bool is_useless ( const Element< A, AI > &  a)

Return true if the automaton has no successful computation.

Return false if the automaton has a successful computation, true otherwise.

An automaton has a successful computation if it has at least one state that is both accessible and co-accessible.

Parameters:
aThe input automaton.

Definition at line 31 of file is_useless.hxx.

References vcsn::trim().

std::list< typename Series::monoid_t::alphabet_t::letter_t > flatten ( const Element< Series, T > &  exp)

This algorithm extracts the letters from a rational expression.

The flatten() function extracts the letters of a rational expression, keeping the order in which they appear in the expression. The result is just a std::list of letters, with letters having the same type as the expression's letter, i.e. Element<S, T>::monoid_elt_t::set_t::alphabet_t::letter_t.

Parameters:
expThe expression to work on.
Author:
Thomas Claveirole <thomas.claveirole@lrde.epita.fr>

Definition at line 123 of file krat_exp_flatten.hxx.

Element< A, AI > minimization_hopcroft ( const Element< A, AI > &  a)

Return the minimal automaton using the hopcroft algorithm.

Minimize a with Hopcroft algorithm.

Parameters:
aThe deterministic Boolean automaton to minimize.
Precondition:
a must be a Boolean automaton.
a must be deterministic.
a must be complete.
Returns:
A fresh automaton that is the canonical minimal automaton of 'a'.
Parameters:
aThe automaton.
Precondition:
a must be a deterministic Boolean automaton.
a must be a complete automaton.
Returns:

Definition at line 297 of file minimization_hopcroft.hxx.

References vcsn::is_complete(), vcsn::is_deterministic(), and Element< S, T >::structure().

Element< A, AI > quotient ( const Element< A, AI > &  a)

Return the quotient of a non-deterministic acceptor.

This algorithms works with both Boolean and weighted automata.

Parameters:
aThe automaton to minimize.
Precondition:
a must be realtime.
Returns:
A fresh automaton that is the quotient of 'a'.
See also:
CIAA 2005, "Inside Vaucanson" (in which the algorithm is described by Sylvain Lombardy)

Definition at line 895 of file minimization_hopcroft.hxx.

References vcsn::is_realtime(), and SELECT.

Element< A, AI > minimization_moore ( const Element< A, AI > &  a)

Returns the minimal deterministic automaton associated to the input one.

Use Moore's algorithm to compute the minimal equivalent deterministic automaton. The complexity of this algorithm is O(n2). See minimize_hopcroft for O(nlogn).

See also:
http://cs.engr.uky.edu/~lewis/essays/compilers/min-fa.html
ETA p123-125
Precondition:
a must be a Boolean automaton.
a must be deterministic.
a must be complete.

Definition at line 269 of file minimization_moore.hxx.

References vcsn::is_complete(), vcsn::is_deterministic(), and Element< S, T >::structure().

Element< A, AI > co_minimization_moore ( const Element< A, AI > &  a)

Returns the co-minimal co-deterministic automaton associated to the input one.

Use Moore's algorithm to compute the minimal equivalent co-deterministic automaton. The complexity of this algorithm is O(n2).

See also:
http://cs.engr.uky.edu/~lewis/essays/compilers/min-fa.html
ETA p123-125
Precondition:
a must be a Boolean automaton.
a must be co- deterministic.
a must be co- complete.
Bug:
The precondition is not checked.

Definition at line 292 of file minimization_moore.hxx.

References vcsn::is_complete(), vcsn::is_deterministic(), Element< S, T >::structure(), and vcsn::transpose().

void minimization_moore_here ( Element< A, AI > &  a)

Minimalize the deterministic input automaton.

Use Moore's algorithm to minimalize (in place) the input automaton. The complexity of this algorithm is O(n2). See minimize_hopcroft for O(nlogn).

See also:
http://cs.engr.uky.edu/~lewis/essays/compilers/min-fa.html
ETA p123-125
Precondition:
a must be a Boolean automaton.
a must be deterministic.
a must be complete.

Definition at line 257 of file minimization_moore.hxx.

References vcsn::is_complete(), vcsn::is_deterministic(), and Element< S, T >::structure().

void co_minimization_moore_here ( Element< A, AI > &  a)

Co-minimalize the co-deterministic input automaton.

Use Moore's algorithm to co-minimalize (in place) the input automaton. The complexity of this algorithm is O(n2). See minimize_hopcroft for O(nlogn).

See also:
http://cs.engr.uky.edu/~lewis/essays/compilers/min-fa.html
ETA p123-125
Precondition:
a must be a Boolean automaton.
a must be co- deterministic.
a must be co- complete.

Definition at line 280 of file minimization_moore.hxx.

References vcsn::is_complete(), vcsn::is_deterministic(), Element< S, T >::structure(), and vcsn::transpose().

Element< A, AI > normalize ( const Element< A, AI > &  a)

Return the fresh thompson-normalized automaton.

This function returns the thompson-normalized automaton corresponding to its input.

Parameters:
aThe automaton to normalize.
See also:
normalize_here(), is_normalized(), union_of_normalized(), concatenate_of_normalized(), star_of_normalized().

Definition at line 63 of file normalized.hxx.

References Element< S, T >::structure().

void normalize_here ( Element< A, AI > &  a)

In-place normalize to the thompson form.

This function performs the in-place thompson-normalization of its input.

Parameters:
aAn in/out parameter containing the automaton to normalize as input, and the normalized automaton as output.
See also:
normalize, is_normalized(), union_of_normalized(), concatenate_of_normalized(), star_of_normalized().

Definition at line 72 of file normalized.hxx.

References Element< S, T >::structure().

bool is_normalized ( const Element< A, AI > &  a)

Return true if the input automaton is thompson-normalized.

This function indicates whether its input automaton is thompson-normalized or not.

Parameters:
aThe automaton to test.
See also:
normalize(), union_of_normalized(), concatenate_of_normalized(), star_of_normalized().

Definition at line 159 of file normalized.hxx.

References Element< S, T >::structure().

void union_of_normalized_here ( Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Do the in-place union of two thompson-normalized automata.

This function performs the in-place union of two thompson-normalized automata. The result is thompson-normalized.

Parameters:
lhsAn in/out parameter which is the left hand side of the union as input, and the operation result as output.
rhsRight hand side of the union.
See also:
union_of_normalized(), concatenate_of_normalized(), star_of_normalized(), normalize(), is_normalized().

Definition at line 113 of file normalized.hxx.

Element< A, AI1 > union_of_normalized ( const Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Return the fresh union of two thompson-normalized automata.

This function returns a fresh automaton which is the union of input automata. It is thompson-normalized.

Parameters:
lhsLeft hand side of the union.
rhsRight hand side of the union.
See also:
union_of_normalized_here(), concatenate_of_normalized(), star_of_normalized(), normalize(), is_normalized().

Definition at line 121 of file normalized.hxx.

References Element< S, T >::structure().

void concatenate_of_normalized_here ( Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Do the in-place concatenation of two thompson-normalized automata.

This function performs the in-place concatenation of two thompson-normalized automata. The result is thompson-normalized.

Parameters:
lhsAn in/out parameter which is the left hand side of the concatenation as input, and the operation result as output.
rhsRight hand side of the concatenation.
See also:
concatenate_of_normalized(), union_of_normalized(), star_of_normalized(), normalize(), is_normalized().

Definition at line 240 of file normalized.hxx.

References Element< S, T >::structure().

Element< A, AI1 > concatenate_of_normalized ( const Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Return the fresh concatenation of two thompson-normalized automata.

This function returns a fresh automaton which is the concatenation of input automata. It is thompson-normalized.

Parameters:
lhsLeft hand side of the concatenation.
rhsRight hand side of the concatenation.
See also:
concatenate_of_normalized_here(), union_of_normalized(), star_of_normalized(), normalize, is_normalized().

Definition at line 247 of file normalized.hxx.

References Element< S, T >::structure().

void star_of_normalized_here ( Element< A, AI > &  a)

Do in-place star transformation on the thompson-normalized input.

This function performs the in-place star transformation of a thompson-normalized automaton. The result is thompson-normalized.

Parameters:
aAn in/out parameter which is the automaton to transform as input, and the operation result as output.
See also:
star_of_normalized(), concatenate_of_normalized(), union_of_normalized(), normalize(), is_normalized().

Definition at line 283 of file normalized.hxx.

References Element< S, T >::structure().

Element< A, AI > star_of_normalized ( const Element< A, AI > &  a)

Return the fresh star transformation of its normalized input.

This function performs a star transformation on its input, and returns it as a fresh automaton. The input must be thompson-normalized, and the result is thompson-normalized.

Parameters:
aThe automaton to run star transformation on.
See also:
star_of_normalized_here(), concatenate_of_normalized(), union_of_normalized(), normalize(), is_normalized().

Definition at line 290 of file normalized.hxx.

References Element< S, T >::structure().

void compose ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs,
Element< S, T > &  ret 
)

Composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.

Parameters:
lhsThe left hand side transducer.
rhsThe right hand side transducer.
retThe result transducer.

Definition at line 421 of file normalized_composition.hxx.

References SELECT, and Element< S, T >::structure().

Referenced by vcsn::do_compose(), and vcsn::do_u_compose().

Element< S, T > compose ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs 
)

Composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.

Parameters:
lhsThe left hand side transducer.
rhsThe right hand side transducer.

Definition at line 441 of file normalized_composition.hxx.

References SELECT, and Element< S, T >::structure().

void u_compose ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs,
Element< S, T > &  ret 
)

Unambiguous composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.

Parameters:
lhsThe left hand side transducer.
rhsThe right hand side transducer.
retThe result transducer.

Definition at line 475 of file normalized_composition.hxx.

References vcsn::do_u_compose(), and Element< S, T >::structure().

Element< S, T > u_compose ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs 
)

Unambiguous composition for weighted normalized and sub-normalized transducers, seen as automata over a free monoid product.

Parameters:
lhsThe left hand side transducer.
rhsThe right hand side transducer.

Definition at line 492 of file normalized_composition.hxx.

References vcsn::do_u_compose(), and Element< S, T >::structure().

void one_eps_closure ( Element< A, AI > &  a,
const EPS &  eps,
misc::direction_type  dir = misc::backward 
)

In place one_eps_closure of an automaton (default is backward eps_closure).

This algorithm closes the given automaton with respect to the given "epsilon transition". The epsilon transition type can be any type supporting src(), dst(), and weight().

Precondition:
eps.src() != eps.dst()
Parameters:
aThe weighted automaton to close.
eps_setThe epsilon transition that induces the closure.
dirThe orientation of the eps_closure.
See also:
one_eps_closure(), forward_one_eps_closure(), backward_one_eps_closure()
Author:
Sylvain Lombardy

Definition at line 171 of file one_eps_closure.hxx.

References Element< S, T >::structure().

void backward_one_eps_closure ( Element< A, AI > &  a,
const EPS &  eps 
)

In place backward_one_eps_closure of an automaton.

This algorithm closes the given automaton with respect to each epsilon transition of the given collection. The epsilon transition can be any type supporting src(), dst(), and weight(). The behaviour of the algorithm depends on the ordering of epsilon transitions.

For every transition 't' in 'a' with source eps.dst(), a transition is created in 'a', with source eps.src(), destination t.dst(), and series eps.weight()*t.series()

Precondition:
eps.src() != eps.dst()
Parameters:
aThe weighted automaton to close.
epsThe collection of epsilon transitions that induces the closure.
dirThe orientation of the eps_closure.
See also:
one_eps_closure(), forward_one_eps_closure(), backward_one_eps_closure()
Author:
Sylvain Lombardy

Definition at line 153 of file one_eps_closure.hxx.

References Element< S, T >::structure().

void forward_one_eps_closure ( Element< A, AI > &  a,
const EPS &  eps 
)

In place forward one_eps_closure of an automaton.

This algorithm closes the given automaton with respect to each epsilon transition of the given collection. The epsilon transition can be any type supporting src(), dst(), and weight(). The behaviour of the algorithm depends on the ordering of epsilon transitions.

For every transition 't' in 'a' wist destination eps.src(), a transition is created in 'a', with source t.src(), destination eps.dst(), and series t.series()*eps.weight().

Precondition:
eps.src() != eps.dst()
Parameters:
aThe weighted automaton to close.
epsThe collection of epsilon transitions that induces the closure.
dirThe orientation of the eps_closure.
See also:
one_eps_closure(), forward_one_eps_closure(), backward_one_eps_closure()
Author:
Sylvain Lombardy

Definition at line 162 of file one_eps_closure.hxx.

References Element< S, T >::structure().

void vcsn::prefix_here ( const Element< A, AI > &  a)

Make every states of the automaton final states (in place).

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Referenced by vcsn::prefix().

Element< A, AI > prefix ( const Element< A, AI > &  a)

Make every states of the automaton final states.

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Definition at line 54 of file prefix.hxx.

References vcsn::prefix_here().

void set_states ( const trans_t &  fmp_trans,
auto_t &  res,
std::map< typename trans_t::hstate_t, typename auto_t::hstate_t > &  stmap 
)

Definition at line 28 of file projection.hxx.

void realtime_here ( Element< A, AI > &  a,
misc::direction_type  dir 
)

Modify an automaton in place to make it realtime.

An automaton over a free monoid $A^\star$ is realtime if all its transitions are labeled by single letters of $A$, and all its initial and final arrows are labeled by empty words. (Weights do not matter.)

This algorithm works in two steps: first transitions labeled by words are split into transitions labeled by single letters separated by newly created states (if there is a weight associated to the word, it will be associated to the first letter and the other letter will be associated to the identity of the semiring); second the epsilon transitions are removed.

Removing epsilon transitions can be done in two ways: forward or backward. The dir argument can be used to control the direction, and defaults to forward.

Parameters:
aThe automaton to make realtime.
dirThe direction of the epsilon removal algorithm.
Precondition:
must be defined over a free monoid.
See also:
realtime()

Definition at line 224 of file realtime.hxx.

References Element< S, T >::structure().

Element< A, AI > realtime ( const Element< A, AI > &  a,
misc::direction_type  dir 
)

Create a realtime automaton from another one.

As realtime_here, this algorithm builds a realtime automaton, but it returns a new one instead of changing the given one.

Parameters:
aThe automaton to make realtime.
dirThe direction of the epsilon removal algorithm.
See also:
realtime_here()

Definition at line 247 of file realtime.hxx.

References Element< S, T >::structure().

Element< S, T > realtime ( const Element< S, T > &  e)

Compute the realtime version of a rational expression or an automata.

This function is a wrapper which selects the realtime function either from realtime.hh or from krat_exp_realtime.hh.

When called upon an automaton, this function uses the functions declared in realtime.hh to make this automaton realtime using the forward epsilon removal.

When called with a rational expression, a function from krat_exp_realtime.hh is selected to expand words in the expression as a product of a letters.

See also:
krat_exp_realtime.hh, realtime.hh

Definition at line 26 of file realtime_decl.hxx.

References Element< S, T >::structure().

void realtime_here ( Element< S, T > &  e)

Modify a rational expression or automata in place to make it realtime.

This function is a wrapper thest selects the realtime() function from either realtime.hh or from krat_exp_realtime.hh.

It behaves exactly as realtime(), but do the operation in place.

See also:
realtime()

Definition at line 33 of file realtime_decl.hxx.

References Element< S, T >::structure().

bool is_realtime ( const Element< S, T > &  e)

Test whether an automaton or a rational expression is realtime.

This function returns true if the input is realtime.

An automaton over a free monoid $A^\star$ is realtime if all its transitions are labeled by single letters of $A$. (Weights do not matter.)

A rational expression is realtime if its litterals are only single letters of $A$. E.g. "ab.ab*" is not rational while "a.b.(a.b)*" is.

Parameters:
eThe automaton or rational expression to test.
See also:
realtime()

Definition at line 40 of file realtime_decl.hxx.

References Element< S, T >::structure().

Referenced by vcsn::complete_here(), vcsn::is_complete(), vcsn::quotient(), vcsn::reduce(), vcsn::semi_reduce(), and vcsn::universal().

void rw_composition ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs,
Element< S, T > &  ret 
)

Composition for Rational-Weight transducers.

Precondition:
rhs must be realtime.

Definition at line 251 of file rw_composition.hxx.

References Element< S, T >::structure().

Element< S, T > rw_composition ( const Element< S, T > &  lhs,
const Element< S, T > &  rhs 
)

Composition for Rational-Weight transducers.

Precondition:
rhs must be realtime.

Definition at line 276 of file rw_composition.hxx.

References Element< S, T >::structure().

Element<SS, TT>& vcsn::rw_to_fmp ( const Element< S, T > &  trans,
vcsn::Element< SS, TT > &  res 
)

Compute the equivalent FMP automaton of a Rational Weight transducer.

Please note that for the moment this function works only if the support of each transition is finite.

Precondition:
trans should use rational weights with finite support.
void search ( const Element< Automata< Series, Kind >, T > &  a,
const InputIterator &  begin,
const InputIterator &  end,
typename Element< Automata< Series, Kind >, T >::letter_t  eol,
FoundFunctor &  f 
)

Search for a rational expression into a text.

This function searches a rational expression into a text, given a iterator on the text and an automaton which recognizes the corresponding langage. The result cannot spread over two lines.

Parameters:
aThe automaton which recognizes the searched words.
beginAn input iterator to the begining of the text.
endAn iterator to the end of the text.
eolThe character to use for ending a line.
fA functor with an operator () method taking 3 InputIterator as argument which will be called each time a match is found. the first one points to the begining of the stream. The two following ones are respectively the first and the last position of the match in the stream.
Authors:
Thomas Claveirole <thomas@lrde.epita.fr>
Bug:
Multiple implementations of search() should be implemented. When a call to search is performed an heuristic should decide which implementation to use. For the moment there is no such mechanism since only one implementation of search is provided.

Definition at line 31 of file search.hxx.

static unsigned int vcsn::compute_distances ( const Element< Automata< Series, Kind >, T > &  a,
std::vector< StatesSet > &  distances 
) [static]

Compute distances from initial states to final states.

For each i, compute the set of states reachable in i steps or fewer. the result is stored into a vector of sets of states distances[i]. The algorithm stops when it encounters a final state. The last i value is returned.

Definition at line 66 of file search.hxx.

static std::pair<bool, unsigned int> vcsn::window_backsearch ( const misc::Window< InputIterator, typename Element< Automata< Series, Kind >, T >::letter_t > &  w,
const Element< Automata< Series, Kind >, T > &  a,
const std::vector< StatesSet > &  distances 
) [static]

Back search inside a window.

Returns whether the window is a potential match for the given automaton or not as the first element of the pair. The second element is the maximal value we can use to shift the window without skipping matches.

Parameters:
wThe window.
aThe automaton to use.
distancesDistances get from compute_distances().
See also:
search(), build_reverse_factor_automaton(), compute_distances()

Definition at line 124 of file search.hxx.

References std::swap().

Automaton::monoid_elt_t shortest ( const Automaton &  autom)

Return the smallest accepted word.

This functions returns the smallest accepted word. A breath-first lexicographically algorithm is performed, and to each met state is associated the smallest word that leads to this state. As soon as a final state is reached, the function returns the corresponding word. If the language of the automaton is empty, the return value is meaningless (due to the current implementation, it is the default value i.e. the empty word).

Parameters:
automThe input automaton.
Precondition:
autom must be a realtime automaton

Definition at line 168 of file shortest.hxx.

bool shortest ( const Automaton &  autom,
MonoidElt &  word 
)

Compute the smallest accepted word.

This functions returns the smallest accepted word. A breath-first lexicographically algorithm is performed, and to each met state is associated the smallest word that leads to this state. As soon as a final state is reached, the function returns the corresponding word. The function return true except if the language of the automaton is empty.

Parameters:
automThe input automaton.
wordThe word which stores the smallest accepted word.
Precondition:
autom must be a realtime automaton

Definition at line 177 of file shortest.hxx.

void enumerate ( const Automaton &  autom,
unsigned  max_length,
std::list< MonoidElt, Alloc > &  word_list 
)

Compute the list of short accepted words.

This functions computes the list of words shorter than max_length. The list is sorted w.r.t. the military (shortlex) order.

At step k, the set of states accessible by words of length k is computed; for each state the list of these words is stored. After step max_length, all the words that make final states are collected, sorted, and potential redundancy is suppressed.

Precondition:
autom must be a realtime automaton
Parameters:
automThe input automaton.
max_lengthThe maximal length for words.
thelist to fill with accepted words shortest than max_length.

Definition at line 184 of file shortest.hxx.

void union_here ( Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

In place union of two automata.

This function adds states and transitions of a second automaton to states and transitions of a first automaton.

Parameters:
lhsFirst automaton and destination of the union
rhsSecond automaton of the union
See also:
union_()

Definition at line 104 of file standard.hxx.

References Element< S, T >::structure().

Element< A, AI1 > union_ ( const Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Union of two automata.

This function returns the fresh union of two automata. It puts transitions and states of the two automata together, and create a new one with the result.

Parameters:
lhsFirst automaton of the union
rhsSecond automaton of the union
Note:
the name is union_ instead of union because the latter is a reserved keyword.
See also:
union_here()

Definition at line 112 of file standard.hxx.

References Element< S, T >::structure().

bool is_standard ( const Element< A, AI > &  a)
void standardize ( Element< A, AI > &  a)

Returns a standard automaton associated to the input.

Parameters:
aThe automaton to standardize
See also:
is_standard()

Definition at line 236 of file standard.hxx.

References Element< S, T >::structure().

void sum_of_standard_here ( Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

In-place sum of two standard automata.

This function makes the sum of two standard automata. The result is a standard automaton.

Parameters:
lhsThe first automaton (it will contain the result)
rhsThe second automaton
See also:
standardize(), is_standard(), sum_of_standard()

Definition at line 290 of file standard.hxx.

References vcsn::is_standard(), and Element< S, T >::structure().

Referenced by vcsn::sum_of_standard().

Element< A, AI1 > sum_of_standard ( const Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Return a fresh sum of two standard automata.

As sum_of_standard_here, this function build the sum of two standard automata, but it builds a new one.

Parameters:
lhsThe first automaton
rhsThe second automaton
See also:
standardize(), is_standard(), sum_of_standard_here()

Definition at line 299 of file standard.hxx.

References vcsn::is_standard(), and vcsn::sum_of_standard_here().

void concat_of_standard_here ( Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

In-place concatenation of two standard automata.

This function makes the concatenation of two standard automata. The result is a standard automaton.

Parameters:
lhsThe first automaton (it will contain the result)
rhsThe second automaton
See also:
standardize(), is_standard(), concat_of_standard()

Definition at line 369 of file standard.hxx.

References vcsn::is_standard().

Element< A, AI1 > concat_of_standard ( const Element< A, AI1 > &  lhs,
const Element< A, AI2 > &  rhs 
)

Return a fresh concatenation of two standard automata.

As concat_of_standard_here, this function builds the union of two automata, but it builds a new one.

Parameters:
lhsThe first automaton
rhsThe second automaton
See also:
standardize(), is_standard(), concat_of_standard_here()

Definition at line 378 of file standard.hxx.

References vcsn::is_standard(), and Element< S, T >::structure().

void star_of_standard_here ( Element< A, AI > &  a)

In-place star transformation of a standard automaton.

This function makes the star transformation of a standard automaton, and replaces those given by the result.

Parameters:
aThe automaton to transform
See also:
standardize(), is_standard(), star_of_standard()

Definition at line 546 of file standard.hxx.

References vcsn::is_standard().

Element< A, AI > star_of_standard ( const Element< A, AI > &  a)

Return the fresh star transformation of a standard automata.

As star_of_standard_here, this function applies star on an automaton, but it builds a new automaton.

Parameters:
aThe automaton on which star must be applied.
See also:
standardize(), is_standard(), star_of_standard_here()

Definition at line 554 of file standard.hxx.

References vcsn::is_standard(), and Element< S, T >::structure().

void left_mult_of_standard_here ( Element< A, AI > &  aut,
const typename Element< A, AI >::series_set_elt_t &  k 
)

In-place left exterior multiplication by a weight.

See also:
standardize(), is_standard(), right_mult_of_standard_here()

Definition at line 440 of file standard.hxx.

References vcsn::is_standard(), and Element< S, T >::structure().

void right_mult_of_standard_here ( Element< A, AI > &  aut,
const typename Element< A, AI >::series_set_elt_t &  k 
)

In-place right exterior multiplication by a weight.

See also:
standardize(), is_standard(), left_mult_of_standard_here()

Definition at line 470 of file standard.hxx.

References vcsn::is_standard().

void standard_of ( Element< A, T > &  a,
const Exp &  e 
)

Convert a rational expression into a standard automaton.

Parameters:
eThe expression to convert.
aThe automaton to store the result. Note that the result will be stored in "a" even if it is not empty.
Note:
The automaton is used to enable the use of different series from the expression.

Definition at line 294 of file standard_of.hxx.

References Element< S, T >::structure().

Element< A, AI > sub_automaton ( const Element< A, AI > &  a,
const HStatesSet &  s,
bool  check_states = true 
)

Returns a fresh automaton that is the sub-automaton defined by a set.

Parameters:
aThe automaton into which we have to extract the sub-automaton.
sThe set of states of the sub-automaton included in the state of 'a'.
check_statesA flag to enable/disable the inclusion checking.
Returns:
A fresh sub-automaton.
See also:
sub_automaton_here()

Definition at line 59 of file sub_automaton.hxx.

References Element< S, T >::structure().

Referenced by vcsn::accessible(), vcsn::coaccessible(), and vcsn::trim().

void sub_automaton_here ( Element< A, AI > &  a,
const HStatesSet &  s,
bool  check_states = true 
)

Select a sub-automaton into a given automaton.

Parameters:
aThe automaton into which we have to extract the sub-automaton.
sThe set of states of the sub-automaton included in the state of 'a'.
check_statesA flag to enable/disable the inclusion checking.
See also:
sub_automaton()

Definition at line 72 of file sub_automaton.hxx.

References Element< S, T >::structure().

Referenced by vcsn::accessible_here(), vcsn::coaccessible_here(), vcsn::do_u_compose(), and vcsn::trim_here().

Element< S, T > sub_normalize ( const Element< S, T > &  a)

Sub-normalize a FMP transducer.

  • a Input automaton.
    Returns:
    Sub-normalized automaton.

Definition at line 220 of file sub_normalize.hxx.

void vcsn::sub_normalize ( const Element< S, T1 > &  a,
Element< S, T2 > &  res 
)

Sub-normalize a FMP transducer.

  • a Input automaton.
  • res Output automaton.
void sub_normalize_here ( Element< S, T > &  a)

Sub-normalize a FMP transducer, in place version.

Parameters:
aInput automaton.

Definition at line 238 of file sub_normalize.hxx.

References Element< S, T >::structure().

bool is_sub_normalized ( const Element< S, T > &  a)

Check if a FMP transducer is sub-normalized.

  • a Input automaton.
    Returns:
    boolean.

Definition at line 244 of file sub_normalize.hxx.

References Element< S, T >::structure().

void vcsn::suffix_here ( const Element< A, AI > &  a)

Make every states of the automaton initial states (in place).

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Referenced by vcsn::suffix().

Element< A, AI > suffix ( const Element< A, AI > &  a)

Make every states of the automaton initial states.

Parameters:
aThe realtime automaton to work on.
Precondition:
a must be realtime and trim

Definition at line 54 of file suffix.hxx.

References vcsn::suffix_here().

void thompson_of ( Element< A, T > &  out,
const rat::exp< Letter, Weight > &  kexp 
)

The Thompson automaton associated to the krat expression.

This function build the automaton associated to the rational expression implemented by a krat_exp, using Thompson algorithm.

Parameters:
outThe resulting automaton. `out' must be empty.
kexpThe rational expression

Definition at line 229 of file thompson.hxx.

References Element< S, T >::structure().

Referenced by vcsn::thompson_of().

Element< Automata< S, K >, AutoType > thompson_of ( const Element< S, T > &  exp)

The Thompson automaton associated to the krat expression.

This function build the automaton associated to the rational expression implemented by a krat_exp, using Thompson algorithm. The kind of returned automaton is a default one.

Parameters:
expThe rational expression

Definition at line 237 of file thompson.hxx.

References Element< S, T >::structure(), vcsn::thompson_of(), and Element< S, T >::value().

void transpose ( Element< A, AI1 > &  dst,
const Element< A, AI2 > &  src 
)

Transposition of an automaton.

This function copies in dst the transposition of the automaton src.

Parameters:
dstDestination
srcAutomaton to transpose

Definition at line 29 of file algorithms/transpose.hxx.

References vcsn::transpose_view().

Element< A, AI > transpose ( const Element< A, AI > &  src)

Return a fresh transposed automaton.

This function returns the transposition of an automaton.

Parameters:
srcAutomaton to transpose.

Definition at line 43 of file algorithms/transpose.hxx.

References Element< S, T >::structure(), and vcsn::transpose().

std::set< typename Element< A, AI >::hstate_t > useful_states ( const Element< A, AI > &  a)

Returns a useful states of the automaton.

This functions returns the states that are reachable and co-reachable.

Parameters:
aThe input automaton.

Definition at line 56 of file trim.hxx.

References Element< S, T >::structure().

Referenced by vcsn::do_u_compose(), vcsn::trim(), and vcsn::trim_here().

Element< A, AI > trim ( const Element< A, AI > &  a)

Return a fresh automaton in which non useful states are removed.

Parameters:
aThe input automaton.

Definition at line 63 of file trim.hxx.

References vcsn::sub_automaton(), and vcsn::useful_states().

Referenced by vcsn::is_useless().

void trim_here ( Element< A, AI > &  a)

Trim a.

Remove non useful states from the automaton.

Parameters:
aThe input automaton.

Definition at line 70 of file trim.hxx.

References vcsn::sub_automaton_here(), and vcsn::useful_states().

Element< A, AI > universal ( const Element< A, AI > &  a)

Build a universal automaton from a Boolean automaton.

This function build the universal automaton of a rational language using the intersection of sets. For a complete definition of the universal automaton, see "The universal automaton", (S.Lombardy and J.Sakarovitch) Logic and Automata, Texts in Logic and Games, 2 (Amsterdam University Press, 2008), 457-504.

Parameters:
aThe Boolean automaton recognizing the language.
Precondition:
a must be a Boolean automaton.
a must be a realtime automaton.
Returns:
A new automaton which is universal a.

Definition at line 181 of file universal.hxx.

References vcsn::is_realtime(), and Element< S, T >::structure().