effspm 0.1.5__cp310-cp310-win_amd64.whl → 0.3.0__cp310-cp310-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. effspm/__init__.py +9 -2
  2. effspm/_core.cpp +91 -13
  3. effspm/_effspm.cp310-win_amd64.pyd +0 -0
  4. effspm/_effspm.cpp +679 -0
  5. effspm/btminer/src/build_mdd.cpp +88 -0
  6. effspm/btminer/src/build_mdd.hpp +34 -0
  7. effspm/btminer/src/freq_miner.cpp +264 -0
  8. effspm/btminer/src/freq_miner.hpp +55 -0
  9. effspm/btminer/src/load_inst.cpp +275 -0
  10. effspm/btminer/src/load_inst.hpp +43 -0
  11. effspm/btminer/src/utility.cpp +50 -0
  12. effspm/btminer/src/utility.hpp +16 -0
  13. effspm/freq_miner.hpp +7 -1
  14. effspm/htminer/src/build_mdd.cpp +139 -0
  15. effspm/htminer/src/build_mdd.hpp +64 -0
  16. effspm/htminer/src/freq_miner.cpp +350 -0
  17. effspm/htminer/src/freq_miner.hpp +60 -0
  18. effspm/htminer/src/load_inst.cpp +394 -0
  19. effspm/htminer/src/load_inst.hpp +23 -0
  20. effspm/htminer/src/utility.cpp +72 -0
  21. effspm/htminer/src/utility.hpp +77 -0
  22. effspm/largebm/src/build_mdd.cpp +96 -0
  23. effspm/largebm/src/build_mdd.hpp +32 -0
  24. effspm/largebm/src/freq_miner.cpp +299 -0
  25. effspm/largebm/src/freq_miner.hpp +37 -0
  26. effspm/largebm/src/load_inst.cpp +224 -0
  27. effspm/largebm/src/load_inst.hpp +35 -0
  28. effspm/largebm/src/utility.cpp +35 -0
  29. effspm/largebm/src/utility.hpp +15 -0
  30. effspm/largehm/src/build_mdd.cpp +174 -0
  31. effspm/largehm/src/build_mdd.hpp +93 -0
  32. effspm/largehm/src/freq_miner.cpp +429 -0
  33. effspm/largehm/src/freq_miner.hpp +77 -0
  34. effspm/largehm/src/load_inst.cpp +375 -0
  35. effspm/largehm/src/load_inst.hpp +64 -0
  36. effspm/largehm/src/utility.cpp +38 -0
  37. effspm/largehm/src/utility.hpp +29 -0
  38. effspm/largepp/src/freq_miner.cpp +198 -0
  39. effspm/largepp/src/freq_miner.hpp +18 -0
  40. effspm/largepp/src/load_inst.cpp +238 -0
  41. effspm/largepp/src/load_inst.hpp +34 -0
  42. effspm/largepp/src/pattern.hpp +31 -0
  43. effspm/largepp/src/utility.cpp +34 -0
  44. effspm/largepp/src/utility.hpp +21 -0
  45. effspm/load_inst.hpp +18 -12
  46. effspm-0.3.0.dist-info/METADATA +237 -0
  47. effspm-0.3.0.dist-info/RECORD +54 -0
  48. {effspm-0.1.5.dist-info → effspm-0.3.0.dist-info}/WHEEL +1 -1
  49. effspm/_core.cp310-win_amd64.pyd +0 -0
  50. effspm-0.1.5.dist-info/METADATA +0 -38
  51. effspm-0.1.5.dist-info/RECORD +0 -14
  52. {effspm-0.1.5.dist-info → effspm-0.3.0.dist-info}/licenses/LICENSE +0 -0
  53. {effspm-0.1.5.dist-info → effspm-0.3.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,275 @@
1
+ // effspm/btminer/src/load_inst.cpp
2
+ #include <iostream>
3
+ #include <fstream>
4
+ #include <sstream>
5
+ #include <algorithm>
6
+ #include <math.h>
7
+ #include <time.h>
8
+
9
+ #include "load_inst.hpp"
10
+ #include "utility.hpp"
11
+ #include "build_mdd.hpp"
12
+ #include "freq_miner.hpp"
13
+
14
+ namespace btminer {
15
+
16
+ using namespace std;
17
+
18
+ // ---------------------------------------------------------------------
19
+ // global definitions (must match load_inst.hpp)
20
+ // ---------------------------------------------------------------------
21
+ int M = 0;
22
+ int N = 0;
23
+ int L = 0;
24
+ unsigned long long E = 0ULL; // matches header: extern unsigned long long E;
25
+ int num_nodes = 0;
26
+ int theta = 0;
27
+ int cur_node = 0;
28
+
29
+ map<string, int> item_map;
30
+ map<int, string> item_map_rev;
31
+
32
+ std::vector<int> freq;
33
+ std::vector<int> item_dic;
34
+
35
+ // ✅ REAL DEFINITION lives here:
36
+ std::vector<Pattern> DFS;
37
+
38
+ string out_file, folder;
39
+ bool b_disp = 0;
40
+ bool b_write = 0;
41
+ bool use_dic = 0;
42
+ bool just_build= 0;
43
+ bool pre_pro = 1;
44
+
45
+ int N_mult = 1;
46
+ int M_mult = 1;
47
+ int time_limit= 30 * 3600; // 30 hours, same as professor
48
+
49
+ clock_t start_time;
50
+
51
+ // ---------------------------------------------------------------------
52
+ // forward decls
53
+ // ---------------------------------------------------------------------
54
+ void Load_items_pre(string &inst_name);
55
+ bool Load_items(string &inst_name);
56
+ bool Preprocess(string &inst, double thresh);
57
+
58
+ // ---------------------------------------------------------------------
59
+ // main loader
60
+ // ---------------------------------------------------------------------
61
+ bool Load_instance(string &items_file, double thresh) {
62
+ clock_t kk = clock();
63
+
64
+ // root node for MDD
65
+ Tree.emplace_back(0, 0, 0);
66
+
67
+ if (pre_pro) {
68
+ if (!Preprocess(items_file, thresh))
69
+ return false;
70
+
71
+ cout << "\nPreprocess done in " << give_time(clock() - kk) << " seconds\n\n";
72
+
73
+ // build empty DFS of size L
74
+ DFS.clear();
75
+ DFS.reserve(L);
76
+ for (int i = 0; i < L; ++i)
77
+ DFS.emplace_back(-i - 1);
78
+
79
+ kk = clock();
80
+ Load_items_pre(items_file);
81
+ }
82
+ else if (!Load_items(items_file)) {
83
+ return false;
84
+ }
85
+ else {
86
+ if (thresh < 1)
87
+ theta = static_cast<int>(ceil(thresh * N * N_mult));
88
+ else
89
+ theta = static_cast<int>(thresh);
90
+ }
91
+
92
+ cout << "\nMDD Database built in " << give_time(clock() - kk) << " seconds\n\n";
93
+ cout << "Found " << N * N_mult
94
+ << " sequence, with max line len " << M
95
+ << ", and " << L << " items, and " << E << " enteries\n";
96
+ cout << "Total MDD nodes: " << Tree.size() << endl;
97
+
98
+ return true;
99
+ }
100
+
101
+ // ---------------------------------------------------------------------
102
+ // preprocessing pass
103
+ // ---------------------------------------------------------------------
104
+ bool Preprocess(string &inst, double thresh) {
105
+ ifstream file(inst);
106
+
107
+ if (file.good()) {
108
+ string line;
109
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
110
+ ++N;
111
+ vector<bool> counted(L, false);
112
+
113
+ istringstream word(line);
114
+ string itm;
115
+ while (word >> itm) {
116
+ int ditem = stoi(itm);
117
+ if (L < abs(ditem))
118
+ L = abs(ditem);
119
+
120
+ // extend freq / counted if L grew
121
+ while (static_cast<int>(freq.size()) < L) {
122
+ freq.push_back(0);
123
+ counted.push_back(false);
124
+ }
125
+
126
+ int idx = abs(ditem) - 1;
127
+ if (!counted[idx]) {
128
+ ++freq[idx];
129
+ counted[idx] = true;
130
+ }
131
+ }
132
+ }
133
+ } else {
134
+ cout << "!!!!!! No such file exists: " << inst << " !!!!!!\n";
135
+ return false;
136
+ }
137
+
138
+ if (thresh < 1)
139
+ theta = static_cast<int>(ceil(thresh * N * N_mult));
140
+ else
141
+ theta = static_cast<int>(thresh);
142
+
143
+ // build item_dic with only frequent items
144
+ int real_L = 0;
145
+ item_dic = vector<int>(L, -1);
146
+ for (int i = 0; i < L; ++i) {
147
+ if (freq[i] >= theta)
148
+ item_dic[i] = ++real_L;
149
+ }
150
+
151
+ cout << "Original number of items: " << L
152
+ << " Reduced to: " << real_L << endl;
153
+
154
+ L = real_L;
155
+ N = 0; // will be recounted in Load_items_pre
156
+
157
+ return true;
158
+ }
159
+
160
+ // ---------------------------------------------------------------------
161
+ // load after preprocessing
162
+ // ---------------------------------------------------------------------
163
+ void Load_items_pre(string &inst_name) {
164
+ ifstream file(inst_name);
165
+
166
+ if (file.good()) {
167
+ string line;
168
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
169
+ istringstream word(line);
170
+ string itm;
171
+ vector<int> temp_vec;
172
+ bool sgn = false;
173
+ while (word >> itm) {
174
+ int ditem;
175
+ if (use_dic) {
176
+ auto it = item_map.find(itm);
177
+ if (it == item_map.end()) {
178
+ item_map[itm] = ++L;
179
+ item_map_rev[L] = itm;
180
+ ditem = L;
181
+ } else {
182
+ ditem = it->second;
183
+ }
184
+ } else {
185
+ ditem = stoi(itm);
186
+ }
187
+
188
+ // drop infrequent items
189
+ if (freq[abs(ditem) - 1] < theta) {
190
+ if (!sgn)
191
+ sgn = (ditem < 0);
192
+ continue;
193
+ } else {
194
+ if (ditem > 0)
195
+ ditem = item_dic[ditem - 1];
196
+ else
197
+ ditem = -item_dic[-ditem - 1];
198
+ }
199
+
200
+ if (sgn) {
201
+ if (ditem > 0)
202
+ ditem = -ditem;
203
+ sgn = false;
204
+ }
205
+
206
+ temp_vec.push_back(ditem);
207
+ }
208
+
209
+ if (temp_vec.empty())
210
+ continue;
211
+
212
+ ++N;
213
+
214
+ if (static_cast<int>(temp_vec.size()) > M)
215
+ M = static_cast<int>(temp_vec.size());
216
+
217
+ // this increments E inside Build_MDD
218
+ Build_MDD(temp_vec);
219
+ }
220
+ }
221
+ }
222
+
223
+ // ---------------------------------------------------------------------
224
+ // load without preprocessing
225
+ // ---------------------------------------------------------------------
226
+ bool Load_items(string &inst_name) {
227
+ ifstream file(inst_name);
228
+
229
+ if (file.good()) {
230
+ string line;
231
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
232
+ ++N;
233
+ istringstream word(line);
234
+ string itm;
235
+ vector<int> temp_vec;
236
+ while (word >> itm) {
237
+ int ditem;
238
+ if (use_dic) {
239
+ auto it = item_map.find(itm);
240
+ if (it == item_map.end()) {
241
+ item_map[itm] = ++L;
242
+ item_map_rev[L] = itm;
243
+ ditem = L;
244
+ } else {
245
+ ditem = it->second;
246
+ }
247
+ } else {
248
+ ditem = stoi(itm);
249
+ if (L < abs(ditem)) {
250
+ L = abs(ditem);
251
+ // make sure DFS is large enough (unless just_build)
252
+ while (static_cast<int>(DFS.size()) < L && !just_build) {
253
+ DFS.reserve(L);
254
+ DFS.emplace_back(-((int)DFS.size()) - 1);
255
+ }
256
+ }
257
+ }
258
+
259
+ temp_vec.push_back(ditem);
260
+ }
261
+
262
+ if (static_cast<int>(temp_vec.size()) > M)
263
+ M = static_cast<int>(temp_vec.size());
264
+
265
+ Build_MDD(temp_vec);
266
+ }
267
+ } else {
268
+ cout << "!!!!!! No such file exists: " << inst_name << " !!!!!!\n";
269
+ return false;
270
+ }
271
+
272
+ return true;
273
+ }
274
+
275
+ } // namespace btminer
@@ -0,0 +1,43 @@
1
+ #pragma once
2
+
3
+ #include <vector>
4
+ #include <string>
5
+ #include <fstream>
6
+ #include <map>
7
+ #include <unordered_set>
8
+ #include <unordered_map>
9
+ #include <ctime>
10
+
11
+ namespace btminer {
12
+
13
+ using std::string;
14
+ using std::vector;
15
+ using std::map;
16
+ using std::unordered_map;
17
+ using std::unordered_set;
18
+
19
+ bool Load_instance(string& items_file, double thresh);
20
+
21
+ extern string out_file, folder;
22
+
23
+ extern bool b_disp, b_write, use_dic, just_build, pre_pro;
24
+
25
+ extern int N, M, L, theta, num_nodes, M_mult, N_mult, time_limit, cur_node;
26
+ extern unsigned long long E; // total number of entries (we need this for _effspm.cpp)
27
+
28
+ extern std::clock_t start_time;
29
+
30
+ // these 2 are for dictionary mode
31
+ extern map<string,int> item_map;
32
+ extern map<int,string> item_map_rev;
33
+
34
+ extern vector<int> freq;
35
+ extern vector<int> item_dic;
36
+
37
+ // expose items so _effspm.cpp can fall back to seeding (it expects btminer::items)
38
+ extern vector<vector<int>> items;
39
+
40
+ class Pattern;
41
+ extern vector<Pattern> DFS;
42
+
43
+ } // namespace btminer
@@ -0,0 +1,50 @@
1
+ #include "utility.hpp"
2
+ #include "build_mdd.hpp"
3
+ #include "load_inst.hpp"
4
+ #include <iostream>
5
+
6
+ namespace btminer {
7
+
8
+ int find_ID(vector<int>& vec, int itm) {
9
+ int plc = 0;
10
+ while (plc < static_cast<int>(vec.size()) && vec[plc] != itm)
11
+ ++plc;
12
+
13
+ if (plc == static_cast<int>(vec.size()))
14
+ return -1;
15
+ else
16
+ return plc;
17
+ }
18
+
19
+ bool check_parent(int cur_arc, int str_pnt, int start, std::vector<int>& strpnt_vec) {
20
+
21
+ std::vector<int> ancestors;
22
+
23
+ int cur_anct = Tree[cur_arc].anct;
24
+
25
+ while (Tree[cur_anct].itmset > Tree[str_pnt].itmset) {
26
+ if (Tree[cur_anct].item > 0)
27
+ ancestors.push_back(cur_anct);
28
+ cur_anct = Tree[cur_anct].anct;
29
+ }
30
+
31
+ if (Tree[cur_anct].itmset == Tree[str_pnt].itmset)
32
+ return true;
33
+ else {
34
+ for (auto it = ancestors.rbegin(); it != ancestors.rend(); ++it) {
35
+ for (int i = start; i < static_cast<int>(strpnt_vec.size()); ++i) {
36
+ if (strpnt_vec[i] == *it)
37
+ return true;
38
+ }
39
+ }
40
+ }
41
+
42
+ return false;
43
+ }
44
+
45
+ float give_time(clock_t kk) {
46
+ float ll = static_cast<float>(kk) / CLOCKS_PER_SEC;
47
+ return ll;
48
+ }
49
+
50
+ } // namespace btminer
@@ -0,0 +1,16 @@
1
+ #pragma once
2
+
3
+ #include <vector>
4
+ #include <time.h>
5
+ #include <string>
6
+ #include "build_mdd.hpp"
7
+
8
+ namespace btminer {
9
+
10
+ using std::vector;
11
+
12
+ int find_ID(vector<int>& vec, int itm);
13
+ float give_time(clock_t kk);
14
+ bool check_parent(int cur_arc, int str_pnt, int start, vector<int>& strpnt_vec);
15
+
16
+ } // namespace btminer
effspm/freq_miner.hpp CHANGED
@@ -1,7 +1,11 @@
1
1
  #pragma once
