op_partition.h

Go to the documentation of this file.
00001 /** @file op_partition.h 
00002 
00003 Data structure that implements an equivalence class in the bisimulation algorithm.
00004 The algorithm is presented in 
00005 J.-C. Fernandez, “An implementation of an efficient algorithm for
00006 bisimulation equivalence,” Science of Computer Programming, vol. 13,
00007 pp. 219-236, 1990.
00008 */
00009 
00010 /* FAU Discrete Event Systems Library (libfaudes)
00011 
00012    Copyright (C) 2006  Bernd Opitz
00013    Exclusive copyright is granted to Klaus Schmidt
00014 
00015    This library is free software; you can redistribute it and/or
00016    modify it under the terms of the GNU Lesser General Public
00017    License as published by the Free Software Foundation; either
00018    version 2.1 of the License, or (at your option) any later version.
00019 
00020    This library is distributed in the hope that it will be useful,
00021    but WITHOUT ANY WARRANTY; without even the implied warranty of
00022    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023    Lesser General Public License for more details.
00024 
00025    You should have received a copy of the GNU Lesser General Public
00026    License along with this library; if not, write to the Free Software
00027    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00028 
00029 
00030 #include "corefaudes.h"
00031 #include "op_debug.h"
00032 #include <vector>
00033 #include <map>
00034 
00035 #ifndef FAUDES_OP_PARTITION_H
00036 #define FAUDES_OP_PARTITION_H
00037 
00038 
00039 namespace faudes {
00040           
00041 /**
00042 * This struct implements a coset (=equivalence class) as needed for the computation of the coarsest quasi-congruence on an automaton.
00043 */          
00044 struct Partition {
00045 
00046         /** Constructor */
00047         Partition();
00048 
00049         /** Unique index */
00050         Idx index;
00051 
00052         /** Pointer to the associated StateSet */
00053         StateSet states;
00054 
00055         /** Index of the parent coset */
00056         Partition* pFather;
00057 
00058         /** Index of the brother coset */
00059         Partition* pBrother;
00060 
00061         /** Index of first child coset */
00062         Partition* pFirstChild;
00063 
00064         /** Index of second child coset */
00065         Partition* pSecondChild;
00066 
00067         /** indicates if the current partition is stable with respect to this coset */
00068         bool nonSplitting;
00069 
00070         /** Info-map. First Idx: event, second Idx: state, third Idx: number of occurences */
00071         std::map<Idx,std::map<Idx,Idx> > infoMap;
00072 
00073         /**
00074         * Write info-map to console
00075         *
00076         * @param event
00077         *    event for which the info-map shall be plotted
00078         */
00079         void writeInfoMap(Idx event) const;
00080 
00081         /** number of states in this coset */
00082         Idx numberOfStates;
00083 };
00084 
00085 } // name space
00086 
00087 #endif

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen