-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutils.hpp
33 lines (21 loc) · 898 Bytes
/
utils.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Author: Kristi Daigh
// Project: MLEM2 Rule Induction
// Date: 11/20/2019
/** Header file for utils.
@file utils.hpp
This class provides project-wide
utility functions for sets, etc. */
#include <algorithm>
#include <map>
#include <set>
#include <vector>
std::set<int> setDifference(std::set<int> setA, std::set<int> setB);
std::set<int> setIntersection(std::set<int> setA, std::set<int> setB);
std::set<int> setsIntersection(std::vector<std::set<int> > sets);
std::set<int> setUnion(std::set<int> setA, std::set<int> setB);
std::set<int> setsUnion(std::vector<std::set<int> > sets);
bool subsetEq(std::set<int> setA, std::set<int> setB);
bool commonElements(std::set<int> setA, std::set<int> setB);
void printSet(std::string label, std::set<int> set);
void printList(std::string label, std::vector<std::set<int> > list);
void printMap(std::map<int, std::set<int>> map);