cfl_statemin.h
Go to the documentation of this file.
1 /** @file cfl_statemin.h state space minimization */
2 
3 /* FAU Discrete Event Systems Library (libfaudes)
4 
5  Copyright (C) 2006 Bernd Opitz
6  Exclusive copyright is granted to Klaus Schmidt
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Lesser General Public
10  License as published by the Free Software Foundation; either
11  version 2.1 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Lesser General Public License for more details.
17 
18  You should have received a copy of the GNU Lesser General Public
19  License along with this library; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21 
22 
23 #ifndef FAUDES_STATEMIN_H
24 
25 #include "cfl_definitions.h"
26 #include "cfl_agenerator.h"
27 #include <vector>
28 #include <string>
29 #include <sstream>
30 
31 namespace faudes {
32 
33 /**
34  * State set minimization.
35  * Constructs a generator with minimal stateset while preserving the generated und marked languages.
36  * This function implements the (n*log n) set partitioning algorithm by
37  * John E. Hopcroft. The given generator will be made accessible before computing
38  * minimized generator.
39  * See also StateMin(Generator&,Generator&,std::vector<StateSet>&,std::vector<Idx>&).
40  *
41  * @param rGen
42  * Generator
43  * @param rResGen
44  * Minimized generator (result)
45  *
46  * @exception Exception
47  * Input automaton nondeterministic (id 101)
48  *
49  */
50 void StateMin(Generator& rGen, Generator& rResGen);
51 
52 /**
53  * State set minimization.
54  * Constructs a generator with minimal stateset while preserving the generated und marked languages.
55  * This function implements the (n*log n) set partitioning algorithm by
56  * John E. Hopcroft. The algorithm expects an accessible input generator. To have a const
57  * interface, the argument is copied. See also StateMin(Generator&,Generator&).
58  *
59  * @param rGen
60  * Generator
61  * @param rResGen
62  * Minimized generator (result)
63  *
64  * @exception Exception
65  * Input automaton nondeterministic (id 101)
66  *
67  * <h4>Example:</h4>
68  * <table>
69  * <tr> <td> Generator G </td> <td> StateMin(G,Result) </td> </tr>
70  * <tr>
71  * <td> @image html tmp_minimal_nonmin.png </td>
72  * <td> @image html tmp_minimal_min.png </td>
73  * </tr>
74  * </table>
75  *
76  * @ingroup GeneratorFunctions
77  */
78 void StateMin(const Generator& rGen, Generator& rResGen);
79 
80 /**
81  * State set minimization.
82  *
83  * See also StateMin(const Generator&, Generator&).
84  * This version maintains event attributes provided
85  * they can be casted to the result type.
86  *
87  * @param rGen
88  * Generator
89  * @param rResGen
90  * Minimized generator (result)
91  *
92  * @exception Exception
93  * Input automaton nondeterministic (id 101)
94  *
95  * @ingroup GeneratorFunctions
96  */
97 void aStateMin(const Generator& rGen, Generator& rResGen);
98 
99 /**
100  * State set minimization.
101  *
102  * See also StateMin(const Generator&, Generator&).
103  * This version maintains event attributes provided
104  * they can be casted to the result type.
105  *
106  * @param rGen
107  * Generator
108  *
109  * @exception Exception
110  * Input automaton nondeterministic (id 101)
111  *
112  * @ingroup GeneratorFunctions
113  */
114 void aStateMin(Generator& rGen);
115 
116 /**
117  * State set minimization.
118  * This function implements the (n*log n) set partitioning algorithm by
119  * John E. Hopcroft. Given generator will be made accessible before computing
120  * minimized generator.
121  * See also StateMin(Generator&,Generator&).
122  *
123  * @param rGen
124  * Generator
125  * @param rResGen
126  * Minimized generator (result)
127  * @param rSubsets
128  * Vector of subsets that will be constructed during running the algorithm
129  * (optional parameter)
130  * @param rNewIndices
131  * Vector of new state indices corresponding to the subsets
132  * (optional parameter)
133  *
134  * @exception Exception
135  * Input automaton nondeterministic (id 101)
136  */
137 void StateMin(Generator& rGen, Generator& rResGen,
138  std::vector<StateSet>& rSubsets, std::vector<Idx>& rNewIndices);
139 
140 } // namespace faudes
141 
142 #define FAUDES_STATEMIN_H
143 #endif

libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen