-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
112 lines (71 loc) · 2.82 KB
/
main.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#include "fraglets.h"
// std::string alphabet = {"abcdefghijklmnopqrstuvwxyz"};
std::string alphabet = {"abcdtuvxz"};
int main(int argc, char *argv[]) {
// QApplication a(argc, argv);
fraglets frag;
symbol mol = "fork nop z match z split match z fork fork fork nop z * split match z fork fork fork nop z * copy z";
frag.parse(mol);
for (int i = 0; i< 50; i++){
frag.parse(mol);
frag.parse("z");
}
symbol mol2 = "perm z ";
std::string::iterator alphaIt2;
std::unordered_set<std::string>::iterator uIt;
for (alphaIt2 = alphabet.begin();alphaIt2!=alphabet.end();alphaIt2++){
symbol newMol = mol2 + *alphaIt2;
frag.parse(newMol);
newMol = mol2 + " z " + *alphaIt2;
frag.parse(newMol);
}
for (uIt = unimolTags.begin();uIt!=unimolTags.end();uIt++){
symbol newMolTag = mol2 + *uIt;
frag.parse(newMolTag);
newMolTag = mol2 + " z " +*uIt;
frag.parse(newMolTag);
}
for (alphaIt2 = alphabet.begin();alphaIt2!=alphabet.end();alphaIt2++){
symbol newMol2 = mol2 + " match " + *alphaIt2;
frag.parse(newMol2);
newMol2 = mol2 + " z " + "match " + *alphaIt2;
frag.parse(newMol2);
symbol newMol3 = mol2 + " matchp " + *alphaIt2;
frag.parse(newMol3);
newMol3 = mol2 + " z " + "matchp " + *alphaIt2;
frag.parse(newMol3);
}
// frag.interpret("sort.fra");
frag.run(100000,200);
// QtCharts::QLineSeries *series = new QtCharts::QLineSeries();
// QtCharts::QLineSeries *series2 = new QtCharts::QLineSeries();
// for (int j = 0;j< frag.activeMultisetSize.size();j++){
// // std::cout <<j << " " << frag.activeMultisetSize[j]<<'\n';
// series->append(j,frag.activeMultisetSize[j]);
// }
// for (int j = 0;j< frag.passiveMultisetSize.size();j++){
// // std::cout <<j << " " << frag.passiveMultisetSize[j]<<'\n';
// series2->append(j,frag.passiveMultisetSize[j]);
// }
// QtCharts::QChart *chart = new QtCharts::QChart();
// chart->legend()->hide();
// for (std::vector<int> vec : frag.StackplotVector){
// QtCharts::QLineSeries *series3 = new QtCharts::QLineSeries();
// for (int r = 0;r< vec.size();r++){
// series3->append(r,vec[r]);
// }
// chart->addSeries(series3);
// }
// // chart->addSeries(series);
// // chart->addSeries(series2);
// chart->createDefaultAxes();
// chart->setTitle("Simple line chart example");
// QtCharts::QChartView *chartView = new QtCharts::QChartView(chart);
// chartView->setRenderHint(QPainter::Antialiasing);
// QMainWindow window;
// window.setCentralWidget(chartView);
// window.resize(400, 300);
// window.show();
return 0;
// return a.exec();
}