-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
159 lines (123 loc) · 3.1 KB
/
main.cpp
File metadata and controls
159 lines (123 loc) · 3.1 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#define DEBUG printf
#include <sys/sysinfo.h>
#include <stdio.h>
#include <string.h>
#include "gh_core.h"
int main(int argc, char ** argv)
{
gh_core * core;
core = new gh_core((const char *) "/home/ilya/infact/RSTEARI.hed", false, true);
delete core;
return 0;
}
//gh_core * core = new gh_core((const char *) "/mnt/cip/RSMAYRI.hed", false, true);
//core->get(1, 1, 1, 1);
// unsigned int dim_num = 1;
// unsigned int hie_num = 2;
//
// unsigned int hie_size = core->get_off_qua(dim_num, hie_num);
//
// unsigned int * a = core->get_hie_segs(dim_num, hie_num);
// for(unsigned i = 0; i < hie_size; i++)
// {
// printf("%d\n", a[i]);
// }
// unsigned int dim_num = 1;
// unsigned int size;
// unsigned int coo = 22;
// //unsigned int coo = 9;
//
// char ** parents = core->get_info(dim_num, coo, size);
//
// for(unsigned int i = 0; i < size; i++)
// {
// printf("%s\n", parents[i]);
// }
//
// for(unsigned int j = 0; j < size; j++) delete [] parents[j];
// delete [] parents;
//FILE * fp_rep = fopen("./rep", "w");
//gh_core * core = new gh_core((const char *) "/mnt/wss/RSOLVRI.hed", false, true);
// fclose(fp_rep);
// int main(int argc, char ** argv)
// {
// FILE * fp_rep = fopen("./rep", "w");
// gh_core * core = new gh_core((const char *) "/mnt/wss/NSDTRNT.hed", true, true);
//
// unsigned int size;
// unsigned int coo = 0;
// char ** parents = core->get_info(1, coo, size);
// if(parents)
// {
// for(unsigned int j = 0; j < size; j++)
// {
// printf("%s\t", parents[j]);
// }
// printf("\n");
//
// for(unsigned int j = 0; j < size; j++) delete [] parents[j];
// delete [] parents;
// }
//
// parents = core->get_info(1, coo, size);
// if(parents)
// {
// for(unsigned int j = 0; j < size; j++)
// {
// printf("%s\t", parents[j]);
// }
// printf("\n");
//
// for(unsigned int j = 0; j < size; j++) delete [] parents[j];
// delete [] parents;
// }
//
// parents = core->get_info(1, coo, size);
// if(parents)
// {
// for(unsigned int j = 0; j < size; j++)
// {
// printf("%s\t", parents[j]);
// }
// printf("\n");
//
// for(unsigned int j = 0; j < size; j++) delete [] parents[j];
// delete [] parents;
// }
//
//
//
//
//
// delete core;
// fclose(fp_rep);
//
// return 0;
// }
// //double * figs = core->get(405, 0, 0);
// //double * figs = core->get("M000000000000106327900000000000001113024", "P000000000000612698100000000009622273921", "F000000000000000000100000000000000000000");
//
// unsigned int target_level = 1;
// unsigned int dim_num = 1;
//
//
// unsigned int coo = 372;
//
// unsigned int * ch = core->get_children_from_level_3(dim_num, coo, target_level);
//
// //DEBUG
// //(
// // "hie: %d, seg: %d, hie_seg: %d, off: %d, segs_hie: %d\n",
// // coo_bind::hie, coo_bind::seg, coo_bind::hie_seg, coo_bind::off, coo_bind::segs_hie
// //);
//
//
// if(ch)
// {
// //DEBUG("\nThe number of ch is = %d\n\n", ch[0]);
//
// for(unsigned int i = 1; i <= ch[0]; i++)
// {
// fprintf(fp_rep, "%6d\t%s\n", ch[i], core->get_attr_by_num(dim_num, 1, ch[i]));
// }
// }