UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
IDPartition.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef IDPARTITION_H_
21 #define IDPARTITION_H_
22 
23 #include "globals.h"
24 #include "hash_functions.h"
25 
26 namespace uncover {
27  namespace basic_types {
28 
32  typedef unordered_set<IDType> SubIDPartition;
33 
37  typedef unordered_set<SubIDPartition> IDPartition;
38 
45  extern bool idpart_intersect(SubIDPartition const& part1, SubIDPartition const& part2);
46 
57  extern IDPartition idpart_transitive_closure(IDPartition const& part1, IDPartition const& part2);
58 
66  extern void idpart_transitive_closure_into1(IDPartition& part1, IDPartition const& part2);
67 
68  }
69 }
70 
71 #endif /* IDPARTITION_H_ */
bool idpart_intersect(SubIDPartition const &part1, SubIDPartition const &part2)
Checks if two sets of IDs intersect, i.e.
Definition: IDPartition.cpp:27
unordered_set< IDType > SubIDPartition
A SubIDPartition is a set of IDs used by IDPartition.
Definition: IDPartition.h:32
IDPartition idpart_transitive_closure(IDPartition const &part1, IDPartition const &part2)
Builds the transitive closure of two given IDPartitions.
Definition: IDPartition.cpp:36
unordered_set< SubIDPartition > IDPartition
An IDPartition is a set of sets of IDs (which is effectively a set of equivalence classes)...
Definition: IDPartition.h:37
void idpart_transitive_closure_into1(IDPartition &part1, IDPartition const &part2)
Builds the transitive closure of two given IDPartitions.
Definition: IDPartition.cpp:42