Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
synchronizing-word.cc
Go to the documentation of this file.
2 #include <vcsn/algos/cerny.hh>
3 #include <vcsn/algos/pair.hh>
5 #include <vcsn/dyn/algos.hh>
6 
7 namespace vcsn
8 {
9  namespace dyn
10  {
11  REGISTER_DEFINE(pair);
12  automaton
13  pair(const automaton& aut, bool keep_initials)
14  {
15  return detail::pair_registry().call(aut, keep_initials);
16  }
17 
18  REGISTER_DEFINE(synchronizing_word);
19  label
20  synchronizing_word(const automaton& aut, const std::string& algo)
21  {
22  return detail::synchronizing_word_registry().call(aut, algo);
23  }
24 
25  REGISTER_DEFINE(is_synchronized_by);
26  bool
27  is_synchronized_by(const automaton& aut, const label& word)
28  {
29  return detail::is_synchronized_by_registry().call(aut, word);
30  }
31 
32  REGISTER_DEFINE(is_synchronizing);
33  bool
35  {
36  return detail::is_synchronizing_registry().call(aut);
37  }
38 
39  REGISTER_DEFINE(cerny);
40  automaton
41  cerny(const context& aut, unsigned num_states)
42  {
43  return detail::cerny_registry().call(aut, num_states);
44  }
45  }
46 }
std::shared_ptr< detail::automaton_base > automaton
Definition: automaton.hh:71
automaton pair(const automaton &aut, bool keep_initials=false)
Build the pair automaton of the given automaton.
bool is_synchronized_by(const automaton &aut, const label &word)
Whether the word synchronizes aut.
bool is_synchronizing(const automaton &aut)
Whether is synchronizing.
std::shared_ptr< const detail::label_base > label
Definition: fwd.hh:46
std::shared_ptr< const detail::context_base > context
Definition: context.hh:71
label synchronizing_word(const automaton &aut, const std::string &algo="greedy")
A synchronizing word, or raise if there is none.
automaton cerny(const context &ctx, unsigned num_states)
Produce a Černý automaton of num_states states.