Awali
Another Weighted Automata library
minimize_brzozowski.hh
Go to the documentation of this file.
1 // This file is part of Awali.
2 // Copyright 2016-2022 Sylvain Lombardy, Victor Marsault, Jacques Sakarovitch
3 //
4 // Awali is a free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef AWALI_ALGOS_MINIMIZE_BRZOZOWSKI_HH
18 # define AWALI_ALGOS_MINIMIZE_BRZOZOWSKI_HH
19 
22 
23 namespace awali { namespace sttc {
24 
25 
26  /*-------------------------------------------.
27  | minimization with Brzozowski's algorithm. |
28  `-------------------------------------------*/
29 
30  template <typename Aut>
31  inline
32  typename Aut::element_type::automaton_nocv_t
33  minimize_brzozowski(const Aut& a)
34  {
35  auto codet = determinize(transpose_view(a),false);
36  return determinize(transpose_view(codet),false);
37  }
38 
39 }}//end of ns awali::stc
40 
41 #endif // !AWALI_ALGOS_MINIMIZE_BRZOZOWSKI_HH
Aut::element_type::automaton_nocv_t minimize_brzozowski(const Aut &a)
Definition: minimize_brzozowski.hh:33
auto determinize(const Aut &a, bool keep_history=true) -> mutable_automaton< context_t_of< Aut >>
Determinization of the automaton.
Definition: determinize.hh:41
std::shared_ptr< internal::transpose_view_impl< Aut > > transpose_view(std::shared_ptr< Aut > aut)
Definition: transpose_view.hh:265
Main namespace of Awali.
Definition: ato.hh:22