Debian Codegraph @

src/gen/lib/ortho/rawgraph__c.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program:
18 *
19 *************************************************************************
20 * Copyright (c) 2011 AT&T Intellectual Property
21 * All rights reserved. This program and the accompanying materials
22 * are made available under the terms of the Eclipse Public License v1.0
23 * which accompanies this distribution, and is available at
24 * http://www.eclipse.org/legal/epl-v10.html
25 *
26 * Contributors: See CVS logs. Details at http://www.graphviz.org/
27 *************************************************************************
28 *
29 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
30 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
31 *
32 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
33 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
34 *
35 * You may obtain a copy of the License at
36 *
37 * http://www.eclipse.org/legal/epl-v10.html
38 *
39 * Unless required by applicable law or agreed to in writing, software
40 * distributed under the License is distributed on an "AS IS" BASIS,
41 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 * See the License for the specific language governing permissions and
43 * limitations under the License.
44 *
45 */
46 package gen.lib.ortho;
47 import static smetana.core.Macro.UNSUPPORTED;
48
49 public class rawgraph__c {
50 //1 9k44uhd5foylaeoekf3llonjq
51 // extern Dtmethod_t* Dtset
52
53
54 //1 1ahfywsmzcpcig2oxm7pt9ihj
55 // extern Dtmethod_t* Dtbag
56
57
58 //1 anhghfj3k7dmkudy2n7rvt31v
59 // extern Dtmethod_t* Dtoset
60
61
62 //1 5l6oj1ux946zjwvir94ykejbc
63 // extern Dtmethod_t* Dtobag
64
65
66 //1 2wtf222ak6cui8cfjnw6w377z
67 // extern Dtmethod_t* Dtlist
68
69
70 //1 d1s1s6ibtcsmst88e3057u9r7
71 // extern Dtmethod_t* Dtstack
72
73
74 //1 axa7mflo824p6fspjn1rdk0mt
75 // extern Dtmethod_t* Dtqueue
76
77
78 //1 ega812utobm4xx9oa9w9ayij6
79 // extern Dtmethod_t* Dtdeque
80
81
82 //1 cyfr996ur43045jv1tjbelzmj
83 // extern Dtmethod_t* Dtorder
84
85
86 //1 wlofoiftbjgrrabzb2brkycg
87 // extern Dtmethod_t* Dttree
88
89
90 //1 12bds94t7voj7ulwpcvgf6agr
91 // extern Dtmethod_t* Dthash
92
93
94 //1 9lqknzty480cy7zsubmabkk8h
95 // extern Dtmethod_t _Dttree
96
97
98 //1 bvn6zkbcp8vjdhkccqo1xrkrb
99 // extern Dtmethod_t _Dthash
100
101
102 //1 9lidhtd6nsmmv3e7vjv9e10gw
103 // extern Dtmethod_t _Dtlist
104
105
106 //1 34ujfamjxo7xn89u90oh2k6f8
107 // extern Dtmethod_t _Dtqueue
108
109
110 //1 3jy4aceckzkdv950h89p4wjc8
111 // extern Dtmethod_t _Dtstack
112
113
114
115
116 //3 b9uhij2qxmaueiwxbfjbx7j7c
117 // rawgraph* make_graph(int n)
118 public static Object make_graph(Object... arg) {
119 UNSUPPORTED("dcc13k9x44a7gckftbejv58dc"); // rawgraph*
120 UNSUPPORTED("2zmrv5ohq7e29e3qiy4b3r2kf"); // make_graph(int n)
121 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
122 UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
123 UNSUPPORTED("7z0gl9a9knlb9h763yg0hs2bz"); // rawgraph* g = (rawgraph*)zmalloc(sizeof(rawgraph));
124 UNSUPPORTED("7hsfp0cjk2t70uwawb8cklsz8"); // g->nvs = n;
125 UNSUPPORTED("8o0aimsmyrmbv62ryv7vejhv1"); // g->vertices = (vertex*)zmalloc((n)*sizeof(vertex));
126 UNSUPPORTED("dudyytiqbhk3xyognwkwx5tt1"); // for(i=0;i<n;i++) {
127 UNSUPPORTED("bn57eyqn4zijfxzh8e6ywudec"); // g->vertices[i].adj_list = openIntSet ();
128 UNSUPPORTED("1anncbcbrd6gx9hlo6mg1ha7d"); // g->vertices[i].color = 0;
129 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
130 UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g;
131 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
132
133 throw new UnsupportedOperationException();
134 }
135
136
137
138
139 //3 5qv1mxxuhkzua2w2dqem19lny
140 // void free_graph(rawgraph* g)
141 public static Object free_graph(Object... arg) {
142 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
143 UNSUPPORTED("6cqftcuhpqak3hl5c518hyr4e"); // free_graph(rawgraph* g)
144 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
145 UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
146 UNSUPPORTED("31v9apskm8ur1w7f890v55btk"); // for(i=0;i<g->nvs;i++)
147 UNSUPPORTED("mfqz9m45ul5js6fnn03ol8j5"); // dtclose(g->vertices[i].adj_list);
148 UNSUPPORTED("4836xd1juguptr6qebt07jlrh"); // free (g->vertices);
149 UNSUPPORTED("dwuc0y4whcauryjdz2g3rdyey"); // free (g);
150 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
151
152 throw new UnsupportedOperationException();
153 }
154
155
156
157
158 //3 186nbf92ja5ttnrgvj422eqf5
159 // void insert_edge(rawgraph* g, int v1, int v2)
160 public static Object insert_edge(Object... arg) {
161 UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void
162 UNSUPPORTED("jldraubzdwc00et6agtk6726"); // insert_edge(rawgraph* g, int v1, int v2)
163 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
164 UNSUPPORTED("2rjvy9cij6zo2nowb4w37hnjt"); // intitem obj;
165 UNSUPPORTED("bmm6cyaytc4kc2ri4gey846yp"); // obj.id = v2;
166 UNSUPPORTED("a1hlf5bwzya3m4ujh9zokvj3a"); // (*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&obj),0000001);
167 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
168
169 throw new UnsupportedOperationException();
170 }
171
172
173
174
175 //3 1r1ufpzdilo5438zjdky0uy2w
176 // void remove_redge(rawgraph* g, int v1, int v2)
177 public static Object remove_redge(Object... arg) {
178 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
179 UNSUPPORTED("a9gk586ljggidricdp6evpxau"); // remove_redge(rawgraph* g, int v1, int v2)
180 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
181 UNSUPPORTED("2rjvy9cij6zo2nowb4w37hnjt"); // intitem obj;
182 UNSUPPORTED("bmm6cyaytc4kc2ri4gey846yp"); // obj.id = v2;
183 UNSUPPORTED("14tyn9y8xz91kr6dfeier49r"); // (*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&obj),0000002);
184 UNSUPPORTED("c4j1680th3r5qcpns3u4zjale"); // obj.id = v1;
185 UNSUPPORTED("9oqxwhwpfvzwxbnltjdoq1oga"); // (*(((Dt_t*)(g->vertices[v2].adj_list))->searchf))((g->vertices[v2].adj_list),(void*)(&obj),0000002);
186 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
187
188 throw new UnsupportedOperationException();
189 }
190
191
192
193
194 //3 3ff6zoop8jhts0qsvj91k9dfk
195 // int edge_exists(rawgraph* g, int v1, int v2)
196 public static Object edge_exists(Object... arg) {
197 UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int
198 UNSUPPORTED("4urd9z39jr49sen0w7s573505"); // edge_exists(rawgraph* g, int v1, int v2)
199 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
200 UNSUPPORTED("e2phkxwl9hjxom6accmixx6p2"); // return ((*(((Dt_t*)(g->vertices[v1].adj_list))->searchf))((g->vertices[v1].adj_list),(void*)(&v2),0001000) != 0);
201 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
202
203 throw new UnsupportedOperationException();
204 }
205
206
207
208
209 //3 1zivcgw1xwk6pq169yqc75oh1
210 // static stack* mkStack (int i)
211 public static Object mkStack(Object... arg) {
212 UNSUPPORTED("9cla0obmp67i5rjsjxiqdeimj"); // static stack*
213 UNSUPPORTED("ci2xjox5enk1600klp4wnc4d0"); // mkStack (int i)
214 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
215 UNSUPPORTED("8bsg9hgmxo09dmbp0rqikzip9"); // stack* sp = (stack*)zmalloc(sizeof(stack));
216 UNSUPPORTED("dgvcpjjkop19ctj9c6as7irgh"); // sp->vals = (int*)zmalloc((i)*sizeof(int));
217 UNSUPPORTED("6ak6snmn7x9mv08cxv1uhqto0"); // sp->top = -1;
218 UNSUPPORTED("c31qqlge2adqev6kmlr0iuaea"); // return sp;
219 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
220
221 throw new UnsupportedOperationException();
222 }
223
224
225
226
227 //3 56jaryc2ndgkphreacgutgkko
228 // static void freeStack (stack* s)
229 public static Object freeStack(Object... arg) {
230 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
231 UNSUPPORTED("1tmwfqmwfffw7layx1b9l774l"); // freeStack (stack* s)
232 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
233 UNSUPPORTED("4ivw0yolzv64dlaqawvv30x5v"); // free (s->vals);
234 UNSUPPORTED("f1430a029xzg8cabffg2k9l6j"); // free (s);
235 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
236
237 throw new UnsupportedOperationException();
238 }
239
240
241
242
243 //3 40jmhsu64yd114q5sxnbwirxh
244 // static void pushStack (stack* s, int i)
245 public static Object pushStack(Object... arg) {
246 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
247 UNSUPPORTED("efz1du2gap9f44f5qfs4oa0ga"); // pushStack (stack* s, int i)
248 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
249 UNSUPPORTED("1a9i725yadesextx7inlkz10x"); // s->top++;
250 UNSUPPORTED("5pdmgjwfiz1iusmq5fydnblap"); // s->vals[s->top] = i;
251 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
252
253 throw new UnsupportedOperationException();
254 }
255
256
257
258
259 //3 4oxcr6qfkyvzxsr9y5oo4ok34
260 // static int popStack (stack* s)
261 public static Object popStack(Object... arg) {
262 UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
263 UNSUPPORTED("9blpzh0xe07qxynad8t5mqz8x"); // popStack (stack* s)
264 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
265 UNSUPPORTED("6m5stt3wg7jgpdcvvk37onm1s"); // int v;
266 UNSUPPORTED("ceenb9p2929863jeh6inli97k"); // if (s->top == -1) return -1;
267 UNSUPPORTED("efrvy47jf2m4lt70c0u4yxt67"); // v = s->vals[s->top];
268 UNSUPPORTED("owa601uw5gl8igjnyr2lfsq7"); // s->top--;
269 UNSUPPORTED("dpci52ct1zm8k1aasm170ru2j"); // return v;
270 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
271
272 throw new UnsupportedOperationException();
273 }
274
275
276
277
278 //3 2jkcimgyhf4lzdolm41833uv1
279 // static int DFS_visit(rawgraph* g, int v, int time, stack* sp)
280 public static Object DFS_visit(Object... arg) {
281 UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
282 UNSUPPORTED("9tjvxtubftvfbyn9yg9s2ukk5"); // DFS_visit(rawgraph* g, int v, int time, stack* sp)
283 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
284 UNSUPPORTED("efg3j1wpsky3c1yns7rcddd1g"); // Dt_t* adj;
285 UNSUPPORTED("6i10bzt8ybhoodrtwofkpcavu"); // Dtlink_t* link;
286 UNSUPPORTED("9uf2icnp9lntl8gmbrqtn59cu"); // int id;
287 UNSUPPORTED("b69yoemu1fzv6up7qzrryu9z1"); // vertex* vp;
288 UNSUPPORTED("eoyjtfht0qiqsx0g6j3shub2r"); // vp = g->vertices + v;
289 UNSUPPORTED("1bpaugmlepecgk8uiqqd6lhih"); // vp->color = 1;
290 UNSUPPORTED("17rwtc50qcliu6s4uujnjxlfn"); // /* g->vertices[v].d = time; */
291 UNSUPPORTED("c8ss949bn9k3dw76vpp186lei"); // adj = vp->adj_list;
292 UNSUPPORTED("5mtxa718isij6bd88jbwav09r"); // time = time + 1;
293 UNSUPPORTED("683z4jufz8k2kssqjqpceyjzm"); // for(link = dtflatten (adj); link; link = (((Dtlink_t*)(link))->right)) {
294 UNSUPPORTED("2aeor5mnjzhwqpcgc294oq70m"); // id = ((intitem*)(((Dt_t*)(adj))->disc->link < 0 ? ((Dthold_t*)((link)))->obj : (void*)((char*)((link)) - ((Dt_t*)(adj))->disc->link) ))->id;
295 UNSUPPORTED("1fci76oeaq8sz2pvp4p6npq73"); // if(g->vertices[id].color == 0)
296 UNSUPPORTED("94vjlul0tyxbd7e0q4ing2z1h"); // time = DFS_visit(g, id, time, sp);
297 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
298 UNSUPPORTED("2rts8n24enk3adhy8owm41yh9"); // vp->color = 2;
299 UNSUPPORTED("c4n0lojve186vzv3wqq6dk1pl"); // /* g->vertices[v].f = time; */
300 UNSUPPORTED("axvith90awf9705pbyhu4nx38"); // pushStack (sp, v);
301 UNSUPPORTED("9pkzxm2gxhkcw8p51ercqleh1"); // return (time + 1);
302 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
303
304 throw new UnsupportedOperationException();
305 }
306
307
308
309
310 //3 9r0jqlhxs5buqs5hsdqnbj84j
311 // void top_sort(rawgraph* g)
312 public static Object top_sort(Object... arg) {
313 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
314 UNSUPPORTED("4yot0xeux4j9xntlfs27gwtcf"); // top_sort(rawgraph* g)
315 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
316 UNSUPPORTED("b9q08fv1def3y3mbkfcttoygi"); // int i, v;
317 UNSUPPORTED("c3xjd5j8j3bgmchyoisbyw64b"); // int time = 0;
318 UNSUPPORTED("551funk1bxiemly3silcqtngw"); // int count = 0;
319 UNSUPPORTED("c7rls4c8tdfpn2b8sp15reiyh"); // stack* sp;
320 UNSUPPORTED("9n2rm2xd87zhiqudy5248ij10"); // if (g->nvs == 0) return;
321 UNSUPPORTED("5j8ivb7xr19v4nmq7wd60cj5p"); // if (g->nvs == 1) {
322 UNSUPPORTED("5p60crx1qes9x8eijukw93td3"); // g->vertices[0].topsort_order = count;
323 UNSUPPORTED("6bj8inpmr5ulm16jmfxsstjtn"); // return;
324 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
325 UNSUPPORTED("dlug72rf2lqioskxr8kgz0r1f"); // sp = mkStack (g->nvs);
326 UNSUPPORTED("89rud9nlbi3f8k7rz0vv5vtd8"); // for(i=0;i<g->nvs;i++) {
327 UNSUPPORTED("9lczna1336ncq8zrahl9nzymo"); // if(g->vertices[i].color == 0)
328 UNSUPPORTED("6ln2w0gjr0kz3163kops6o4p1"); // time = DFS_visit(g, i, time, sp);
329 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
330 UNSUPPORTED("a9tz9ejeuh2cz8adl3rtuxvth"); // while((v = popStack(sp)) >= 0) {
331 UNSUPPORTED("9m1c27tt4l4z6f1503uugs6ak"); // g->vertices[v].topsort_order = count;
332 UNSUPPORTED("4221wbi45004vm34bns3e6zhv"); // count++;
333 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
334 UNSUPPORTED("71qiyws5c2bt08glef0zb8cfv"); // freeStack (sp);
335 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
336
337 throw new UnsupportedOperationException();
338 }
339
340
341 }