Debian Codegraph @

src/gen/lib/dotgen/class2__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.dotgen;
47 import static gen.lib.cgraph.edge__c.agedge;
48 import static gen.lib.cgraph.edge__c.agfstout;
49 import static gen.lib.cgraph.edge__c.aghead;
50 import static gen.lib.cgraph.edge__c.agnxtout;
51 import static gen.lib.cgraph.edge__c.agtail;
52 import static gen.lib.cgraph.node__c.agfstnode;
53 import static gen.lib.cgraph.node__c.agnxtnode;
54 import static gen.lib.cgraph.obj__c.agroot;
55 import static gen.lib.common.utils__c.UF_find;
56 import static gen.lib.dotgen.cluster__c.build_skeleton;
57 import static gen.lib.dotgen.cluster__c.mark_clusters;
58 import static gen.lib.dotgen.dotinit__c.dot_root;
59 import static gen.lib.dotgen.fastgr__c.fast_node;
60 import static gen.lib.dotgen.fastgr__c.find_fast_edge;
61 import static gen.lib.dotgen.fastgr__c.flat_edge;
62 import static gen.lib.dotgen.fastgr__c.merge_oneway;
63 import static gen.lib.dotgen.fastgr__c.other_edge;
64 import static gen.lib.dotgen.fastgr__c.virtual_edge;
65 import static gen.lib.dotgen.fastgr__c.virtual_node;
66 import static gen.lib.dotgen.mincross__c.virtual_weight;
67 import static gen.lib.dotgen.position__c.ports_eq;
68 import static smetana.core.JUtils.EQ;
69 import static smetana.core.JUtils.NEQ;
70 import static smetana.core.JUtilsDebug.ENTERING;
71 import static smetana.core.JUtilsDebug.LEAVING;
72 import static smetana.core.Macro.ED_conc_opp_flag;
73 import static smetana.core.Macro.ED_count;
74 import static smetana.core.Macro.ED_edge_type;
75 import static smetana.core.Macro.ED_label;
76 import static smetana.core.Macro.ED_label_ontop;
77 import static smetana.core.Macro.ED_to_virt;
78 import static smetana.core.Macro.ED_weight;
79 import static smetana.core.Macro.ED_xpenalty;
80 import static smetana.core.Macro.GD_clust;
81 import static smetana.core.Macro.GD_comp;
82 import static smetana.core.Macro.GD_flip;
83 import static smetana.core.Macro.GD_n_cluster;
84 import static smetana.core.Macro.GD_n_nodes;
85 import static smetana.core.Macro.GD_nlist;
86 import static smetana.core.Macro.GD_nodesep;
87 import static smetana.core.Macro.GD_rankleader;
88 import static smetana.core.Macro.MAX;
89 import static smetana.core.Macro.N;
90 import static smetana.core.Macro.ND_clust;
91 import static smetana.core.Macro.ND_ht;
92 import static smetana.core.Macro.ND_label;
93 import static smetana.core.Macro.ND_lw;
94 import static smetana.core.Macro.ND_out;
95 import static smetana.core.Macro.ND_rank;
96 import static smetana.core.Macro.ND_ranktype;
97 import static smetana.core.Macro.ND_rw;
98 import static smetana.core.Macro.ND_weight_class;
99 import static smetana.core.Macro.NOT;
100 import static smetana.core.Macro.UNSUPPORTED;
101 import h.ST_Agedge_s;
102 import h.ST_Agnode_s;
103 import h.ST_Agraph_s;
104 import h.ST_pointf;
105 import smetana.core.Z;
106
107 public class class2__c {
108 //1 2digov3edok6d5srhgtlmrycs
109 // extern lt_symlist_t lt_preloaded_symbols[]
110
111
112 //1 baedz5i9est5csw3epz3cv7z
113 // typedef Ppoly_t Ppolyline_t
114
115
116 //1 9k44uhd5foylaeoekf3llonjq
117 // extern Dtmethod_t* Dtset
118
119
120 //1 1ahfywsmzcpcig2oxm7pt9ihj
121 // extern Dtmethod_t* Dtbag
122
123
124 //1 anhghfj3k7dmkudy2n7rvt31v
125 // extern Dtmethod_t* Dtoset
126
127
128 //1 5l6oj1ux946zjwvir94ykejbc
129 // extern Dtmethod_t* Dtobag
130
131
132 //1 2wtf222ak6cui8cfjnw6w377z
133 // extern Dtmethod_t* Dtlist
134
135
136 //1 d1s1s6ibtcsmst88e3057u9r7
137 // extern Dtmethod_t* Dtstack
138
139
140 //1 axa7mflo824p6fspjn1rdk0mt
141 // extern Dtmethod_t* Dtqueue
142
143
144 //1 ega812utobm4xx9oa9w9ayij6
145 // extern Dtmethod_t* Dtdeque
146
147
148 //1 cyfr996ur43045jv1tjbelzmj
149 // extern Dtmethod_t* Dtorder
150
151
152 //1 wlofoiftbjgrrabzb2brkycg
153 // extern Dtmethod_t* Dttree
154
155
156 //1 12bds94t7voj7ulwpcvgf6agr
157 // extern Dtmethod_t* Dthash
158
159
160 //1 9lqknzty480cy7zsubmabkk8h
161 // extern Dtmethod_t _Dttree
162
163
164 //1 bvn6zkbcp8vjdhkccqo1xrkrb
165 // extern Dtmethod_t _Dthash
166
167
168 //1 9lidhtd6nsmmv3e7vjv9e10gw
169 // extern Dtmethod_t _Dtlist
170
171
172 //1 34ujfamjxo7xn89u90oh2k6f8
173 // extern Dtmethod_t _Dtqueue
174
175
176 //1 3jy4aceckzkdv950h89p4wjc8
177 // extern Dtmethod_t _Dtstack
178
179
180 //1 8dfqgf3u1v830qzcjqh9o8ha7
181 // extern Agmemdisc_t AgMemDisc
182
183
184 //1 18k2oh2t6llfsdc5x0wlcnby8
185 // extern Agiddisc_t AgIdDisc
186
187
188 //1 a4r7hi80gdxtsv4hdoqpyiivn
189 // extern Agiodisc_t AgIoDisc
190
191
192 //1 bnzt5syjb7mgeru19114vd6xx
193 // extern Agdisc_t AgDefaultDisc
194
195
196 //1 35y2gbegsdjilegaribes00mg
197 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
198
199
200 //1 c2rygslq6bcuka3awmvy2b3ow
201 // typedef Agsubnode_t Agnoderef_t
202
203
204 //1 xam6yv0dcsx57dtg44igpbzn
205 // typedef Dtlink_t Agedgeref_t
206
207
208 //1 nye6dsi1twkbddwo9iffca1j
209 // extern char *Version
210
211
212 //1 65mu6k7h7lb7bx14jpiw7iyxr
213 // extern char **Files
214
215
216 //1 2rpjdzsdyrvomf00zcs3u3dyn
217 // extern const char **Lib
218
219
220 //1 6d2f111lntd2rsdt4gswh5909
221 // extern char *CmdName
222
223
224 //1 a0ltq04fpeg83soa05a2fkwb2
225 // extern char *specificFlags
226
227
228 //1 1uv30qeqq2jh6uznlr4dziv0y
229 // extern char *specificItems
230
231
232 //1 7i4hkvngxe3x7lmg5h6b3t9g3
233 // extern char *Gvfilepath
234
235
236 //1 9jp96pa73kseya3w6sulxzok6
237 // extern char *Gvimagepath
238
239
240 //1 40ylumfu7mrvawwf4v2asvtwk
241 // extern unsigned char Verbose
242
243
244 //1 93st8awjy1z0h07n28qycbaka
245 // extern unsigned char Reduce
246
247
248 //1 f2vs67ts992erf8onwfglurzp
249 // extern int MemTest
250
251
252 //1 c6f8whijgjwwagjigmxlwz3gb
253 // extern char *HTTPServerEnVar
254
255
256 //1 cp4hzj7p87m7arw776d3bt7aj
257 // extern char *Output_file_name
258
259
260 //1 a3rqagofsgraie6mx0krzkgsy
261 // extern int graphviz_errors
262
263
264 //1 5up05203r4kxvjn1m4njcgq5x
265 // extern int Nop
266
267
268 //1 umig46cco431x14b3kosde2t
269 // extern double PSinputscale
270
271
272 //1 52bj6v8fqz39khasobljfukk9
273 // extern int Syntax_errors
274
275
276 //1 9ekf2ina8fsjj6y6i0an6somj
277 // extern int Show_cnt
278
279
280 //1 38di5qi3nkxkq65onyvconk3r
281 // extern char** Show_boxes
282
283
284 //1 6ri6iu712m8mpc7t2670etpcw
285 // extern int CL_type
286
287
288 //1 bomxiw3gy0cgd1ydqtek7fpxr
289 // extern unsigned char Concentrate
290
291
292 //1 cqy3gqgcq8empdrbnrhn84058
293 // extern double Epsilon
294
295
296 //1 64slegfoouqeg0rmbyjrm8wgr
297 // extern int MaxIter
298
299
300 //1 88wdinpnmfs4mab4aw62yb0bg
301 // extern int Ndim
302
303
304 //1 8bbad3ogcelqnnvo5br5s05gq
305 // extern int State
306
307
308 //1 17rnd8q45zclfn68qqst2vxxn
309 // extern int EdgeLabelsDone
310
311
312 //1 ymx1z4s8cznjifl2d9f9m8jr
313 // extern double Initial_dist
314
315
316 //1 a33bgl0c3uqb3trx419qulj1x
317 // extern double Damping
318
319
320 //1 d9lvrpjg1r0ojv40pod1xwk8n
321 // extern int Y_invert
322
323
324 //1 71efkfs77q5tq9ex6y0f4kanh
325 // extern int GvExitOnUsage
326
327
328 //1 4xy2dkdkv0acs2ue9eca8hh2e
329 // extern Agsym_t *G_activepencolor, *G_activefillcolor, *G_selectedpencolor, *G_selectedfillcolor, *G_visitedpencolor, *G_visitedfillcolor, *G_deletedpencolor, *G_deletedfillcolor, *G_ordering, *G_peripheries, *G_penwidth, *G_gradientangle, *G_margin
330
331
332 //1 9js5gxgzr74eakgtfhnbws3t9
333 // extern Agsym_t *N_height, *N_width, *N_shape, *N_color, *N_fillcolor, *N_activepencolor, *N_activefillcolor, *N_selectedpencolor, *N_selectedfillcolor, *N_visitedpencolor, *N_visitedfillcolor, *N_deletedpencolor, *N_deletedfillcolor, *N_fontsize, *N_fontname, *N_fontcolor, *N_margin, *N_label, *N_xlabel, *N_nojustify, *N_style, *N_showboxes, *N_sides, *N_peripheries, *N_ordering, *N_orientation, *N_skew, *N_distortion, *N_fixed, *N_imagescale, *N_layer, *N_group, *N_comment, *N_vertices, *N_z, *N_penwidth, *N_gradientangle
334
335
336 //1 anqllp9sj7wo45w6bm11j8trn
337 // extern Agsym_t *E_weight, *E_minlen, *E_color, *E_fillcolor, *E_activepencolor, *E_activefillcolor, *E_selectedpencolor, *E_selectedfillcolor, *E_visitedpencolor, *E_visitedfillcolor, *E_deletedpencolor, *E_deletedfillcolor, *E_fontsize, *E_fontname, *E_fontcolor, *E_label, *E_xlabel, *E_dir, *E_style, *E_decorate, *E_showboxes, *E_arrowsz, *E_constr, *E_layer, *E_comment, *E_label_float, *E_samehead, *E_sametail, *E_arrowhead, *E_arrowtail, *E_headlabel, *E_taillabel, *E_labelfontsize, *E_labelfontname, *E_labelfontcolor, *E_labeldistance, *E_labelangle, *E_tailclip, *E_headclip, *E_penwidth
338
339
340 //1 bh0z9puipqw7gymjd5h5b8s6i
341 // extern struct fdpParms_s* fdp_parms
342
343
344
345
346 //3 ciez0pfggxdljedzsbklq49f0
347 // static inline point pointof(int x, int y)
348 public static Object pointof(Object... arg) {
349 UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y)
350 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
351 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
352 UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x;
353 UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y;
354 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
355 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
356
357 throw new UnsupportedOperationException();
358 }
359
360
361
362
363 //3 c1s4k85p1cdfn176o3uryeros
364 // static inline pointf pointfof(double x, double y)
365 public static ST_pointf pointfof(double x, double y) {
366 // WARNING!! STRUCT
367 return pointfof_w_(x, y).copy();
368 }
369 private static ST_pointf pointfof_w_(double x, double y) {
370 ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
371 try {
372 final ST_pointf r = new ST_pointf();
373 r.setDouble("x", x);
374 r.setDouble("y", y);
375 return r;
376 } finally {
377 LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof");
378 }
379 }
380
381
382
383
384 //3 7cufnfitrh935ew093mw0i4b7
385 // static inline box boxof(int llx, int lly, int urx, int ury)
386 public static Object boxof(Object... arg) {
387 UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury)
388 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
389 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
390 UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly;
391 UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury;
392 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
393 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
394
395 throw new UnsupportedOperationException();
396 }
397
398
399
400
401
402
403 //3 1n5xl70wxuabyf97mclvilsm6
404 // static inline point add_point(point p, point q)
405 public static Object add_point(Object... arg) {
406 UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q)
407 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
408 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
409 UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x;
410 UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y;
411 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
412 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
413
414 throw new UnsupportedOperationException();
415 }
416
417
418
419
420 //3 arrsbik9b5tnfcbzsm8gr2chx
421 // static inline pointf add_pointf(pointf p, pointf q)
422 public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
423 // WARNING!! STRUCT
424 return add_pointf_w_(p.copy(), q.copy()).copy();
425 }
426 private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
427 ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
428 try {
429 final ST_pointf r = new ST_pointf();
430 r.setDouble("x", p.x + q.x);
431 r.setDouble("y", p.y + q.y);
432 return r;
433 } finally {
434 LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
435 }
436 }
437
438
439
440
441 //3 ai2dprak5y6obdsflguh5qbd7
442 // static inline point sub_point(point p, point q)
443 public static Object sub_point(Object... arg) {
444 UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q)
445 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
446 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
447 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
448 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
449 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
450 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
451
452 throw new UnsupportedOperationException();
453 }
454
455
456
457
458 //3 16f6pyogcv3j7n2p0n8giqqgh
459 // static inline pointf sub_pointf(pointf p, pointf q)
460 public static Object sub_pointf(Object... arg) {
461 UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q)
462 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
463 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
464 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
465 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
466 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
467 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
468
469 throw new UnsupportedOperationException();
470 }
471
472
473
474
475 //3 9k50jgrhc4f9824vf8ony74rw
476 // static inline point mid_point(point p, point q)
477 public static Object mid_point(Object... arg) {
478 UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q)
479 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
480 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
481 UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2;
482 UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2;
483 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
484 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
485
486 throw new UnsupportedOperationException();
487 }
488
489
490
491
492 //3 59c4f7im0ftyowhnzzq2v9o1x
493 // static inline pointf mid_pointf(pointf p, pointf q)
494 public static Object mid_pointf(Object... arg) {
495 UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q)
496 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
497 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
498 UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.;
499 UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.;
500 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
501 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
502
503 throw new UnsupportedOperationException();
504 }
505
506
507
508
509 //3 5r18p38gisvcx3zsvbb9saixx
510 // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
511 public static Object interpolate_pointf(Object... arg) {
512 UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
513 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
514 UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r;
515 UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x);
516 UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y);
517 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
518 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
519
520 throw new UnsupportedOperationException();
521 }
522
523
524
525
526 //3 bxzrv2ghq04qk5cbyy68s4mol
527 // static inline point exch_xy(point p)
528 public static Object exch_xy(Object... arg) {
529 UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p)
530 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
531 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
532 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
533 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
534 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
535 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
536
537 throw new UnsupportedOperationException();
538 }
539
540
541
542
543 //3 9lt3e03tac6h6sydljrcws8fd
544 // static inline pointf exch_xyf(pointf p)
545 public static Object exch_xyf(Object... arg) {
546 UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p)
547 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
548 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
549 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
550 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
551 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
552 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
553
554 throw new UnsupportedOperationException();
555 }
556
557
558
559
560 //3 8l9qhieokthntzdorlu5zn29b
561 // static inline box box_bb(box b0, box b1)
562 public static Object box_bb(Object... arg) {
563 UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1)
564 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
565 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
566 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
567 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
568 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
569 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
570 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
571 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
572
573 throw new UnsupportedOperationException();
574 }
575
576
577
578
579 //3 clws9h3bbjm0lw3hexf8nl4c4
580 // static inline boxf boxf_bb(boxf b0, boxf b1)
581 public static Object boxf_bb(Object... arg) {
582 UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1)
583 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
584 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
585 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
586 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
587 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
588 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
589 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
590 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
591
592 throw new UnsupportedOperationException();
593 }
594
595
596
597
598 //3 bit6ycxo1iqd2al92y8gkzlvb
599 // static inline box box_intersect(box b0, box b1)
600 public static Object box_intersect(Object... arg) {
601 UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1)
602 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
603 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
604 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
605 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
606 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
607 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
608 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
609 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
610
611 throw new UnsupportedOperationException();
612 }
613
614
615
616
617 //3 8gfybie7k6pgb3o1a6llgpwng
618 // static inline boxf boxf_intersect(boxf b0, boxf b1)
619 public static Object boxf_intersect(Object... arg) {
620 UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1)
621 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
622 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
623 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
624 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
625 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
626 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
627 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
628 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
629
630 throw new UnsupportedOperationException();
631 }
632
633
634
635
636 //3 7z8j2quq65govaaejrz7b4cvb
637 // static inline int box_overlap(box b0, box b1)
638 public static Object box_overlap(Object... arg) {
639 UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1)
640 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
641 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
642 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
643
644 throw new UnsupportedOperationException();
645 }
646
647
648
649
650 //3 4z0suuut2acsay5m8mg9dqjdu
651 // static inline int boxf_overlap(boxf b0, boxf b1)
652 public static Object boxf_overlap(Object... arg) {
653 UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1)
654 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
655 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
656 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
657
658 throw new UnsupportedOperationException();
659 }
660
661
662
663
664 //3 dd34swz5rmdgu3a2np2a4h1dy
665 // static inline int box_contains(box b0, box b1)
666 public static Object box_contains(Object... arg) {
667 UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1)
668 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
669 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
670 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
671
672 throw new UnsupportedOperationException();
673 }
674
675
676
677
678 //3 8laj1bspbu2i1cjd9upr7xt32
679 // static inline int boxf_contains(boxf b0, boxf b1)
680 public static Object boxf_contains(Object... arg) {
681 UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1)
682 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
683 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
684 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
685
686 throw new UnsupportedOperationException();
687 }
688
689
690
691
692 //3 4wf5swkz24xx51ja2dynbycu1
693 // static inline pointf perp (pointf p)
694 public static Object perp(Object... arg) {
695 UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p)
696 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
697 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
698 UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y;
699 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
700 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
701 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
702
703 throw new UnsupportedOperationException();
704 }
705
706
707
708
709 //3 6dtlpzv4mvgzb9o0b252yweuv
710 // static inline pointf scale (double c, pointf p)
711 public static Object scale(Object... arg) {
712 UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p)
713 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
714 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
715 UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x;
716 UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y;
717 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
718 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
719
720 throw new UnsupportedOperationException();
721 }
722
723
724
725
726 //3 2zn7c6ulmwwzaibdxo127jf04
727 // static node_t* label_vnode(graph_t * g, edge_t * orig)
728 public static ST_Agnode_s label_vnode(ST_Agraph_s g, ST_Agedge_s orig) {
729 ENTERING("2zn7c6ulmwwzaibdxo127jf04","label_vnode");
730 try {
731 ST_Agnode_s v;
732 final ST_pointf dimen = new ST_pointf();
733 dimen.___(ED_label(orig).dimen);
734 v = virtual_node(g);
735 ND_label(v, ED_label(orig));
736 ND_lw(v, GD_nodesep(agroot(v)));
737 if (N(ED_label_ontop(orig))) {
738 if (GD_flip(agroot(g))!=0) {
739 ND_ht(v, dimen.x);
740 ND_rw(v, dimen.y);
741 } else {
742 ND_ht(v, dimen.y);
743 ND_rw(v, dimen.x);
744 }
745 }
746 return v;
747 } finally {
748 LEAVING("2zn7c6ulmwwzaibdxo127jf04","label_vnode");
749 }
750 }
751
752
753
754
755 //3 49tji49jdm9uges7v8lf2j2rn
756 // static void incr_width(graph_t * g, node_t * v)
757 public static void incr_width(ST_Agraph_s g, ST_Agnode_s v) {
758 ENTERING("49tji49jdm9uges7v8lf2j2rn","incr_width");
759 try {
760 int width = GD_nodesep(g) / 2;
761 ND_lw(v, ND_lw(v) + width);
762 ND_rw(v, ND_rw(v) + width);
763 } finally {
764 LEAVING("49tji49jdm9uges7v8lf2j2rn","incr_width");
765 }
766 }
767
768
769
770
771 //3 xujihq6vep3ez275shtrbilo
772 // static node_t* plain_vnode(graph_t * g, edge_t * orig)
773 public static ST_Agnode_s plain_vnode(ST_Agraph_s g, ST_Agedge_s orig) {
774 ENTERING("xujihq6vep3ez275shtrbilo","plain_vnode");
775 try {
776 ST_Agnode_s v;
777 orig = orig;
778 v = virtual_node(g);
779 incr_width(g, v);
780 return v;
781 } finally {
782 LEAVING("xujihq6vep3ez275shtrbilo","plain_vnode");
783 }
784 }
785
786
787
788
789 //3 9fmfj1b2jik7skv6ms0657t8r
790 // static node_t* leader_of(graph_t * g, node_t * v)
791 public static ST_Agnode_s leader_of(ST_Agraph_s g, ST_Agnode_s v) {
792 ENTERING("9fmfj1b2jik7skv6ms0657t8r","leader_of");
793 try {
794 ST_Agraph_s clust;
795 ST_Agnode_s rv;
796 if (ND_ranktype(v) != 7) {
797 /*assert(v == UF_find(v)); could be leaf, so comment out */
798 rv = UF_find(v);
799 } else {
800 clust = ND_clust(v);
801 rv = (ST_Agnode_s) GD_rankleader(clust).plus(ND_rank(v)).getPtr();
802 }
803 return rv;
804 } finally {
805 LEAVING("9fmfj1b2jik7skv6ms0657t8r","leader_of");
806 }
807 }
808
809
810
811
812 //3 6sbvlvurvkodunw2qt1ug70c2
813 // static void make_chain(graph_t * g, node_t * from, node_t * to, edge_t * orig)
814 public static void make_chain(ST_Agraph_s g, ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig) {
815 ENTERING("6sbvlvurvkodunw2qt1ug70c2","make_chain");
816 try {
817 int r, label_rank;
818 ST_Agnode_s u, v=null;
819 ST_Agedge_s e;
820 u = from;
821 if (ED_label(orig)!=null)
822 label_rank = (ND_rank(from) + ND_rank(to)) / 2;
823 else
824 label_rank = -1;
825 //assert(ED_to_virt(orig) == NULL);
826 for (r = ND_rank(from) + 1; r <= ND_rank(to); r++) {
827 if (r < ND_rank(to)) {
828 if (r == label_rank)
829 v = label_vnode(g, orig);
830 else
831 v = plain_vnode(g, orig);
832 ND_rank(v, r);
833 } else
834 v = to;
835 e = virtual_edge(u, v, orig);
836 virtual_weight(e);
837 u = v;
838 }
839 // assert(ED_to_virt(orig) != NULL);
840 } finally {
841 LEAVING("6sbvlvurvkodunw2qt1ug70c2","make_chain");
842 }
843 }
844
845
846
847
848 //3 659ld5tcseo3l0hopxb3pf0vv
849 // static void interclrep(graph_t * g, edge_t * e)
850 public static void interclrep(ST_Agraph_s g, ST_Agedge_s e) {
851 ENTERING("659ld5tcseo3l0hopxb3pf0vv","interclrep");
852 try {
853 ST_Agnode_s t, h;
854 ST_Agedge_s ve;
855 t = leader_of(g, agtail(e));
856 h = leader_of(g, aghead(e));
857 if (ND_rank(t) > ND_rank(h)) {
858 ST_Agnode_s t0 = t;
859 t = h;
860 h = t0;
861 }
862 if (NEQ(ND_clust(t), ND_clust(h))) {
863 if ((ve = find_fast_edge(t, h))!=null) {
864 merge_chain(g, e, ve, NOT(false));
865 return;
866 }
867 if (ND_rank(t) == ND_rank(h))
868 return;
869 make_chain(g, t, h, e);
870 /* mark as cluster edge */
871 for (ve = ED_to_virt(e); ve!=null && (ND_rank(aghead(ve)) <= ND_rank(h));
872 ve = (ST_Agedge_s) ND_out(aghead(ve)).getFromList(0))
873 ED_edge_type(ve, 5);
874 }
875 /* else ignore intra-cluster edges at this point */
876 } finally {
877 LEAVING("659ld5tcseo3l0hopxb3pf0vv","interclrep");
878 }
879 }
880
881
882
883
884 //3 c0cx00ki1i1kx0bp84e7xjg8d
885 // static int is_cluster_edge(edge_t * e)
886 public static boolean is_cluster_edge(ST_Agedge_s e) {
887 ENTERING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge");
888 try {
889 return ((ND_ranktype(agtail(e)) == 7)
890 || (ND_ranktype(aghead(e)) == 7));
891 } finally {
892 LEAVING("c0cx00ki1i1kx0bp84e7xjg8d","is_cluster_edge");
893 }
894 }
895
896
897
898
899 //3 c45973dtaighb3u0auuekcs1y
900 // void merge_chain(graph_t * g, edge_t * e, edge_t * f, int flag)
901 public static void merge_chain(ST_Agraph_s g, ST_Agedge_s e, ST_Agedge_s f, boolean flag) {
902 ENTERING("c45973dtaighb3u0auuekcs1y","merge_chain");
903 try {
904 ST_Agedge_s rep;
905 int lastrank = MAX(ND_rank(agtail(e)), ND_rank(aghead(e)));
906 //assert(ED_to_virt(e) == NULL);
907 ED_to_virt(e, f);
908 rep = f;
909 do {
910 /* interclust multi-edges are not counted now */
911 if (flag)
912 ED_count(rep, ED_count(rep) + ED_count(e));
913 ED_xpenalty(rep, ED_xpenalty(rep) + ED_xpenalty(e));
914 ED_weight(rep, ED_weight(rep) + ED_weight(e));
915 if (ND_rank(aghead(rep)) == lastrank)
916 break;
917 incr_width(g, aghead(rep));
918 rep = (ST_Agedge_s) ND_out(aghead(rep)).getFromList(0);
919 } while (rep!=null);
920 } finally {
921 LEAVING("c45973dtaighb3u0auuekcs1y","merge_chain");
922 }
923 }
924
925
926
927
928 //3 bg5r9wlego0d8pv0hr96zt45c
929 // int mergeable(edge_t * e, edge_t * f)
930 public static boolean mergeable(ST_Agedge_s e, ST_Agedge_s f) {
931 ENTERING("bg5r9wlego0d8pv0hr96zt45c","mergeable");
932 try {
933 if (e!=null && f!=null && EQ(agtail(e), agtail(f)) && EQ(aghead(e), aghead(f)) &&
934 EQ(ED_label(e), ED_label(f)) && ports_eq(e, f))
935 return NOT(false);
936 return false;
937 } finally {
938 LEAVING("bg5r9wlego0d8pv0hr96zt45c","mergeable");
939 }
940 }
941
942
943
944
945 //3 d0bxlkysxucmww7t74u9krrgz
946 // void class2(graph_t * g)
947 public static void class2(ST_Agraph_s g) {
948 ENTERING("d0bxlkysxucmww7t74u9krrgz","class2");
949 try {
950 int c;
951 ST_Agnode_s n, t, h;
952 ST_Agedge_s e, prev, opp;
953 GD_nlist(g, null);
954 GD_n_nodes(g, 0); /* new */
955 mark_clusters(g);
956 for (c = 1; c <= GD_n_cluster(g); c++)
957 build_skeleton(g, (ST_Agraph_s) GD_clust(g).get(c).getPtr());
958 for (n = agfstnode(g); n!=null; n = agnxtnode(g, n))
959 for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
960 if (ND_weight_class(aghead(e)) <= 2)
961 ND_weight_class(aghead(e), ND_weight_class(aghead(e))+1);
962 if (ND_weight_class(agtail(e)) <= 2)
963 ND_weight_class(agtail(e), ND_weight_class(agtail(e))+1);
964 }
965 for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
966 if ((ND_clust(n) == null) && (EQ(n, UF_find(n)))) {
967 fast_node(g, n);
968 GD_n_nodes(g, GD_n_nodes(g)+1);
969 }
970 prev = null;
971 for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
972 /* already processed */
973 if (ED_to_virt(e)!=null) {
974 prev = e;
975 continue;
976 }
977 /* edges involving sub-clusters of g */
978 if (is_cluster_edge(e)) {
979 /* following is new cluster multi-edge code */
980 if (mergeable(prev, e)) {
981 if (ED_to_virt(prev)!=null) {
982 merge_chain(g, e, ED_to_virt(prev), false);
983 other_edge(e);
984 } else if (ND_rank(agtail(e)) == ND_rank(aghead(e))) {
985 merge_oneway(e, prev);
986 other_edge(e);
987 }
988 /* else is an intra-cluster edge */
989 continue;
990 }
991 interclrep(g, e);
992 prev = e;
993 continue;
994 }
995 /* merge multi-edges */
996 if (prev!=null && EQ(agtail(e), agtail(prev)) && EQ(aghead(e), aghead(prev))) {
997 if (ND_rank(agtail(e)) == ND_rank(aghead(e))) {
998 merge_oneway(e, prev);
999 other_edge(e);
1000 continue;
1001 }
1002 if ((ED_label(e) == null) && (ED_label(prev) == null)
1003 && ports_eq(e, prev)) {
1004 if (Z.z().Concentrate)
1005 ED_edge_type(e, 6);
1006 else {
1007 merge_chain(g, e, ED_to_virt(prev), NOT(false));
1008 other_edge(e);
1009 }
1010 continue;
1011 }
1012 /* parallel edges with different labels fall through here */
1013 }
1014 /* self edges */
1015 if (EQ(agtail(e), aghead(e))) {
1016 other_edge(e);
1017 prev = e;
1018 continue;
1019 }
1020 t = UF_find(agtail(e));
1021 h = UF_find(aghead(e));
1022 /* non-leader leaf nodes */
1023 if (NEQ(agtail(e), t) || NEQ(aghead(e), h)) {
1024 /* FIX need to merge stuff */
1025 continue;
1026 }
1027 /* flat edges */
1028 if (ND_rank(agtail(e)) == ND_rank(aghead(e))) {
1029 flat_edge(g, e);
1030 prev = e;
1031 continue;
1032 }
1033 /* forward edges */
1034 if (ND_rank(aghead(e)) > ND_rank(agtail(e))) {
1035 make_chain(g, agtail(e), aghead(e), e);
1036 prev = e;
1037 continue;
1038 }
1039 /* backward edges */
1040 else {
1041 /*other_edge(e); */
1042 /* avoid when opp==e in undirected graph */
1043 if ((opp = (agedge(g,aghead(e),agtail(e),null,false)))!=null && NEQ(aghead(opp), aghead(e))) {
1044 /* shadows a forward edge */
1045 if (ED_to_virt(opp) == null)
1046 make_chain(g, agtail(opp), aghead(opp), opp);
1047 if ((ED_label(e) == null) && (ED_label(opp) == null)
1048 && ports_eq(e, opp)) {
1049 if (Z.z().Concentrate) {
1050 ED_edge_type(e, 6);
1051 ED_conc_opp_flag(opp, NOT(false));
1052 } else { /* see above. this is getting out of hand */
1053 other_edge(e);
1054 merge_chain(g, e, ED_to_virt(opp), NOT(false));
1055 }
1056 continue;
1057 }
1058 }
1059 make_chain(g, aghead(e), agtail(e), e);
1060 prev = e;
1061 }
1062 }
1063 }
1064 /* since decompose() is not called on subgraphs */
1065 if (NEQ(g, dot_root(g))) {
1066 GD_comp(g).reallocEmpty(1);
1067 GD_comp(g).setInList(0, GD_nlist(g));
1068 }
1069 } finally {
1070 LEAVING("d0bxlkysxucmww7t74u9krrgz","class2");
1071 }
1072 }
1073
1074
1075 }