op_partition.cpp

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

Generated on Fri May 9 11:26:47 2008 for libFAUDES 2.09b by  doxygen 1.4.4