Debian Codegraph @

data/0.12-dev/src/SetUtils.t.cpp

raw
1 #include "SetUtils.h"
2 #include <iostream>
3 #include <vector>
4 #include <list>
5 #include <deque>
6 using namespace std;
7
8 int main()
9 {
10 vector<int> a, b;
11
12 a.push_back(1);
13 a.push_back(2);
14 a.push_back(3);
15 a.push_back(4);
16 a.push_back(5);
17 a.push_back(6);
18 a.push_back(7);
19 a.push_back(8);
20 a.push_back(9);
21 a.push_back(10);
22
23 b.push_back(1);
24 b.push_back(2);
25 b.push_back(3);
26 b.push_back(4);
27 b.push_back(5);
28
29 vector<int> l;
30 vector<int> r;
31 vector<int> c;
32
33 set_comparison(l, r, c, a.begin(), a.end(), b.begin(), b.end());
34 cout << "set_comparison(a, b):\n";
35 cout << " l = "; copy(l.begin(), l.end(), ostream_iterator<int>(cout, ", "));
36 cout << "\n r = "; copy(r.begin(), r.end(), ostream_iterator<int>(cout, ", "));
37 cout << "\n c = "; copy(c.begin(), c.end(), ostream_iterator<int>(cout, ", "));
38
39 cout << endl << endl;
40
41 l.clear();
42 r.clear();
43 c.clear();
44
45 set_comparison(l, r, c, b.begin(), b.end(), a.begin(), a.end());
46 cout << "set_comparison(b, a):\n";
47 cout << " l = "; copy(l.begin(), l.end(), ostream_iterator<int>(cout, ", "));
48 cout << "\n r = "; copy(r.begin(), r.end(), ostream_iterator<int>(cout, ", "));
49 cout << "\n c = "; copy(c.begin(), c.end(), ostream_iterator<int>(cout, ", "));
50
51
52
53
54 return 0;
55 }