op_partition.cpp
Go to the documentation of this file.
1 /** @file op_partition.cpp
2 
3 Data structure that implements an equivalence class in the bisimulation algorithm.
4 The algorithm is presented in
5 J.-C. Fernandez, “An implementation of an efficient algorithm for
6 bisimulation equivalence,” Science of Computer Programming, vol. 13,
7 pp. 219-236, 1990.
8 */
9 
10 /* FAU Discrete Event Systems Library (libfaudes)
11 
12  Copyright (C) 2006 Bernd Opitz
13  Exclusive copyright is granted to Klaus Schmidt
14 
15  This library is free software; you can redistribute it and/or
16  modify it under the terms of the GNU Lesser General Public
17  License as published by the Free Software Foundation; either
18  version 2.1 of the License, or (at your option) any later version.
19 
20  This library is distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23  Lesser General Public License for more details.
24 
25  You should have received a copy of the GNU Lesser General Public
26  License along with this library; if not, write to the Free Software
27  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
28 
29 #include "op_partition.h"
30 
31 using namespace std;
32 
33 namespace faudes {
34 
35 Partition::Partition()
36 {
37  OP_DF("Partition::Partition: entering function");
38  nonSplitting=false;
39  OP_DF("Partition::Partition: leaving function");
40 }
41 
42 void Partition::writeInfoMap(Idx event) const
43 {
44  OP_DF("Partition::writeInfoMap: entering function");
45  cout << "Writing info-map for event " << event << endl;
46  std::map<Idx,map<Idx,Idx> >::const_iterator pMap = infoMap.find(event);
47 
48  if(pMap!=infoMap.end())
49  {
50  std::map<Idx,Idx>::const_iterator mIt;
51  std::map<Idx,Idx>::const_iterator mItBegin = pMap->second.begin();
52  std::map<Idx,Idx>::const_iterator mItEnd = pMap->second.end();
53 
54  if(mItBegin == mItEnd)
55  cout << "no entries for this event" << endl;
56  for(mIt=mItBegin; mIt != mItEnd; ++mIt)
57  cout << "state: " << (*mIt).first << " : occurrences: " << (*mIt).second << endl;
58  cout << endl;
59  }
60 
61  else
62  cout << "no info-map for this event" << endl;
63 
64  OP_DF("Partition::writeInfoMap: leaving function");
65 }
66 
67 }

libFAUDES 2.24g --- 2014.09.15 --- c++ api documentaion by doxygen