effspm 0.1.12__cp313-cp313-macosx_10_13_universal2.whl → 0.2.2__cp313-cp313-macosx_10_13_universal2.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.

Potentially problematic release.


This version of effspm might be problematic. Click here for more details.

Files changed (48) hide show
  1. effspm/__init__.py +3 -3
  2. effspm/_effspm.cpp +437 -13
  3. effspm/_effspm.cpython-313-darwin.so +0 -0
  4. effspm/btminer/src/freq_miner.cpp +3 -0
  5. effspm/btminer/src/load_inst.cpp +4 -0
  6. effspm/btminer/src/load_inst.hpp +2 -0
  7. effspm/btminer/src/utility.cpp +31 -33
  8. effspm/btminer/src/utility.hpp +9 -13
  9. effspm/htminer/src/build_mdd.cpp +192 -0
  10. effspm/htminer/src/build_mdd.hpp +64 -0
  11. effspm/htminer/src/freq_miner.cpp +350 -0
  12. effspm/htminer/src/freq_miner.hpp +60 -0
  13. effspm/htminer/src/load_inst.cpp +392 -0
  14. effspm/htminer/src/load_inst.hpp +23 -0
  15. effspm/htminer/src/main.cpp +96 -0
  16. effspm/htminer/src/utility.cpp +72 -0
  17. effspm/htminer/src/utility.hpp +77 -0
  18. effspm/largebm/src/build_mdd.cpp +137 -0
  19. effspm/largebm/src/build_mdd.hpp +47 -0
  20. effspm/largebm/src/freq_miner.cpp +342 -0
  21. effspm/largebm/src/freq_miner.hpp +48 -0
  22. effspm/largebm/src/load_inst.cpp +235 -0
  23. effspm/largebm/src/load_inst.hpp +45 -0
  24. effspm/largebm/src/main.cpp +95 -0
  25. effspm/largebm/src/utility.cpp +45 -0
  26. effspm/largebm/src/utility.hpp +18 -0
  27. effspm/largehm/src/build_mdd.cpp +173 -0
  28. effspm/largehm/src/build_mdd.hpp +93 -0
  29. effspm/largehm/src/freq_miner.cpp +441 -0
  30. effspm/largehm/src/freq_miner.hpp +77 -0
  31. effspm/largehm/src/load_inst.cpp +357 -0
  32. effspm/largehm/src/load_inst.hpp +64 -0
  33. effspm/largehm/src/main.cpp +95 -0
  34. effspm/largehm/src/utility.cpp +38 -0
  35. effspm/largehm/src/utility.hpp +29 -0
  36. effspm/largepp/src/freq_miner.cpp +170 -0
  37. effspm/largepp/src/freq_miner.hpp +43 -0
  38. effspm/largepp/src/load_inst.cpp +219 -0
  39. effspm/largepp/src/load_inst.hpp +28 -0
  40. effspm/largepp/src/main.cpp +108 -0
  41. effspm/largepp/src/utility.cpp +33 -0
  42. effspm/largepp/src/utility.hpp +20 -0
  43. {effspm-0.1.12.dist-info → effspm-0.2.2.dist-info}/METADATA +1 -1
  44. effspm-0.2.2.dist-info/RECORD +59 -0
  45. {effspm-0.1.12.dist-info → effspm-0.2.2.dist-info}/WHEEL +1 -1
  46. effspm-0.1.12.dist-info/RECORD +0 -25
  47. {effspm-0.1.12.dist-info → effspm-0.2.2.dist-info}/licenses/LICENSE +0 -0
  48. {effspm-0.1.12.dist-info → effspm-0.2.2.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,170 @@
1
+ #include <iostream>
2
+ #include <time.h>
3
+ #include "freq_miner.hpp"
4
+ #include "utility.hpp"
5
+
6
+ namespace largepp // ← BEGIN namespacing
7
+ {
8
+ void Out_patt(vector<int>& seq, unsigned int freq);
9
+ void Extend_patt(Pattern& _patt);
10
+
11
+ unsigned long long int num_patt = 0;
12
+
13
+ Pattern _patt;
14
+
15
+ void Freq_miner() {
16
+
17
+ vector<int> islist;
18
+
19
+ for (int i = 0; i < L; ++i) {
20
+ if (DFS[i].freq >= theta)
21
+ islist.push_back(i);
22
+ }
23
+
24
+ for (int i = 0; i < DFS.size(); ++i) {
25
+ DFS[i].ilist = islist;
26
+ DFS[i].slist = islist;
27
+ }
28
+
29
+ while (!DFS.empty() && give_time(clock() - start_time) < time_limit) {
30
+ if (DFS.back().freq >= theta)
31
+ Extend_patt(DFS.back());
32
+ else
33
+ DFS.pop_back();
34
+ }
35
+
36
+ }
37
+
38
+ void Extend_patt(Pattern& _pattern) {
39
+
40
+ swap(_patt, _pattern);
41
+ DFS.pop_back();
42
+
43
+ vector<bool> slist(L, 0);
44
+ vector<bool> ilist(L, 0);
45
+
46
+ for (vector<int>::iterator it = _patt.slist.begin(); it != _patt.slist.end(); ++it)
47
+ slist[*it] = 1;
48
+ for (vector<int>::iterator it = _patt.ilist.begin(); it != _patt.ilist.end(); ++it)
49
+ ilist[*it] = 1;
50
+
51
+ vector<Pattern> pot_patt(L * 2);
52
+
53
+ int last_neg = _patt.seq.size() - 1;
54
+ while (_patt.seq[last_neg] > 0)
55
+ --last_neg;
56
+
57
+ for (int i = 0; i < _patt.str_pnt.size(); ++i) {
58
+
59
+ vector<bool> found(L * 2, 0);
60
+
61
+ unsigned long long int seq = _patt.seq_ID[i];
62
+ unsigned int j = _patt.str_pnt[i] + 1;
63
+ while (j < items[seq].size() && items[seq][j] > 0) {
64
+ int cur_itm = items[seq][j];
65
+ if (ilist[cur_itm - 1]) {
66
+ pot_patt[cur_itm - 1].seq_ID.push_back(seq);
67
+ pot_patt[cur_itm - 1].str_pnt.push_back(j);
68
+ ++pot_patt[cur_itm - 1].freq;
69
+ found[cur_itm - 1] = 1;
70
+ }
71
+ ++j;
72
+ }
73
+
74
+ int num_itmfnd = 0;
75
+ for (int k = j; k < items[seq].size(); ++k) {
76
+ int cur_itm = abs(items[seq][k]);
77
+ if (items[seq][k] < 0)
78
+ num_itmfnd = 0;
79
+ if (slist[cur_itm - 1] && !found[L + cur_itm - 1]) {
80
+ pot_patt[L + cur_itm - 1].seq_ID.push_back(seq);
81
+ pot_patt[L + cur_itm - 1].str_pnt.push_back(k);
82
+ ++pot_patt[L + cur_itm - 1].freq;
83
+ found[L + cur_itm - 1] = 1;
84
+ }
85
+ if (num_itmfnd == _patt.seq.size() - last_neg) {
86
+ if (ilist[cur_itm - 1] && !found[cur_itm - 1]) {
87
+ pot_patt[cur_itm - 1].seq_ID.push_back(seq);
88
+ pot_patt[cur_itm - 1].str_pnt.push_back(k);
89
+ ++pot_patt[cur_itm - 1].freq;
90
+ found[cur_itm - 1] = 1;
91
+ }
92
+ }
93
+ else if (cur_itm == abs(_patt.seq[last_neg + num_itmfnd]))
94
+ ++num_itmfnd;
95
+ }
96
+ }
97
+
98
+
99
+ vector<int> slistp;
100
+ vector<int> ilistp;
101
+
102
+ for (vector<int>::iterator it = _patt.ilist.begin(); it != _patt.ilist.end(); ++it) {
103
+ if (pot_patt[*it].freq >= theta)
104
+ ilistp.push_back(*it);
105
+ }
106
+
107
+ for (vector<int>::iterator it = _patt.slist.begin(); it != _patt.slist.end(); ++it) {
108
+ if (pot_patt[(*it) + L].freq >= theta)
109
+ slistp.push_back(*it);
110
+ }
111
+
112
+ for (vector<int>::iterator it = ilistp.begin(); it != ilistp.end(); ++it) {
113
+ DFS.emplace_back();
114
+ swap(DFS.back(), pot_patt[*it]);
115
+ DFS.back().seq = _patt.seq;
116
+ DFS.back().seq.push_back((*it) + 1);
117
+ DFS.back().slist = slistp;
118
+ DFS.back().ilist = ilistp;
119
+ if (b_disp || b_write)
120
+ Out_patt(DFS.back().seq, DFS.back().freq);
121
+ ++num_patt;
122
+ }
123
+
124
+
125
+ for (vector<int>::iterator it = slistp.begin(); it != slistp.end(); ++it) {
126
+ DFS.emplace_back();
127
+ swap(DFS.back(), pot_patt[(*it) + L]);
128
+ DFS.back().seq = _patt.seq;
129
+ DFS.back().seq.push_back(-(*it) - 1);
130
+ DFS.back().slist = slistp;
131
+ DFS.back().ilist = slistp;
132
+ if (b_disp || b_write)
133
+ Out_patt(DFS.back().seq, DFS.back().freq);
134
+ ++num_patt;
135
+ }
136
+
137
+ }
138
+
139
+
140
+ void Out_patt(vector<int>& seq, unsigned int freq) {
141
+
142
+ largepp::collected.push_back(seq);
143
+
144
+ ofstream file_o;
145
+ if (b_write)
146
+ file_o.open(out_file, std::ios::app);
147
+
148
+ for (int ii = 0; ii < seq.size(); ii++) {
149
+ if (b_disp)
150
+ cout << seq[ii] << " ";
151
+ if (b_write)
152
+ file_o << seq[ii] << " ";
153
+ }
154
+ if (b_disp)
155
+ cout << endl;
156
+ if (b_write)
157
+ file_o << endl;
158
+
159
+ if (b_disp)
160
+ cout << "************** Freq: " << freq << endl;
161
+ if (b_write) {
162
+ file_o << "************** Freq: " << freq << endl;
163
+ file_o.close();
164
+ }
165
+ }
166
+ }
167
+
168
+
169
+
170
+
@@ -0,0 +1,43 @@
1
+ #pragma once
2
+
3
+ #include "load_inst.hpp"
4
+ namespace largepp // ← BEGIN namespacing
5
+ {
6
+ void Freq_miner();
7
+
8
+ class Pattern {
9
+ public:
10
+
11
+ vector<int> seq;
12
+ vector<unsigned int> str_pnt;
13
+ vector<unsigned long long int> seq_ID;
14
+
15
+ vector<int> slist;
16
+ vector<int> ilist;
17
+
18
+ unsigned long long int freq;
19
+
20
+ Pattern(vector<int>& _seq, int item) {
21
+ seq.reserve(_seq.size());
22
+ for (int i = 0; i < _seq.size(); ++i)
23
+ seq.push_back(_seq[i]);
24
+ seq.push_back(item);
25
+ freq = 0;
26
+ }
27
+
28
+
29
+ Pattern(int item) {
30
+ seq.push_back(item);
31
+ freq = 0;
32
+ }
33
+
34
+ Pattern() {
35
+ freq = 0;
36
+ }
37
+
38
+ };
39
+
40
+ extern vector<Pattern> DFS; //DFS queue of potential patterns to extend
41
+
42
+ extern unsigned long long int num_patt;
43
+ }
@@ -0,0 +1,219 @@
1
+ #include <iostream>
2
+ #include <sstream>
3
+ #include <algorithm>
4
+ #include <cmath>
5
+ #include "load_inst.hpp"
6
+ #include "freq_miner.hpp"
7
+ #include "utility.hpp"
8
+
9
+ namespace largepp { // ─── BEGIN namespace ─────────────────────
10
+ using namespace std;
11
+
12
+ /* ------------------------------------------------------------------
13
+ * Global definitions (match the externs in load_inst.hpp)
14
+ * ---------------------------------------------------------------- */
15
+ unsigned int M = 0, L = 0;
16
+ unsigned long long N = 0, E = 0;
17
+ double theta = 0.01;
18
+ vector<vector<int>> items;
19
+ vector<Pattern> DFS;
20
+ vector<int> item_dic;
21
+
22
+ /* Forward decls for helper routines in this file */
23
+ static bool Load_items(string& inst);
24
+ static void Load_items_pre(string& inst);
25
+ static bool Preprocess(string& inst, double thresh);
26
+
27
+ /* ==================================================================
28
+ * MAIN ENTRY — load from disk
29
+ * ================================================================= */
30
+ bool Load_instance(string& items_file, double thresh)
31
+ {
32
+ clock_t kk = clock();
33
+
34
+ if (pre_pro) {
35
+ if (!Preprocess(items_file, thresh)) return false;
36
+
37
+ cout << "\nPreprocess done in " << give_time(clock() - kk) << " seconds\n\n";
38
+
39
+ DFS.reserve(L);
40
+ for (unsigned int i = 0; i < L; ++i)
41
+ DFS.emplace_back(-int(i) - 1);
42
+
43
+ kk = clock();
44
+ Load_items_pre(items_file);
45
+ N = items.size();
46
+ }
47
+ else if (!Load_items(items_file))
48
+ return false;
49
+ else
50
+ theta = (thresh < 1.0) ? ceil(thresh * N) : thresh;
51
+
52
+ cout << "\nMDD Database built in " << give_time(clock() - kk) << " seconds\n\n";
53
+ cout << "Found " << N << " sequence, with max line len " << M
54
+ << ", and " << L << " items, and " << E << " enteries\n";
55
+
56
+ return true;
57
+ }
58
+
59
+ /* ==================================================================
60
+ * ALT ENTRY — load directly from a Python list of lists
61
+ * ================================================================= */
62
+ void Load_py(const pybind11::object& data, double thresh)
63
+ {
64
+ items = data.cast<vector<vector<int>>>();
65
+ N = items.size();
66
+
67
+ int max_id = 0;
68
+ M = 0; E = 0;
69
+ for (auto& seq : items) {
70
+ M = max<unsigned int>(M, seq.size());
71
+ E += seq.size();
72
+ for (int x : seq)
73
+ max_id = max(max_id, abs(x));
74
+ }
75
+ L = max_id;
76
+ theta = (thresh < 1.0) ? ceil(thresh * N) : thresh;
77
+
78
+ DFS.clear();
79
+ DFS.reserve(L);
80
+ for (unsigned int i = 0; i < L; ++i)
81
+ DFS.emplace_back(-int(i) - 1);
82
+ }
83
+
84
+ /* =================================================================
85
+ * The professor’s original helpers — untouched
86
+ * ================================================================= */
87
+ static bool Preprocess(string& inst, double thresh)
88
+ {
89
+ ifstream file(inst);
90
+ vector<unsigned long long> freq(1000000), counted(1000000, 0);
91
+
92
+ if (file.good()) {
93
+ string line; int ditem;
94
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
95
+ ++N;
96
+ istringstream word(line);
97
+ string itm;
98
+ while (word >> itm) {
99
+ ditem = stoi(itm);
100
+ L = max<unsigned int>(L, abs(ditem));
101
+
102
+ if (freq.size() < L) {
103
+ freq.resize(L, 0);
104
+ counted.resize(L, 0);
105
+ }
106
+ if (counted[abs(ditem) - 1] != N) {
107
+ ++freq[abs(ditem) - 1];
108
+ counted[abs(ditem) - 1] = N;
109
+ }
110
+ }
111
+ }
112
+ } else {
113
+ cout << "!!!!!! No such file exists: " << inst << " !!!!!!\n";
114
+ return false;
115
+ }
116
+
117
+ theta = (thresh < 1.0) ? ceil(thresh * N) : thresh;
118
+
119
+ int real_L = 0;
120
+ item_dic.assign(L, -1);
121
+ for (unsigned int i = 0; i < L; ++i)
122
+ if (freq[i] >= theta) item_dic[i] = ++real_L;
123
+
124
+ cout << "Original number of items: " << L
125
+ << " Reduced to: " << real_L << '\n';
126
+
127
+ L = real_L;
128
+ N = 0;
129
+ return true;
130
+ }
131
+
132
+ static void Load_items_pre(string& inst)
133
+ {
134
+ ifstream file(inst);
135
+
136
+ if (!file.good()) return;
137
+ string line; int size_m, ditem; bool empty_seq = false;
138
+
139
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
140
+ vector<bool> counted(L, 0);
141
+ istringstream word(line);
142
+
143
+ if (!empty_seq) items.emplace_back();
144
+ string itm; size_m = 0; bool sgn = false; empty_seq = true;
145
+
146
+ while (word >> itm) {
147
+ ditem = stoi(itm);
148
+
149
+ if (item_dic[abs(ditem) - 1] == -1) {
150
+ if (!sgn) sgn = ditem < 0;
151
+ continue;
152
+ } else {
153
+ ditem = (ditem > 0)
154
+ ? item_dic[ditem - 1]
155
+ : -item_dic[-ditem - 1];
156
+ }
157
+ empty_seq = false;
158
+
159
+ if (sgn) { if (ditem > 0) ditem = -ditem; sgn = false; }
160
+
161
+ items.back().push_back(ditem);
162
+
163
+ if (!counted[abs(ditem) - 1] && !just_build) {
164
+ DFS[abs(ditem) - 1].seq_ID.push_back(items.size() - 1);
165
+ DFS[abs(ditem) - 1].str_pnt.push_back(items.back().size() - 1);
166
+ ++DFS[abs(ditem) - 1].freq;
167
+ counted[abs(ditem) - 1] = true;
168
+ }
169
+ ++size_m;
170
+ }
171
+ if (empty_seq) continue;
172
+
173
+ ++N; E += size_m; M = max<unsigned int>(M, size_m);
174
+ }
175
+ }
176
+
177
+ static bool Load_items(string& inst)
178
+ {
179
+ ifstream file(inst);
180
+ if (!file.good()) {
181
+ cout << "!!!!!! No such file exists: " << inst << " !!!!!!\n";
182
+ return false;
183
+ }
184
+
185
+ string line; int size_m, ditem;
186
+ while (getline(file, line) && give_time(clock() - start_time) < time_limit) {
187
+ ++N;
188
+ vector<bool> counted(L, 0);
189
+ istringstream word(line);
190
+
191
+ items.emplace_back();
192
+ string itm; size_m = 0;
193
+
194
+ while (word >> itm) {
195
+ ditem = stoi(itm);
196
+ if (L < abs(ditem)) {
197
+ L = abs(ditem);
198
+ while (DFS.size() < L) {
199
+ DFS.emplace_back(-int(DFS.size()) - 1);
200
+ counted.push_back(0);
201
+ }
202
+ }
203
+ items.back().push_back(ditem);
204
+
205
+ if (!counted[abs(ditem) - 1] && !just_build) {
206
+ DFS[abs(ditem) - 1].seq_ID.push_back(items.size() - 1);
207
+ DFS[abs(ditem) - 1].str_pnt.push_back(items.back().size() - 1);
208
+ ++DFS[abs(ditem) - 1].freq;
209
+ counted[abs(ditem) - 1] = true;
210
+ }
211
+ ++size_m;
212
+ }
213
+ E += size_m;
214
+ M = max<unsigned int>(M, size_m);
215
+ }
216
+ return true;
217
+ }
218
+
219
+ } // namespace largepp // ─── END namespace ──────────────────────
@@ -0,0 +1,28 @@
1
+ #pragma once
2
+
3
+ #include <vector>
4
+ #include <string>
5
+ #include <fstream>
6
+ #include <map>
7
+ #include <pybind11/pybind11.h>
8
+
9
+ namespace largepp {
10
+ using namespace std;
11
+
12
+ // ───── public entry points ───────────────────────────────────────
13
+ bool Load_instance(string& items_file, double thresh);
14
+ void Load_py(const pybind11::object& py_data, double thresh);
15
+
16
+ // ───── shared state (defined once in load_inst.cpp) ──────────────
17
+ extern vector<vector<int>> items; // encoded database
18
+ extern string out_file;
19
+
20
+ extern bool b_disp, b_write, use_dic, just_build, ovr_count, pre_pro;
21
+
22
+ extern unsigned int M, L, time_limit;
23
+ extern unsigned long long N; // # sequences
24
+ extern double theta; // support threshold
25
+ extern unsigned long long E; // total entries
26
+ extern clock_t start_time;
27
+
28
+ } // namespace largepp
@@ -0,0 +1,108 @@
1
+ #include <iostream>
2
+ #include <time.h>
3
+ #include <string.h>
4
+ #include <string>
5
+ #include "load_inst.hpp"
6
+ #include "freq_miner.hpp"
7
+ #include "utility.hpp"
8
+
9
+ namespace largepp // ← BEGIN namespacing
10
+ {
11
+ using namespace std;
12
+
13
+ string out_file;
14
+
15
+ bool b_disp = 0, b_write = 0, use_dic = 0, just_build = 0, ovr_count = 0, pre_pro = 0;
16
+
17
+ unsigned int time_limit = 10 * 3600;
18
+
19
+ clock_t start_time;
20
+
21
+ int main(int argc, char* argv[]) {
22
+
23
+ double thresh = 0;
24
+ string VV, folder;
25
+ for (int i = 1; i < argc; ++i){
26
+ if (argv[i][0] !='-')
27
+ continue;
28
+ else if (strcmp(argv[i], "-thr") == 0)
29
+ thresh = stof(argv[i + 1]);
30
+ else if (strcmp(argv[i], "-file") == 0)
31
+ VV = argv[i + 1];
32
+ else if (strcmp(argv[i], "-folder") == 0)
33
+ folder = argv[i + 1];
34
+ else if (strcmp(argv[i], "-time") == 0)
35
+ time_limit = stoi(argv[i + 1]);
36
+ else if (strcmp(argv[i], "-jbuild") == 0)
37
+ just_build = 1;
38
+ else if (strcmp(argv[i], "-npre") == 0)
39
+ pre_pro = 0;
40
+ else if (strcmp(argv[i], "-ovrc") == 0)
41
+ ovr_count = 1;
42
+ else if (strcmp(argv[i], "-dic") == 0)
43
+ use_dic = 1;
44
+ else if (strcmp(argv[i], "-out") == 0){
45
+ if (i + 1 == argc || argv[i + 1][0] == '-')
46
+ b_disp = 1;
47
+ else if (argv[i + 1][0] == '+') {
48
+ b_disp = 1;
49
+ b_write = 1;
50
+ out_file = argv[i + 1];
51
+ out_file = out_file.substr(1,out_file.size()-1);
52
+ }
53
+ else {
54
+ b_write = 1;
55
+ out_file = argv[i + 1];
56
+ }
57
+ }
58
+ else
59
+ cout << "Command " << argv[i] << " not recognized and skipped.\n";
60
+ }
61
+
62
+ if (thresh == 0){
63
+ cout << "No Threshold given, using threshold deafult of 1%\n";
64
+ thresh = 0.01;
65
+ }
66
+ if (folder.back() != '/'){
67
+ folder += '/';
68
+ }
69
+
70
+
71
+ cout << "\n********************** " << VV << "**********************\n";
72
+
73
+ string item_file = folder + VV + ".txt";
74
+ //out_file = folder + VV + "_result.txt";
75
+ cout << "loading instances...\n";
76
+
77
+ start_time = clock();
78
+
79
+ if(!Load_instance(item_file, thresh)){
80
+ cout << "Files invalid, exiting.\n";
81
+ return 0;
82
+ }
83
+
84
+ cout << "Instances loaded\n";
85
+
86
+ if (!just_build && give_time(clock() - start_time) < time_limit) {
87
+ cout << "\nRunning mining algorithm...\n";
88
+ Freq_miner();
89
+ if (give_time(clock() - start_time) >= time_limit)
90
+ cout << "TIME LIMIT REACHED\n";
91
+ cout << "Mining Complete\n\nFound a total of " << num_patt << " patterns\n";
92
+ }
93
+
94
+ cout << "Total CPU time is: ";
95
+ cout << give_time(clock() - start_time) << "\n";
96
+
97
+ if (b_write){
98
+ ofstream file;
99
+ file.open(out_file, std::ios::app);
100
+ file << "\nMining completed in " << give_time(clock() - start_time) << " seconds\n";
101
+ //file << "Found a total of " << num_max_patt << " maximal patterns\n";
102
+ file.close();
103
+ }
104
+
105
+
106
+ return 0;
107
+ }
108
+ }
@@ -0,0 +1,33 @@
1
+ #include "utility.hpp"
2
+
3
+ namespace largepp {
4
+
5
+ // ─── instantiate the globals declared in the header ─────────────
6
+ bool b_disp = false;
7
+ bool b_write = false;
8
+ bool use_dic = false;
9
+ bool just_build = false;
10
+ bool ovr_count = false;
11
+ bool pre_pro = false;
12
+ bool use_list = true; // large-prefix flag the binder toggles
13
+ unsigned int time_limit = 36000;
14
+ std::string out_file;
15
+ std::vector<std::vector<int>> collected; // mined pattern output
16
+
17
+
18
+ std::clock_t start_time = 0;
19
+
20
+ // ─── helper implementations ─────────────────────────────────────
21
+ void ClearCollected() { collected.clear(); }
22
+
23
+ const std::vector<std::vector<int>>& GetCollected()
24
+ {
25
+ return collected;
26
+ }
27
+
28
+ double give_time(std::clock_t ticks)
29
+ {
30
+ return static_cast<double>(ticks) / CLOCKS_PER_SEC;
31
+ }
32
+
33
+ } // namespace largepp
@@ -0,0 +1,20 @@
1
+ #pragma once
2
+ #include <vector>
3
+ #include <ctime>
4
+
5
+ namespace largepp {
6
+
7
+ // Flag & option globals (only declare here – actual values in utility.cpp)
8
+ extern bool b_disp, b_write, use_dic, just_build, ovr_count, pre_pro;
9
+ extern bool use_list; // ← NEW (large-prefix needs this)
10
+ extern unsigned int time_limit;
11
+
12
+ // Pattern buffer that _effspm.cpp_ returns to Python
13
+ extern std::vector<std::vector<int>> collected;
14
+
15
+ // Helper functions every source file uses
16
+ void ClearCollected(); // wipe buffer
17
+ const std::vector<std::vector<int>>& GetCollected(); // read buffer
18
+ double give_time(std::clock_t ticks); // secs from clocks
19
+
20
+ } // namespace largepp
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: effspm
3
- Version: 0.1.12
3
+ Version: 0.2.2
4
4
  Summary: Prefix‑Projection and other sequential pattern mining algorithms