2
-
2
+ #include <vector>
3
3
  #include "load_inst.hpp"
4
+ #include <cstdlib>
5
+ #include <cmath>
6
+ #include <cstddef> // for std::size_t
4
7
 
8
+ using namespace std;
5
9
  void Freq_miner();
6
10
  void Out_patt(std::vector<int>& seq, unsigned int freq);
7
11
 
@@ -21,6 +25,8 @@ public:
21
25
  Pattern(vector<int>& _seq, int item) {
22
26
  seq.reserve(_seq.size());
23
27
  for (int i = 0; i < _seq.size(); ++i)
28
+
29
+
24
30
  seq.push_back(_seq[i]);
25
31
  seq.push_back(item);
26
32
  freq = 0;
@@ -0,0 +1,139 @@
1
+ #include <vector>
2
+ #include <iostream>
3
+ #include "load_inst.hpp"
4
+ #include "build_mdd.hpp"
5
+ #include "freq_miner.hpp"
6
+ #include "utility.hpp"
7
+
8
+ namespace htminer {
9
+
10
+ // Forward declarations (unchanged)
11
+ int Add_arc(int item, unsigned int last_arc, int& itmset, std::vector<unsigned int>& ancest_map);
12
+ void Add_vec(std::vector<int>& items_lim, std::vector<unsigned int>& ancest_map, unsigned int last_arc, int itmset);
13
+
14
+ // Global trees (unchanged)
15
+ std::vector<Arc> Tree;
16
+ std::vector<VArc> VTree;
17
+ std::vector<CArc> CTree;
18
+
19
+ void Build_MDD(std::vector<int>& items, std::vector<int>& items_lim) {
20
+ // Prepare ancestor map of size L
21
+ std::vector<unsigned int> ancest_map(L, 0);
22
+
23
+ unsigned int last_arc = 0;
24
+ int itmset = 0;
25
+
26
+ // 1) normal items
27
+ for (size_t idx = 0; idx < items.size(); ++idx) {
28
+ int curr_item = items[idx];
29
+
30
+ ++E; // ✅ count this entry, just like in btminer
31
+
32
+ last_arc = Add_arc(curr_item, last_arc, itmset, ancest_map);
33
+ }
34
+
35
+ // 2) tail / limited items
36
+ if (!items_lim.empty()) {
37
+ Add_vec(items_lim, ancest_map, last_arc, itmset);
38
+ }
39
+ }
40
+
41
+ int Add_arc(int item,
42
+ unsigned int last_arc,
43
+ int& itmset,
44
+ std::vector<unsigned int>& ancest_map)
45
+ {
46
+ unsigned int anct = ancest_map[std::abs(item) - 1];
47
+ if (item < 0)
48
+ ++itmset;
49
+
50
+ unsigned int last_sibl = Tree[last_arc].chld;
51
+
52
+ if (last_sibl == 0) {
53
+ Tree.emplace_back(item, itmset, anct);
54
+ last_sibl = static_cast<unsigned int>(Tree.size() - 1);
55
+ Tree[last_arc].chld = last_sibl;
56
+
57
+ if (anct == 0)
58
+ DFS[std::abs(item) - 1].str_pnt.push_back(last_sibl);
59
+ }
60
+ else {
61
+ while (Tree[last_sibl].item != item) {
62
+ if (Tree[last_sibl].sibl == 0) {
63
+ Tree.emplace_back(item, itmset, anct);
64
+ Tree[last_sibl].sibl = static_cast<unsigned int>(Tree.size() - 1);
65
+ last_sibl = static_cast<unsigned int>(Tree.size() - 1);
66
+ if (anct == 0)
67
+ DFS[std::abs(item) - 1].str_pnt.push_back(last_sibl);
68
+ break;
69
+ }
70
+ last_sibl = Tree[last_sibl].sibl;
71
+ }
72
+ }
73
+
74
+ if (anct == 0)
75
+ ++DFS[std::abs(item) - 1].freq;
76
+
77
+ ++Tree[last_sibl].freq;
78
+
79
+ ancest_map[std::abs(item) - 1] = last_sibl;
80
+
81
+ return static_cast<int>(last_sibl);
82
+ }
83
+
84
+ void Add_vec(std::vector<int>& items_lim,
85
+ std::vector<unsigned int>& ancest,
86
+ unsigned int last_arc,
87
+ int itmset)
88
+ {
89
+ items_lim.shrink_to_fit();
90
+
91
+ std::vector<bool> counted(L, false);
92
+
93
+ if (Tree[last_arc].itmset > 0) {
94
+ ancest.push_back(0);
95
+ ancest.shrink_to_fit();
96
+
97
+ for (size_t i = 0; i < items_lim.size(); ++i) {
98
+ int cur_itm = std::abs(items_lim[i]);
99
+
100
+ ++E; // ✅ count this limited-entry too
101
+
102
+ if (ancest[cur_itm - 1] == 0 && !counted[cur_itm - 1]) {
103
+ if (i + 1 < static_cast<int>(items_lim.size())) {
104
+ VDFS[cur_itm - 1].str_pnt.push_back(-static_cast<int>(i) - 1);
105
+ VDFS[cur_itm - 1].seq_ID.push_back(static_cast<unsigned int>(CTree.size()));
106
+ }
107
+ ++DFS[cur_itm - 1].freq;
108
+ counted[cur_itm - 1] = true;
109
+ }
110
+ }
111
+
112
+ CTree.emplace_back(ancest, items_lim);
113
+ Tree[last_arc].chld = static_cast<unsigned int>(CTree.size() - 1);
114
+ Tree[last_arc].itmset = -itmset;
115
+ }
116
+ else {
117
+ std::vector<unsigned int>& ancest_ct = CTree[Tree[last_arc].chld].ancest;
118
+
119
+ for (size_t i = 0; i < items_lim.size(); ++i) {
120
+ int cur_itm = std::abs(items_lim[i]);
121
+
122
+ ++E; // ✅ also count in this branch
123
+
124
+ if (!counted[cur_itm - 1] && ancest_ct[cur_itm - 1] == 0) {
125
+ if (i + 1 < static_cast<int>(items_lim.size())) {
126
+ VDFS[cur_itm - 1].str_pnt.push_back(static_cast<unsigned int>(i) + 1);
127
+ VDFS[cur_itm - 1].seq_ID.push_back(static_cast<unsigned int>(VTree.size()));
128
+ }
129
+ ++DFS[cur_itm - 1].freq;
130
+ counted[cur_itm - 1] = true;
131
+ }
132
+ }
133
+
134
+ VTree.emplace_back(items_lim, ancest_ct.back());
135
+ CTree[Tree[last_arc].chld].ancest.back() = static_cast<unsigned int>(VTree.size());
136
+ }
137
+ }
138
+
139
+ } // namespace htminer
@@ -0,0 +1,64 @@
1
+ #pragma once
2
+
3
+ #include <vector>
4
+ #include <cmath>
5
+ #include "load_inst.hpp"
6
+
7
+ namespace htminer {
8
+ void Build_MDD(std::vector<int>& items, std::vector<int>& items_lim);
9
+
10
+ class Arc {
11
+ public:
12
+ unsigned int chld;
13
+ unsigned int sibl;
14
+ unsigned int freq;
15
+ unsigned int anct;
16
+ int itmset;
17
+ int item;
18
+
19
+ Arc(unsigned int _itm, int _itmset, unsigned int _anc) {
20
+ chld = 0;
21
+ sibl = 0;
22
+ freq = 0;
23
+ itmset = _itmset;
24
+ anct = _anc;
25
+ item = _itm;
26
+ }
27
+
28
+ Arc() {
29
+ chld = 0;
30
+ sibl = 0;
31
+ freq = 0;
32
+ }
33
+ };
34
+
35
+ class VArc {
36
+ public:
37
+ unsigned int sibl;
38
+ std::vector<int> seq;
39
+
40
+ VArc(std::vector<int>& items, unsigned int _sib) {
41
+ sibl = _sib;
42
+ seq.swap(items);
43
+ }
44
+
45
+ VArc() {
46
+ sibl = 0;
47
+ }
48
+ };
49
+
50
+ class CArc {
51
+ public:
52
+ std::vector<int> seq;
53
+ std::vector<unsigned int> ancest;
54
+
55
+ CArc(std::vector<unsigned int>& _anc, std::vector<int>& items) {
56
+ ancest.swap(_anc);
57
+ seq.swap(items);
58
+ }
59
+ };
60
+
61
+ extern std::vector<Arc> Tree;
62
+ extern std::vector<VArc> VTree;
63
+ extern std::vector<CArc> CTree;
64
+ }