Debian Codegraph @

src/gen/lib/ortho/sgraph__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 sgraph__c {
50 //1 2digov3edok6d5srhgtlmrycs
51 // extern lt_symlist_t lt_preloaded_symbols[]
52
53
54 //1 baedz5i9est5csw3epz3cv7z
55 // typedef Ppoly_t Ppolyline_t
56
57
58 //1 9k44uhd5foylaeoekf3llonjq
59 // extern Dtmethod_t* Dtset
60
61
62 //1 1ahfywsmzcpcig2oxm7pt9ihj
63 // extern Dtmethod_t* Dtbag
64
65
66 //1 anhghfj3k7dmkudy2n7rvt31v
67 // extern Dtmethod_t* Dtoset
68
69
70 //1 5l6oj1ux946zjwvir94ykejbc
71 // extern Dtmethod_t* Dtobag
72
73
74 //1 2wtf222ak6cui8cfjnw6w377z
75 // extern Dtmethod_t* Dtlist
76
77
78 //1 d1s1s6ibtcsmst88e3057u9r7
79 // extern Dtmethod_t* Dtstack
80
81
82 //1 axa7mflo824p6fspjn1rdk0mt
83 // extern Dtmethod_t* Dtqueue
84
85
86 //1 ega812utobm4xx9oa9w9ayij6
87 // extern Dtmethod_t* Dtdeque
88
89
90 //1 cyfr996ur43045jv1tjbelzmj
91 // extern Dtmethod_t* Dtorder
92
93
94 //1 wlofoiftbjgrrabzb2brkycg
95 // extern Dtmethod_t* Dttree
96
97
98 //1 12bds94t7voj7ulwpcvgf6agr
99 // extern Dtmethod_t* Dthash
100
101
102 //1 9lqknzty480cy7zsubmabkk8h
103 // extern Dtmethod_t _Dttree
104
105
106 //1 bvn6zkbcp8vjdhkccqo1xrkrb
107 // extern Dtmethod_t _Dthash
108
109
110 //1 9lidhtd6nsmmv3e7vjv9e10gw
111 // extern Dtmethod_t _Dtlist
112
113
114 //1 34ujfamjxo7xn89u90oh2k6f8
115 // extern Dtmethod_t _Dtqueue
116
117
118 //1 3jy4aceckzkdv950h89p4wjc8
119 // extern Dtmethod_t _Dtstack
120
121
122 //1 8dfqgf3u1v830qzcjqh9o8ha7
123 // extern Agmemdisc_t AgMemDisc
124
125
126 //1 18k2oh2t6llfsdc5x0wlcnby8
127 // extern Agiddisc_t AgIdDisc
128
129
130 //1 a4r7hi80gdxtsv4hdoqpyiivn
131 // extern Agiodisc_t AgIoDisc
132
133
134 //1 bnzt5syjb7mgeru19114vd6xx
135 // extern Agdisc_t AgDefaultDisc
136
137
138 //1 35y2gbegsdjilegaribes00mg
139 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
140
141
142 //1 c2rygslq6bcuka3awmvy2b3ow
143 // typedef Agsubnode_t Agnoderef_t
144
145
146 //1 xam6yv0dcsx57dtg44igpbzn
147 // typedef Dtlink_t Agedgeref_t
148
149
150
151
152 //3 do1p8q9fgspbwjclhfas1e31i
153 // void gsave (sgraph* G)
154 public static Object gsave(Object... arg) {
155 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
156 UNSUPPORTED("53tz1kawkoq5faz7kymp6ptpo"); // gsave (sgraph* G)
157 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
158 UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
159 UNSUPPORTED("4a3idvuwsn45q081062uxj30b"); // G->save_nnodes = G->nnodes;
160 UNSUPPORTED("dvjft3jbvipb8kx48kn2cxq4d"); // G->save_nedges = G->nedges;
161 UNSUPPORTED("ehil2x3e5xjd504di5xq03ix2"); // for (i = 0; i < G->nnodes; i++)
162 UNSUPPORTED("8phdmwqejnwfe17clzvzqusic"); // G->nodes[i].save_n_adj = G->nodes[i].n_adj;
163 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
164
165 throw new UnsupportedOperationException();
166 }
167
168
169
170
171 //3 4bd3mhrsaxr0us4mbdlnz3fva
172 // void reset(sgraph* G)
173 public static Object reset(Object... arg) {
174 UNSUPPORTED("347dderd02mvlozoheqo4ejwo"); // void
175 UNSUPPORTED("o6ryffoh62mg3jqikb1bcvcn"); // reset(sgraph* G)
176 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
177 UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
178 UNSUPPORTED("4z92iyiytnarfwg69q6q1qxdo"); // G->nnodes = G->save_nnodes;
179 UNSUPPORTED("gi9g609ppu0efm44uexae3lg"); // G->nedges = G->save_nedges;
180 UNSUPPORTED("ehil2x3e5xjd504di5xq03ix2"); // for (i = 0; i < G->nnodes; i++)
181 UNSUPPORTED("amo8o2h5u6ikoe5ouawwnxttv"); // G->nodes[i].n_adj = G->nodes[i].save_n_adj;
182 UNSUPPORTED("395pz5pbzjp227kygyayer2m0"); // for (; i < G->nnodes+2; i++)
183 UNSUPPORTED("1w65z5djtqk8i6nk3cu9qavs9"); // G->nodes[i].n_adj = 0;
184 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
185
186 throw new UnsupportedOperationException();
187 }
188
189
190
191
192 //3 2uooy3bnw1kc4mm4ns09blzvd
193 // void initSEdges (sgraph* g, int maxdeg)
194 public static Object initSEdges(Object... arg) {
195 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
196 UNSUPPORTED("3t8ixyxav6ee8tjumnj6c4on7"); // initSEdges (sgraph* g, int maxdeg)
197 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
198 UNSUPPORTED("b17di9c7wgtqm51bvsyxz6e2f"); // int i;
199 UNSUPPORTED("584qbup3c7sdxo8kave8mllal"); // int* adj = (int*)zmalloc((6*g->nnodes + 2*maxdeg)*sizeof(int));
200 UNSUPPORTED("dvc1rp1rnjfmjnxvwpm004stb"); // g->edges = (sedge*)zmalloc((3*g->nnodes + maxdeg)*sizeof(sedge));
201 UNSUPPORTED("eavilhxlidc3wjniw4glglbnt"); // for (i = 0; i < g->nnodes; i++) {
202 UNSUPPORTED("ckt5vl01ya7v4i84i9yxcipv0"); // g->nodes[i].adj_edge_list = adj;
203 UNSUPPORTED("dzxhiwbj9xcvedfridh0okcez"); // adj += 6;
204 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
205 UNSUPPORTED("dgkzkhndgc3xziilvfagce4xi"); // for (; i < g->nnodes+2; i++) {
206 UNSUPPORTED("ckt5vl01ya7v4i84i9yxcipv0"); // g->nodes[i].adj_edge_list = adj;
207 UNSUPPORTED("68si7kljcmnbf59kgy3rk0m6z"); // adj += maxdeg;
208 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
209 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
210
211 throw new UnsupportedOperationException();
212 }
213
214
215
216
217 //3 4lws7mi89ekzzcc99wuw9r7l8
218 // sgraph* createSGraph (int nnodes)
219 public static Object createSGraph(Object... arg) {
220 UNSUPPORTED("9xadge294rqhy06asmqycka8m"); // sgraph*
221 UNSUPPORTED("eqjwxhjyhqmefxsvpknl1bnfx"); // createSGraph (int nnodes)
222 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
223 UNSUPPORTED("dwa606y0aknngzxrrsnswltbr"); // sgraph* g = (sgraph*)zmalloc(sizeof(sgraph));
224 UNSUPPORTED("1i02j60f9yupm02tj9rvzps0o"); // /* create the nodes vector in the search graph */
225 UNSUPPORTED("3yhlfn7hpvrjkdva5gida8jqo"); // g->nnodes = 0;
226 UNSUPPORTED("47bxz2s175s5k1snvid5o4hve"); // g->nodes = (snode*)zmalloc((nnodes)*sizeof(snode));
227 UNSUPPORTED("2syri7q5tc0jyvwq8ecyfo3vr"); // return g;
228 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
229
230 throw new UnsupportedOperationException();
231 }
232
233
234
235
236 //3 4jwt9radjtehigwninuxfni66
237 // snode* createSNode (sgraph* g)
238 public static Object createSNode(Object... arg) {
239 UNSUPPORTED("7qyamsdkopruu23xaccl0bcd2"); // snode*
240 UNSUPPORTED("753vtsohiclqv7nl3y14twf19"); // createSNode (sgraph* g)
241 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
242 UNSUPPORTED("1hdbk7wtbmf5ysy77ka3v1wv1"); // snode* np = g->nodes+g->nnodes;
243 UNSUPPORTED("12345aoqngizwar08ubsjkjql"); // np->index = g->nnodes;
244 UNSUPPORTED("1pdvfvgbmueo5t1u1q4rbj9t4"); // g->nnodes++;
245 UNSUPPORTED("8iwc9afkw6pes2mgfhktuxzj8"); // return np;
246 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
247
248 throw new UnsupportedOperationException();
249 }
250
251
252
253
254 //3 49zscu3ughv1sfoes00tmvzew
255 // static void addEdgeToNode (snode* np, sedge* e, int idx)
256 public static Object addEdgeToNode(Object... arg) {
257 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
258 UNSUPPORTED("dpg266aklzv95plhgmmdgdl2h"); // addEdgeToNode (snode* np, sedge* e, int idx)
259 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
260 UNSUPPORTED("3bjz47ii1rlzjcxhnphx8bepr"); // np->adj_edge_list[np->n_adj] = idx;
261 UNSUPPORTED("2vd3mg5b94lmz0n3qsamkbrbk"); // np->n_adj++;
262 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
263
264 throw new UnsupportedOperationException();
265 }
266
267
268
269
270 //3 25bbgi67jwpg5nrx87bctkn5s
271 // sedge* createSEdge (sgraph* g, snode* v1, snode* v2, double wt)
272 public static Object createSEdge(Object... arg) {
273 UNSUPPORTED("de30fcx2rpq95h8prggzz38de"); // sedge*
274 UNSUPPORTED("e67qstzz1cjy6tm1gp72tqiy9"); // createSEdge (sgraph* g, snode* v1, snode* v2, double wt)
275 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
276 UNSUPPORTED("5us6bymu4crkiqypwh57332hj"); // sedge* e;
277 UNSUPPORTED("3edhazo5e0eznk99j763w7wvk"); // int idx = g->nedges++;
278 UNSUPPORTED("12o3iah7k1tllf6ehoks5ez9r"); // e = g->edges + idx;
279 UNSUPPORTED("742bl52l6dlhwl8vdmr0gi6mt"); // e->v1 = v1->index;
280 UNSUPPORTED("eo17frg8yipb9e15ykaocxv8"); // e->v2 = v2->index;
281 UNSUPPORTED("3tbomhde001xxpsgrqrxaj5qq"); // e->weight = wt;
282 UNSUPPORTED("bdajav43vx6s0dqy0k4qzz34r"); // e->cnt = 0;
283 UNSUPPORTED("2fxbnv4tmis57zol548d8t69o"); // addEdgeToNode (v1, e, idx);
284 UNSUPPORTED("8fhmkjmzcgsaedp55s0lgcnzf"); // addEdgeToNode (v2, e, idx);
285 UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); // return e;
286 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
287
288 throw new UnsupportedOperationException();
289 }
290
291
292
293
294 //3 cmavbm512p00aze5hpa7ewqnf
295 // void freeSGraph (sgraph* g)
296 public static Object freeSGraph(Object... arg) {
297 UNSUPPORTED("c01vxogao855zs8fe94tpim9g"); // void
298 UNSUPPORTED("9hthkvnsrcbkqzxbng2mlgcr"); // freeSGraph (sgraph* g)
299 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
300 UNSUPPORTED("5xfei00jwgg7b7kejqmwtve51"); // free (g->nodes[0].adj_edge_list);
301 UNSUPPORTED("apli015280vdkava7kzfu45gt"); // free (g->nodes);
302 UNSUPPORTED("aobfrb6yk5ivr8l2memu6iegu"); // free (g->edges);
303 UNSUPPORTED("dwuc0y4whcauryjdz2g3rdyey"); // free (g);
304 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
305
306 throw new UnsupportedOperationException();
307 }
308
309
310
311
312 //3 1rcimcpgyvapk639i1ln4ubi5
313 // static snode* adjacentNode(sgraph* g, sedge* e, snode* n)
314 public static Object adjacentNode(Object... arg) {
315 UNSUPPORTED("1mqfssg5cquehb5bdk2189gy2"); // static snode*
316 UNSUPPORTED("d7hrrud3osvm08rbt95y6nc7v"); // adjacentNode(sgraph* g, sedge* e, snode* n)
317 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
318 UNSUPPORTED("aapvzqekocoy044mxh46608wo"); // if (e->v1==n->index)
319 UNSUPPORTED("62g358pvqoywxqbeb39tjulp2"); // return (&(g->nodes[e->v2]));
320 UNSUPPORTED("div10atae09n36x269sl208r1"); // else
321 UNSUPPORTED("dkxx6omcntqirmu5yygun7kop"); // return (&(g->nodes[e->v1]));
322 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
323
324 throw new UnsupportedOperationException();
325 }
326
327
328
329
330 //3 9giqtyb1anron57zz1mdcuwr0
331 // int shortPath (sgraph* g, snode* from, snode* to)
332 public static Object shortPath(Object... arg) {
333 UNSUPPORTED("etrjsq5w49uo9jq5pzifohkqw"); // int
334 UNSUPPORTED("2d7cnx1fuelcu110onyrglta1"); // shortPath (sgraph* g, snode* from, snode* to)
335 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
336 UNSUPPORTED("2azqjiolcsah2sn6lnkbcv8q6"); // snode* n;
337 UNSUPPORTED("5us6bymu4crkiqypwh57332hj"); // sedge* e;
338 UNSUPPORTED("a4iu3ng9cbut3oe6j3w1hhtlw"); // snode* adjn;
339 UNSUPPORTED("5azgw3jpyk2yccpp3p4s3q817"); // int d;
340 UNSUPPORTED("1ouxm7u78s3lne6g97el7yirj"); // int x, y;
341 UNSUPPORTED("cj7nzqwbchsm0mvo2wmynwq5u"); // for (x = 0; x<g->nnodes; x++) {
342 UNSUPPORTED("7d5ytzu7ryaoy73g9z0g89g37"); // snode* temp;
343 UNSUPPORTED("ed9j6kqbny3qsxz8e8dk4vxe6"); // temp = &(g->nodes[x]);
344 UNSUPPORTED("78pvwvoqedjj594q1og8f58lt"); // (temp)->n_val = INT_MIN;
345 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
346 UNSUPPORTED("6ig938tzt63g78nuq5ozjoxia"); // PQinit();
347 UNSUPPORTED("d1qoqypb9nj64lzirszjt4ips"); // if (PQ_insert (from)) return 1;
348 UNSUPPORTED("5jv8ecdm6aag2bo5uj5oaqdmn"); // (from)->n_dad = NULL;
349 UNSUPPORTED("ddhvyzr3vort1bce9uxacz0cy"); // (from)->n_val = 0;
350 UNSUPPORTED("58d6z37ovsflm1901h2priinl"); // while ((n = PQremove())) {
351 UNSUPPORTED("83j13xloeu1fjo8bdrw4zv4ot"); // (n)->n_val *= -1;
352 UNSUPPORTED("62t0o3w85qn5ull41imvtkl2v"); // if (n == to) break;
353 UNSUPPORTED("2yuzydrscmjwya9vwcjaub1bw"); // for (y=0; y<n->n_adj; y++) {
354 UNSUPPORTED("7dykckcqwi0r01sokehzys07u"); // e = &(g->edges[n->adj_edge_list[y]]);
355 UNSUPPORTED("ee5sii5zq78njilg2b84rcedx"); // adjn = adjacentNode(g, e, n);
356 UNSUPPORTED("dcr46uov2a9y4x1d805di1vkj"); // if ((adjn)->n_val < 0) {
357 UNSUPPORTED("ean1jlrfbqj5db693w8atob75"); // d = -((n)->n_val + (e->weight));
358 UNSUPPORTED("5i12njirmr3egi8u7dyh2x5jq"); // if ((adjn)->n_val == INT_MIN) {
359 UNSUPPORTED("7fyonsun390xwjwz5nvv6387t"); // (adjn)->n_val = d;
360 UNSUPPORTED("17otcakp576j9myi0y8j2018l"); // if (PQ_insert(adjn)) return 1;
361 UNSUPPORTED("cr4e7c9poda05whkcy9htuvi4"); // (adjn)->n_dad = n;
362 UNSUPPORTED("4ag21fj7gx3dj7pmwqjl89ucr"); // (adjn)->n_edge = e;
363 UNSUPPORTED("1vo9ytkxoezj3oe6k9py3kdc4"); // }
364 UNSUPPORTED("d28blrbmwwqp80cyksuz7dwx9"); // else {
365 UNSUPPORTED("ddue9dplflq1i5vnoxj8kmr5q"); // if ((adjn)->n_val < d) {
366 UNSUPPORTED("btt3je7wg001msmvi1swe6o2i"); // PQupdate(adjn, d);
367 UNSUPPORTED("dkztzg2evj6hhccujfulxxaif"); // (adjn)->n_dad = n;
368 UNSUPPORTED("7jm2ji6pc40tpai19vzx2ewqf"); // (adjn)->n_edge = e;
369 UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // }
370 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
371 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
372 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
373 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
374 UNSUPPORTED("7a6hw5yb8rm8wg0rs40229cw4"); // /* PQfree(); */
375 UNSUPPORTED("5oxhd3fvp0gfmrmz12vndnjt"); // return 0;
376 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
377
378 throw new UnsupportedOperationException();
379 }
380
381
382 }