libFAUDES

Sections

Index

statemin.h

Go to the documentation of this file.
00001 /** @file 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 "definitions.h"
00026 #include "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(vGenerator&,vGenerator&,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(vGenerator& rGen, vGenerator& 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(vGenerator&,vGenerator&).
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 vGenerator& rGen, vGenerator& rResGen);
00079 
00080 /**
00081  * State set minimization.
00082  *
00083  * See also StateMin(const vGenerator&, vGenerator&).
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 vGenerator& rGen, vGenerator& rResGen);
00098 
00099 /**
00100  * State set minimization.
00101  * This function implements the (n*log n) set partitioning algorithm by
00102  * John E. Hopcroft. Given generator will be made accessible before computing
00103  * minimized generator.
00104  * See also StateMin(vGenerator&,vGenerator&).
00105  *
00106  * @param rGen
00107  *   Generator
00108  * @param rResGen
00109  *   Minimized generator (result)
00110  * @param rSubsets
00111  *   Vector of subsets that will be constructed during running the algorithm
00112  *   (optional parameter)
00113  * @param rNewIndices
00114  *   Vector of new state indices corresponding to the subsets
00115  *   (optional parameter)
00116  *
00117  * @exception Exception
00118  *   Input automaton nondeterministic (id 101)
00119  */
00120 void StateMin(vGenerator& rGen, vGenerator& rResGen, 
00121     std::vector<StateSet>& rSubsets, std::vector<Idx>& rNewIndices);
00122 
00123 } // namespace faudes
00124 
00125 #define FAUDES_STATEMIN_H
00126 #endif 

libFAUDES 2.14g --- 2009-12-3 --- c++ source docu by doxygen 1.5.6