5
5
  Author: Yeswanth Vootla
6
6
  Author-email: yeshu999 <vootlayeswanth20@gmail.com>
@@ -0,0 +1,59 @@
1
+ effspm/__init__.py,sha256=lFt6ng5CigUoRWeT8crTZ0PMEaR1ejOIOJuyhNs-gtI,233
2
+ effspm/_core.cpp,sha256=S6UsUcl0HQLMQUTy2tMJxcrbLGJo8tjkLskyHqESYyI,3675
3
+ effspm/_effspm.cpp,sha256=9imtXWbdeHkfWMwTZaE6Dcs1nD_b2BaAwXSbIuuKd8o,22196
4
+ effspm/_effspm.cpython-313-darwin.so,sha256=9X6s30nTGWOE2hJ7XtXm8H9XBp6OujqbWlvOXJKjd_Q,1067872
5
+ effspm/freq_miner.cpp,sha256=9K-nO_c-vVzbFlmh511vmvypA2fu1TXpiJhyx03owDU,4642
6
+ effspm/freq_miner.hpp,sha256=jA-ZCT12Z0YNjLoAiY9sniFTP6g-ITTDuWtlOdHXkMQ,744
7
+ effspm/load_inst.cpp,sha256=804fvkfdtYqFMP9Jla6dM2romWWPJmSeCwLm0wEZE5M,4517
8
+ effspm/load_inst.hpp,sha256=cR-iZG95mUN62ZLCnPNQsKUINtkwhUzMTLlH81wmyt0,906
9
+ effspm/main.cpp,sha256=aMyPwuTn5dPIlLAZ_XfWL8Z6cXfQS7EaJ0tEQPqpA8I,2558
10
+ effspm/utility.cpp,sha256=luWwBNy7OVWRmam9gz2RjhtrRmx6c37oOobFJaDWqcA,1403
11
+ effspm/utility.hpp,sha256=Y_MQVk9AmJWjguKyuyk0LraTi_6VzZFg0StsmVOCkNc,744
12
+ effspm/btminer/src/build_mdd.cpp,sha256=LWfH_23cTExfOeK3evO46C8Di2_hmu7uCbmutOxj4Fw,1727
13
+ effspm/btminer/src/build_mdd.hpp,sha256=CvowY9TxxnMh3_bIy0HZ9eZmnCm45z5A6Xz5hxHcwfg,567
14
+ effspm/btminer/src/freq_miner.cpp,sha256=PN8Ksetb5S_akEVjY71mwBP9YEVxlnphTz0zYCDAlaU,6557
15
+ effspm/btminer/src/freq_miner.hpp,sha256=x-c7BpMdNqYiDFM49I7VDJXeb1tIruTOeD-3MXJ2g0A,626
16
+ effspm/btminer/src/load_inst.cpp,sha256=FudIgA4N7GNlEm34jHMDoQLfyY5NLZENC2CI-cVJoV4,5359
17
+ effspm/btminer/src/load_inst.hpp,sha256=pojP8ClGglVhx6GuwEqCvwURPMtBpnHBeCVTGSsCiyA,462
18
+ effspm/btminer/src/main.cpp,sha256=h1_BcTVDWBCjlGkkb_K2v8IKVkxJacVErV7yhWNMR94,3010
19
+ effspm/btminer/src/utility.cpp,sha256=P-CwwWx5QG7U3DsqzZrFNbYxKqaoapR37P_J69qYVz8,2112
20
+ effspm/btminer/src/utility.hpp,sha256=ew4pclVwtKZp4bn7HrnaaWHSPZ-yMcsXYDiTmSs_MYM,937
21
+ effspm/htminer/src/build_mdd.cpp,sha256=3uh8NQyDgEI6UkDQ4pW7XDVdAHD_nS6Wc2mMExdI2wg,8871
22
+ effspm/htminer/src/build_mdd.hpp,sha256=GDFkmrjPyOfgkHOTwIjVH_dWrSXWB7OA_GAZ2GXzMpo,1328
23
+ effspm/htminer/src/freq_miner.cpp,sha256=5WbdTmQ4O-_U8UR-cbx1iqqEYDEXoBIi8lC2LHeoVIQ,10590
24
+ effspm/htminer/src/freq_miner.hpp,sha256=8cVfeJknsgZo63Fp2iG7ndOop3BA-74y_vsjNQnJ9dY,765
25
+ effspm/htminer/src/load_inst.cpp,sha256=Qcmd3LygQ6DDdCjiDzMRE-aeRdyPL2bynp6G_2P68As,10922
26
+ effspm/htminer/src/load_inst.hpp,sha256=Cs_zpT4lM5j4sqoY1f6R0LKjkrTFMg9myGPYcDat0bE,455
27
+ effspm/htminer/src/main.cpp,sha256=_kKdO9UuS8Hvs4gUD66vZ_ehjz1_VC7FI25LfyKBku4,2187
28
+ effspm/htminer/src/utility.cpp,sha256=WZU9XAmZX86ihWuU6F_SSMSmCwl8h0t9SswAfi5ndcc,2375
29
+ effspm/htminer/src/utility.hpp,sha256=737-iMuDE5Sm5GGSYnAtgO6cC5O6bFvqHEftV5dGrKM,3573
30
+ effspm/largebm/src/build_mdd.cpp,sha256=QAPj_cjGCo-u3wk5Pch1zmWlJmw772O5bqYEvWSn2TQ,4948
31
+ effspm/largebm/src/build_mdd.hpp,sha256=R0M0p1gJqA1LdjPzlgpn410cX5-Ak8ebuvgL5kTZS2E,636
32
+ effspm/largebm/src/freq_miner.cpp,sha256=cGZvM6mqfskTR7QkHKqOoi8nmghy4o0qotY0ZExpmS4,13048
33
+ effspm/largebm/src/freq_miner.hpp,sha256=Rjuhzbr7W9raV_5jPxtQl4lbCPDxvNO6fldBBoQeKQU,892
34
+ effspm/largebm/src/load_inst.cpp,sha256=XpewU8CIqIN2kh4XScriVs5ok1Jh0Sn-t-A5OIKYRf0,6929
35
+ effspm/largebm/src/load_inst.hpp,sha256=inptC_vdkRPUnGHh4LcDPyGlD9Px2PSU64Xe26BWts8,1880
36
+ effspm/largebm/src/main.cpp,sha256=fcGqsLCmnCPOyrMglSMjG8yC0QoGXdmfH6G2Jm5jycU,2083
37
+ effspm/largebm/src/utility.cpp,sha256=5yIPUtgMXVqZwPnwKyTJMMdDRvZe3sBDmZpeXAoLWO4,1167
38
+ effspm/largebm/src/utility.hpp,sha256=S18kyrS5ulJj4to8RndypR35ImPQuGoAVMh6_KnMhaA,350
39
+ effspm/largehm/src/build_mdd.cpp,sha256=JMA4Z_mUUAJS4DwLKybRafcl31eIFLWPLL85u5TLaMU,5922
40
+ effspm/largehm/src/build_mdd.hpp,sha256=zV0hhPq9HYFLsOJaaRAnrX4vbN49YsStwIca9kxpvLU,2787
41
+ effspm/largehm/src/freq_miner.cpp,sha256=aqYyAClNNLlBPXZSH4dRC6iWgs-aRG-Q2gQmNRdUnA8,16356
42
+ effspm/largehm/src/freq_miner.hpp,sha256=B9LXKxRQbrSDsd9LbyUM9kR1WUxbBIp4-u388P5FIvY,2371
43
+ effspm/largehm/src/load_inst.cpp,sha256=vPCz5SqxgSzye54Pt6wqpwNu0-EOdOWap8XbU7edxAI,10263
44
+ effspm/largehm/src/load_inst.hpp,sha256=sBvJhT6ibvR1R09YGiSgQYxNRc4jE89tcXvcVVR4-_4,1628
45
+ effspm/largehm/src/main.cpp,sha256=mPBKhs_cYCxzSJ6CxSVipZbsOtoqosVLkRquHR8Pl7k,2236
46
+ effspm/largehm/src/utility.cpp,sha256=K0THrMKa_7cwAEJXbPXOdOwKBrC0gNt8oj1KOHECdJA,960
47
+ effspm/largehm/src/utility.hpp,sha256=cjPJ6KYC37CFAMVNNygNMH1HiLTUHjMukImSIuY-S60,692
48
+ effspm/largepp/src/freq_miner.cpp,sha256=yC55sBfuMOagmDwHkaJpEkOvSkoEMQXP96Xux8TDGCQ,3960
49
+ effspm/largepp/src/freq_miner.hpp,sha256=GmKUub-pED6kM39wxO0hssWkXDzaSNl2vLO4oGYDbzo,678
50
+ effspm/largepp/src/load_inst.cpp,sha256=910i6wUOPxZtAj_BOy9ieUffxUv6TNLTYFALeJZBWUM,6799
51
+ effspm/largepp/src/load_inst.hpp,sha256=PT6vX8ty29WCHNizwIhVcpB1CSc93pzh5qLmX4acBrY,986
52
+ effspm/largepp/src/main.cpp,sha256=2y_xGXSHo2wyrHJh86VrD1GMDHaEDMBqvUmt5Rb03oI,2696
53
+ effspm/largepp/src/utility.cpp,sha256=cUYchvpCpZ9vdsT9p-Z5if6hsrZzbspDJOxOHspx8to,936
54
+ effspm/largepp/src/utility.hpp,sha256=aRoFRvhTzx4O4l7Yw5hXqksr4MXjr-8Bq-UqkIceeVw,718
55
+ effspm-0.2.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
56
+ effspm-0.2.2.dist-info/METADATA,sha256=ljAl44RrX2_Hbg4HGGkPF7A_D6rZNDjKeMT-x3xrQ1k,14227
57
+ effspm-0.2.2.dist-info/WHEEL,sha256=memlX0NSEQnmSMa3rcNWPnk4cttudwgAZx3qq8qO4ME,115
58
+ effspm-0.2.2.dist-info/top_level.txt,sha256=2O-AuI0nw0pDmJMo2jzM1wvV2rj48AmkjskkAnsuuQk,7
59
+ effspm-0.2.2.dist-info/RECORD,,