op_partition.cpp

Go to the documentation of this file.
00001 /** @file op_partition.cpp 
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 #include "op_partition.h"
00030 
00031 using namespace std;
00032 
00033 namespace faudes {
00034 
00035 Partition::Partition()
00036 {
00037     OP_DF("Partition::Partition: entering function");                      
00038     nonSplitting=false;
00039     OP_DF("Partition::Partition: leaving function");    
00040 }
00041 
00042 void Partition::writeInfoMap(Idx event) const
00043 {
00044     OP_DF("Partition::writeInfoMap: entering function");
00045     cout << "Writing info-map for event " << event << endl;
00046     std::map<Idx,map<Idx,Idx> >::const_iterator pMap = infoMap.find(event);
00047 
00048     if(pMap!=infoMap.end())
00049     {
00050         std::map<Idx,Idx>::const_iterator mIt;
00051         std::map<Idx,Idx>::const_iterator mItBegin = pMap->second.begin();
00052         std::map<Idx,Idx>::const_iterator mItEnd = pMap->second.end();
00053 
00054         if(mItBegin == mItEnd)
00055             cout << "no entries for this event" << endl; 
00056         for(mIt=mItBegin; mIt != mItEnd; ++mIt)
00057             cout << "state: " << (*mIt).first << " : occurrences: " << (*mIt).second << endl;
00058         cout << endl;
00059     }
00060 
00061     else
00062         cout << "no info-map for this event" << endl;
00063 
00064     OP_DF("Partition::writeInfoMap: leaving function");
00065 }
00066 
00067 }

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