cfl_statemin.hGo to the documentation of this file.00001 /** @file cfl_statemin.h state space minimization */ 00002 00003 /* FAU Discrete Event Systems Library (libfaudes) 00004 00005 Copyright (C) 2006 Bernd Opitz 00006 Exclusive copyright is granted to Klaus Schmidt 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Lesser General Public 00010 License as published by the Free Software Foundation; either 00011 version 2.1 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Lesser General Public License for more details. 00017 00018 You should have received a copy of the GNU Lesser General Public 00019 License along with this library; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00021 00022 00023 #ifndef FAUDES_STATEMIN_H 00024 00025 #include "cfl_definitions.h" 00026 #include "cfl_agenerator.h" 00027 #include <vector> 00028 #include <string> 00029 #include <sstream> 00030 00031 namespace faudes { 00032 00033 /** 00034 * State set minimization. 00035 * Constructs a generator with minimal stateset while preserving the generated und marked languages. 00036 * This function implements the (n*log n) set partitioning algorithm by 00037 * John E. Hopcroft. The given generator will be made accessible before computing 00038 * minimized generator. 00039 * See also StateMin(Generator&,Generator&,std::vector<StateSet>&,std::vector<Idx>&). 00040 * 00041 * @param rGen 00042 * Generator 00043 * @param rResGen 00044 * Minimized generator (result) 00045 * 00046 * @exception Exception 00047 * Input automaton nondeterministic (id 101) 00048 * 00049 */ 00050 void StateMin(Generator& rGen, Generator& rResGen); 00051 00052 /** 00053 * State set minimization. 00054 * Constructs a generator with minimal stateset while preserving the generated und marked languages. 00055 * This function implements the (n*log n) set partitioning algorithm by 00056 * John E. Hopcroft. The algorithm expects an accessible input generator. To have a const 00057 * interface, the argument is copied. See also StateMin(Generator&,Generator&). 00058 * 00059 * @param rGen 00060 * Generator 00061 * @param rResGen 00062 * Minimized generator (result) 00063 * 00064 * @exception Exception 00065 * Input automaton nondeterministic (id 101) 00066 * 00067 * <h4>Example:</h4> 00068 * <table> 00069 * <tr> <td> Generator G </td> <td> StateMin(G,Result) </td> </tr> 00070 * <tr> 00071 * <td> @image html tmp_minimal_nonmin.png </td> 00072 * <td> @image html tmp_minimal_min.png </td> 00073 * </tr> 00074 * </table> 00075 * 00076 * @ingroup GeneratorFunctions 00077 */ 00078 void StateMin(const Generator& rGen, Generator& rResGen); 00079 00080 /** 00081 * State set minimization. 00082 * 00083 * See also StateMin(const Generator&, Generator&). 00084 * This version maintains event attributes provided 00085 * they can be casted to the result type. 00086 * 00087 * @param rGen 00088 * Generator 00089 * @param rResGen 00090 * Minimized generator (result) 00091 * 00092 * @exception Exception 00093 * Input automaton nondeterministic (id 101) 00094 * 00095 * @ingroup GeneratorFunctions 00096 */ 00097 void aStateMin(const Generator& rGen, Generator& rResGen); 00098 00099 /** 00100 * State set minimization. 00101 * 00102 * See also StateMin(const Generator&, Generator&). 00103 * This version maintains event attributes provided 00104 * they can be casted to the result type. 00105 * 00106 * @param rGen 00107 * Generator 00108 * 00109 * @exception Exception 00110 * Input automaton nondeterministic (id 101) 00111 * 00112 * @ingroup GeneratorFunctions 00113 */ 00114 void aStateMin(Generator& rGen); 00115 00116 /** 00117 * State set minimization. 00118 * This function implements the (n*log n) set partitioning algorithm by 00119 * John E. Hopcroft. Given generator will be made accessible before computing 00120 * minimized generator. 00121 * See also StateMin(Generator&,Generator&). 00122 * 00123 * @param rGen 00124 * Generator 00125 * @param rResGen 00126 * Minimized generator (result) 00127 * @param rSubsets 00128 * Vector of subsets that will be constructed during running the algorithm 00129 * (optional parameter) 00130 * @param rNewIndices 00131 * Vector of new state indices corresponding to the subsets 00132 * (optional parameter) 00133 * 00134 * @exception Exception 00135 * Input automaton nondeterministic (id 101) 00136 */ 00137 void StateMin(Generator& rGen, Generator& rResGen, 00138 std::vector<StateSet>& rSubsets, std::vector<Idx>& rNewIndices); 00139 00140 } // namespace faudes 00141 00142 #define FAUDES_STATEMIN_H 00143 #endif libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |