Debian Codegraph @

src/gen/lib/dotgen/dotsplines__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.agfstout;
48 import static gen.lib.cgraph.edge__c.aghead;
49 import static gen.lib.cgraph.edge__c.agnxtout;
50 import static gen.lib.cgraph.edge__c.agtail;
51 import static gen.lib.cgraph.node__c.agfstnode;
52 import static gen.lib.cgraph.node__c.agnxtnode;
53 import static gen.lib.cgraph.obj__c.agraphof;
54 import static gen.lib.common.memory__c.zmalloc;
55 import static gen.lib.common.routespl__c.makeStraightEdge;
56 import static gen.lib.common.routespl__c.routepolylines;
57 import static gen.lib.common.routespl__c.routesplines;
58 import static gen.lib.common.routespl__c.routesplinesinit;
59 import static gen.lib.common.routespl__c.routesplinesterm;
60 import static gen.lib.common.routespl__c.simpleSplineRoute;
61 import static gen.lib.common.splines__c.add_box;
62 import static gen.lib.common.splines__c.beginpath;
63 import static gen.lib.common.splines__c.clip_and_install;
64 import static gen.lib.common.splines__c.endpath;
65 import static gen.lib.common.splines__c.getsplinepoints;
66 import static gen.lib.common.splines__c.makeSelfEdge;
67 import static gen.lib.common.utils__c.updateBB;
68 import static gen.lib.dotgen.cluster__c.mark_lowclusters;
69 import static smetana.core.JUtils.EQ;
70 import static smetana.core.JUtils.LOG2;
71 import static smetana.core.JUtils.NEQ;
72 import static smetana.core.JUtils.function;
73 import static smetana.core.JUtils.qsort;
74 import static smetana.core.JUtils.sizeof;
75 import static smetana.core.JUtilsDebug.ENTERING;
76 import static smetana.core.JUtilsDebug.LEAVING;
77 import static smetana.core.Macro.ABS;
78 import static smetana.core.Macro.AGSEQ;
79 import static smetana.core.Macro.ALLOC_allocated_ST_Agedge_s;
80 import static smetana.core.Macro.BETWEEN;
81 import static smetana.core.Macro.ED_adjacent;
82 import static smetana.core.Macro.ED_edge_type;
83 import static smetana.core.Macro.ED_head_port;
84 import static smetana.core.Macro.ED_label;
85 import static smetana.core.Macro.ED_spl;
86 import static smetana.core.Macro.ED_tail_port;
87 import static smetana.core.Macro.ED_to_orig;
88 import static smetana.core.Macro.ED_to_virt;
89 import static smetana.core.Macro.ED_tree_index;
90 import static smetana.core.Macro.GD_bb;
91 import static smetana.core.Macro.GD_flags;
92 import static smetana.core.Macro.GD_flip;
93 import static smetana.core.Macro.GD_has_labels;
94 import static smetana.core.Macro.GD_maxrank;
95 import static smetana.core.Macro.GD_minrank;
96 import static smetana.core.Macro.GD_nlist;
97 import static smetana.core.Macro.GD_nodesep;
98 import static smetana.core.Macro.GD_rank;
99 import static smetana.core.Macro.GD_ranksep;
100 import static smetana.core.Macro.MAKEFWDEDGE;
101 import static smetana.core.Macro.MAX;
102 import static smetana.core.Macro.MIN;
103 import static smetana.core.Macro.M_PI;
104 import static smetana.core.Macro.N;
105 import static smetana.core.Macro.ND_alg;
106 import static smetana.core.Macro.ND_clust;
107 import static smetana.core.Macro.ND_coord;
108 import static smetana.core.Macro.ND_flat_out;
109 import static smetana.core.Macro.ND_ht;
110 import static smetana.core.Macro.ND_in;
111 import static smetana.core.Macro.ND_label;
112 import static smetana.core.Macro.ND_lw;
113 import static smetana.core.Macro.ND_mval;
114 import static smetana.core.Macro.ND_next;
115 import static smetana.core.Macro.ND_node_type;
116 import static smetana.core.Macro.ND_order;
117 import static smetana.core.Macro.ND_other;
118 import static smetana.core.Macro.ND_out;
119 import static smetana.core.Macro.ND_rank;
120 import static smetana.core.Macro.ND_rw;
121 import static smetana.core.Macro.NOT;
122 import static smetana.core.Macro.NOTI;
123 import static smetana.core.Macro.ROUND;
124 import static smetana.core.Macro.UNSUPPORTED;
125 import h.ST_Agedge_s;
126 import h.ST_Agedgeinfo_t;
127 import h.ST_Agedgepair_s;
128 import h.ST_Agnode_s;
129 import h.ST_Agraph_s;
130 import h.ST_Ppoly_t;
131 import h.ST_bezier;
132 import h.ST_boxf;
133 import h.ST_path;
134 import h.ST_pathend_t;
135 import h.ST_pointf;
136 import h.ST_port;
137 import h.ST_rank_t;
138 import h.ST_spline_info_t;
139 import h.ST_splines;
140 import h.attr_state_t;
141 import smetana.core.Memory;
142 import smetana.core.Z;
143 import smetana.core.__ptr__;
144
145 public class dotsplines__c {
146 //1 2digov3edok6d5srhgtlmrycs
147 // extern lt_symlist_t lt_preloaded_symbols[]
148
149
150 //1 baedz5i9est5csw3epz3cv7z
151 // typedef Ppoly_t Ppolyline_t
152
153
154 //1 9k44uhd5foylaeoekf3llonjq
155 // extern Dtmethod_t* Dtset
156
157
158 //1 1ahfywsmzcpcig2oxm7pt9ihj
159 // extern Dtmethod_t* Dtbag
160
161
162 //1 anhghfj3k7dmkudy2n7rvt31v
163 // extern Dtmethod_t* Dtoset
164
165
166 //1 5l6oj1ux946zjwvir94ykejbc
167 // extern Dtmethod_t* Dtobag
168
169
170 //1 2wtf222ak6cui8cfjnw6w377z
171 // extern Dtmethod_t* Dtlist
172
173
174 //1 d1s1s6ibtcsmst88e3057u9r7
175 // extern Dtmethod_t* Dtstack
176
177
178 //1 axa7mflo824p6fspjn1rdk0mt
179 // extern Dtmethod_t* Dtqueue
180
181
182 //1 ega812utobm4xx9oa9w9ayij6
183 // extern Dtmethod_t* Dtdeque
184
185
186 //1 cyfr996ur43045jv1tjbelzmj
187 // extern Dtmethod_t* Dtorder
188
189
190 //1 wlofoiftbjgrrabzb2brkycg
191 // extern Dtmethod_t* Dttree
192
193
194 //1 12bds94t7voj7ulwpcvgf6agr
195 // extern Dtmethod_t* Dthash
196
197
198 //1 9lqknzty480cy7zsubmabkk8h
199 // extern Dtmethod_t _Dttree
200
201
202 //1 bvn6zkbcp8vjdhkccqo1xrkrb
203 // extern Dtmethod_t _Dthash
204
205
206 //1 9lidhtd6nsmmv3e7vjv9e10gw
207 // extern Dtmethod_t _Dtlist
208
209
210 //1 34ujfamjxo7xn89u90oh2k6f8
211 // extern Dtmethod_t _Dtqueue
212
213
214 //1 3jy4aceckzkdv950h89p4wjc8
215 // extern Dtmethod_t _Dtstack
216
217
218 //1 8dfqgf3u1v830qzcjqh9o8ha7
219 // extern Agmemdisc_t AgMemDisc
220
221
222 //1 18k2oh2t6llfsdc5x0wlcnby8
223 // extern Agiddisc_t AgIdDisc
224
225
226 //1 a4r7hi80gdxtsv4hdoqpyiivn
227 // extern Agiodisc_t AgIoDisc
228
229
230 //1 bnzt5syjb7mgeru19114vd6xx
231 // extern Agdisc_t AgDefaultDisc
232
233
234 //1 35y2gbegsdjilegaribes00mg
235 // extern Agdesc_t Agdirected, Agstrictdirected, Agundirected, Agstrictundirected
236
237
238 //1 c2rygslq6bcuka3awmvy2b3ow
239 // typedef Agsubnode_t Agnoderef_t
240
241
242 //1 xam6yv0dcsx57dtg44igpbzn
243 // typedef Dtlink_t Agedgeref_t
244
245
246 //1 nye6dsi1twkbddwo9iffca1j
247 // extern char *Version
248
249
250 //1 65mu6k7h7lb7bx14jpiw7iyxr
251 // extern char **Files
252
253
254 //1 2rpjdzsdyrvomf00zcs3u3dyn
255 // extern const char **Lib
256
257
258 //1 6d2f111lntd2rsdt4gswh5909
259 // extern char *CmdName
260
261
262 //1 a0ltq04fpeg83soa05a2fkwb2
263 // extern char *specificFlags
264
265
266 //1 1uv30qeqq2jh6uznlr4dziv0y
267 // extern char *specificItems
268
269
270 //1 7i4hkvngxe3x7lmg5h6b3t9g3
271 // extern char *Gvfilepath
272
273
274 //1 9jp96pa73kseya3w6sulxzok6
275 // extern char *Gvimagepath
276
277
278 //1 40ylumfu7mrvawwf4v2asvtwk
279 // extern unsigned char Verbose
280
281
282 //1 93st8awjy1z0h07n28qycbaka
283 // extern unsigned char Reduce
284
285
286 //1 f2vs67ts992erf8onwfglurzp
287 // extern int MemTest
288
289
290 //1 c6f8whijgjwwagjigmxlwz3gb
291 // extern char *HTTPServerEnVar
292
293
294 //1 cp4hzj7p87m7arw776d3bt7aj
295 // extern char *Output_file_name
296
297
298 //1 a3rqagofsgraie6mx0krzkgsy
299 // extern int graphviz_errors
300
301
302 //1 5up05203r4kxvjn1m4njcgq5x
303 // extern int Nop
304
305
306 //1 umig46cco431x14b3kosde2t
307 // extern double PSinputscale
308
309
310 //1 52bj6v8fqz39khasobljfukk9
311 // extern int Syntax_errors
312
313
314 //1 9ekf2ina8fsjj6y6i0an6somj
315 // extern int Show_cnt
316
317
318 //1 38di5qi3nkxkq65onyvconk3r
319 // extern char** Show_boxes
320
321
322 //1 6ri6iu712m8mpc7t2670etpcw
323 // extern int CL_type
324
325
326 //1 bomxiw3gy0cgd1ydqtek7fpxr
327 // extern unsigned char Concentrate
328
329
330 //1 cqy3gqgcq8empdrbnrhn84058
331 // extern double Epsilon
332
333
334 //1 64slegfoouqeg0rmbyjrm8wgr
335 // extern int MaxIter
336
337
338 //1 88wdinpnmfs4mab4aw62yb0bg
339 // extern int Ndim
340
341
342 //1 8bbad3ogcelqnnvo5br5s05gq
343 // extern int State
344
345
346 //1 17rnd8q45zclfn68qqst2vxxn
347 // extern int EdgeLabelsDone
348
349
350 //1 ymx1z4s8cznjifl2d9f9m8jr
351 // extern double Initial_dist
352
353
354 //1 a33bgl0c3uqb3trx419qulj1x
355 // extern double Damping
356
357
358 //1 d9lvrpjg1r0ojv40pod1xwk8n
359 // extern int Y_invert
360
361
362 //1 71efkfs77q5tq9ex6y0f4kanh
363 // extern int GvExitOnUsage
364
365
366 //1 4xy2dkdkv0acs2ue9eca8hh2e
367 // 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
368
369
370 //1 9js5gxgzr74eakgtfhnbws3t9
371 // 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
372
373
374 //1 anqllp9sj7wo45w6bm11j8trn
375 // 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
376
377
378 //1 bh0z9puipqw7gymjd5h5b8s6i
379 // extern struct fdpParms_s* fdp_parms
380
381
382
383
384 //3 ciez0pfggxdljedzsbklq49f0
385 // static inline point pointof(int x, int y)
386 public static Object pointof(Object... arg) {
387 UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); // static inline point pointof(int x, int y)
388 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
389 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
390 UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); // r.x = x;
391 UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); // r.y = y;
392 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
393 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
394
395 throw new UnsupportedOperationException();
396 }
397
398
399
400
401 //3 c1s4k85p1cdfn176o3uryeros
402 // static inline pointf pointfof(double x, double y)
403 public static ST_pointf pointfof(double x, double y) {
404 // WARNING!! STRUCT
405 return pointfof_w_(x, y).copy();
406 }
407 private static ST_pointf pointfof_w_(double x, double y) {
408 ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
409 try {
410 final ST_pointf r = new ST_pointf();
411 r.setDouble("x", x);
412 r.setDouble("y", y);
413 return r;
414 } finally {
415 LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof");
416 }
417 }
418
419
420
421
422 //3 7cufnfitrh935ew093mw0i4b7
423 // static inline box boxof(int llx, int lly, int urx, int ury)
424 public static Object boxof(Object... arg) {
425 UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); // static inline box boxof(int llx, int lly, int urx, int ury)
426 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
427 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
428 UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); // b.LL.x = llx, b.LL.y = lly;
429 UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); // b.UR.x = urx, b.UR.y = ury;
430 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
431 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
432
433 throw new UnsupportedOperationException();
434 }
435
436
437
438
439 //3 1vvsta5i8of59frav6uymguav
440 // static inline boxf boxfof(double llx, double lly, double urx, double ury)
441 public static ST_boxf boxfof(double llx, double lly, double urx, double ury) {
442 // WARNING!! STRUCT
443 return boxfof_w_(llx, lly, urx, ury).copy();
444 }
445 private static ST_boxf boxfof_w_(double llx, double lly, double urx, double ury) {
446 ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
447 try {
448 final ST_boxf b = new ST_boxf();
449 b.LL.x = llx;
450 b.LL.y = lly;
451 b.UR.x = urx;
452 b.UR.y = ury;
453 return b;
454 } finally {
455 LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
456 }
457 }
458
459
460
461
462 //3 1n5xl70wxuabyf97mclvilsm6
463 // static inline point add_point(point p, point q)
464 public static Object add_point(Object... arg) {
465 UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); // static inline point add_point(point p, point q)
466 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
467 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
468 UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); // r.x = p.x + q.x;
469 UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); // r.y = p.y + q.y;
470 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
471 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
472
473 throw new UnsupportedOperationException();
474 }
475
476
477
478
479 //3 arrsbik9b5tnfcbzsm8gr2chx
480 // static inline pointf add_pointf(pointf p, pointf q)
481 public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) {
482 // WARNING!! STRUCT
483 return add_pointf_w_(p.copy(), q.copy()).copy();
484 }
485 private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) {
486 ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
487 try {
488 final ST_pointf r = new ST_pointf();
489 r.setDouble("x", p.x + q.x);
490 r.setDouble("y", p.y + q.y);
491 return r;
492 } finally {
493 LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
494 }
495 }
496
497
498
499
500 //3 ai2dprak5y6obdsflguh5qbd7
501 // static inline point sub_point(point p, point q)
502 public static Object sub_point(Object... arg) {
503 UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); // static inline point sub_point(point p, point q)
504 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
505 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
506 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
507 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
508 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
509 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
510
511 throw new UnsupportedOperationException();
512 }
513
514
515
516
517 //3 16f6pyogcv3j7n2p0n8giqqgh
518 // static inline pointf sub_pointf(pointf p, pointf q)
519 public static Object sub_pointf(Object... arg) {
520 UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); // static inline pointf sub_pointf(pointf p, pointf q)
521 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
522 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
523 UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); // r.x = p.x - q.x;
524 UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); // r.y = p.y - q.y;
525 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
526 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
527
528 throw new UnsupportedOperationException();
529 }
530
531
532
533
534 //3 9k50jgrhc4f9824vf8ony74rw
535 // static inline point mid_point(point p, point q)
536 public static Object mid_point(Object... arg) {
537 UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); // static inline point mid_point(point p, point q)
538 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
539 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
540 UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); // r.x = (p.x + q.x) / 2;
541 UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); // r.y = (p.y + q.y) / 2;
542 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
543 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
544
545 throw new UnsupportedOperationException();
546 }
547
548
549
550
551 //3 59c4f7im0ftyowhnzzq2v9o1x
552 // static inline pointf mid_pointf(pointf p, pointf q)
553 public static Object mid_pointf(Object... arg) {
554 UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); // static inline pointf mid_pointf(pointf p, pointf q)
555 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
556 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
557 UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); // r.x = (p.x + q.x) / 2.;
558 UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); // r.y = (p.y + q.y) / 2.;
559 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
560 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
561
562 throw new UnsupportedOperationException();
563 }
564
565
566
567
568 //3 5r18p38gisvcx3zsvbb9saixx
569 // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
570 public static Object interpolate_pointf(Object... arg) {
571 UNSUPPORTED("894yimn33kmtm454llwdaotu8"); // static inline pointf interpolate_pointf(double t, pointf p, pointf q)
572 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
573 UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); // pointf r;
574 UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); // r.x = p.x + t * (q.x - p.x);
575 UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); // r.y = p.y + t * (q.y - p.y);
576 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
577 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
578
579 throw new UnsupportedOperationException();
580 }
581
582
583
584
585 //3 bxzrv2ghq04qk5cbyy68s4mol
586 // static inline point exch_xy(point p)
587 public static Object exch_xy(Object... arg) {
588 UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); // static inline point exch_xy(point p)
589 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
590 UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); // point r;
591 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
592 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
593 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
594 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
595
596 throw new UnsupportedOperationException();
597 }
598
599
600
601
602 //3 9lt3e03tac6h6sydljrcws8fd
603 // static inline pointf exch_xyf(pointf p)
604 public static Object exch_xyf(Object... arg) {
605 UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); // static inline pointf exch_xyf(pointf p)
606 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
607 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
608 UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); // r.x = p.y;
609 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
610 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
611 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
612
613 throw new UnsupportedOperationException();
614 }
615
616
617
618
619 //3 8l9qhieokthntzdorlu5zn29b
620 // static inline box box_bb(box b0, box b1)
621 public static Object box_bb(Object... arg) {
622 UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); // static inline box box_bb(box b0, box b1)
623 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
624 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
625 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
626 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
627 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
628 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
629 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
630 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
631
632 throw new UnsupportedOperationException();
633 }
634
635
636
637
638 //3 clws9h3bbjm0lw3hexf8nl4c4
639 // static inline boxf boxf_bb(boxf b0, boxf b1)
640 public static Object boxf_bb(Object... arg) {
641 UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); // static inline boxf boxf_bb(boxf b0, boxf b1)
642 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
643 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
644 UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); // b.LL.x = MIN(b0.LL.x, b1.LL.x);
645 UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); // b.LL.y = MIN(b0.LL.y, b1.LL.y);
646 UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); // b.UR.x = MAX(b0.UR.x, b1.UR.x);
647 UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); // b.UR.y = MAX(b0.UR.y, b1.UR.y);
648 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
649 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
650
651 throw new UnsupportedOperationException();
652 }
653
654
655
656
657 //3 bit6ycxo1iqd2al92y8gkzlvb
658 // static inline box box_intersect(box b0, box b1)
659 public static Object box_intersect(Object... arg) {
660 UNSUPPORTED("34gv28cldst09bl71itjgviue"); // static inline box box_intersect(box b0, box b1)
661 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
662 UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); // box b;
663 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
664 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
665 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
666 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
667 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
668 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
669
670 throw new UnsupportedOperationException();
671 }
672
673
674
675
676 //3 8gfybie7k6pgb3o1a6llgpwng
677 // static inline boxf boxf_intersect(boxf b0, boxf b1)
678 public static Object boxf_intersect(Object... arg) {
679 UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); // static inline boxf boxf_intersect(boxf b0, boxf b1)
680 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
681 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
682 UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); // b.LL.x = MAX(b0.LL.x, b1.LL.x);
683 UNSUPPORTED("3uv943c2f82yuif249pf5azob"); // b.LL.y = MAX(b0.LL.y, b1.LL.y);
684 UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); // b.UR.x = MIN(b0.UR.x, b1.UR.x);
685 UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); // b.UR.y = MIN(b0.UR.y, b1.UR.y);
686 UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); // return b;
687 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
688
689 throw new UnsupportedOperationException();
690 }
691
692
693
694
695 //3 7z8j2quq65govaaejrz7b4cvb
696 // static inline int box_overlap(box b0, box b1)
697 public static Object box_overlap(Object... arg) {
698 UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); // static inline int box_overlap(box b0, box b1)
699 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
700 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
701 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
702
703 throw new UnsupportedOperationException();
704 }
705
706
707
708
709 //3 4z0suuut2acsay5m8mg9dqjdu
710 // static inline int boxf_overlap(boxf b0, boxf b1)
711 public static Object boxf_overlap(Object... arg) {
712 UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); // static inline int boxf_overlap(boxf b0, boxf b1)
713 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
714 UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); // return OVERLAP(b0, b1);
715 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
716
717 throw new UnsupportedOperationException();
718 }
719
720
721
722
723 //3 dd34swz5rmdgu3a2np2a4h1dy
724 // static inline int box_contains(box b0, box b1)
725 public static Object box_contains(Object... arg) {
726 UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); // static inline int box_contains(box b0, box b1)
727 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
728 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
729 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
730
731 throw new UnsupportedOperationException();
732 }
733
734
735
736
737 //3 8laj1bspbu2i1cjd9upr7xt32
738 // static inline int boxf_contains(boxf b0, boxf b1)
739 public static Object boxf_contains(Object... arg) {
740 UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); // static inline int boxf_contains(boxf b0, boxf b1)
741 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
742 UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); // return CONTAINS(b0, b1);
743 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
744
745 throw new UnsupportedOperationException();
746 }
747
748
749
750
751 //3 4wf5swkz24xx51ja2dynbycu1
752 // static inline pointf perp (pointf p)
753 public static Object perp(Object... arg) {
754 UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); // static inline pointf perp (pointf p)
755 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
756 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
757 UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); // r.x = -p.y;
758 UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); // r.y = p.x;
759 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
760 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
761
762 throw new UnsupportedOperationException();
763 }
764
765
766
767
768 //3 6dtlpzv4mvgzb9o0b252yweuv
769 // static inline pointf scale (double c, pointf p)
770 public static Object scale(Object... arg) {
771 UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); // static inline pointf scale (double c, pointf p)
772 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
773 UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); // pointf r;
774 UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); // r.x = c * p.x;
775 UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); // r.y = c * p.y;
776 UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); // return r;
777 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
778
779 throw new UnsupportedOperationException();
780 }
781
782
783 //1 8vvgiozsykdn0hhbvaem6lifn
784 // static boxf boxes[1000]
785 //private static __array_of_struct__ boxes = __array_of_struct__.malloc(boxf.class, 1000);
786
787
788
789 //3 dobhmc46zwtvv8rg3ywntl91j
790 // static edge_t* getmainedge(edge_t * e)
791 public static ST_Agedge_s getmainedge(ST_Agedge_s e) {
792 ENTERING("dobhmc46zwtvv8rg3ywntl91j","getmainedge");
793 try {
794 ST_Agedge_s le = e;
795 while (ED_to_virt(le)!=null)
796 le = ED_to_virt(le);
797 while (ED_to_orig(le)!=null)
798 le = ED_to_orig(le);
799 return le;
800 } finally {
801 LEAVING("dobhmc46zwtvv8rg3ywntl91j","getmainedge");
802 }
803 }
804
805
806
807
808 //3 ddeny5ht7w8b16ztj5zt840ld
809 // static boolean spline_merge(node_t * n)
810 public static boolean spline_merge(ST_Agnode_s n) {
811 ENTERING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
812 try {
813 return ((ND_node_type(n) == 1)
814 && ((ND_in(n).size > 1) || (ND_out(n).size > 1)));
815 } finally {
816 LEAVING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
817 }
818 }
819
820
821
822
823 //3 36ofw2qfqlh5ci8gc8cfkqgg3
824 // static boolean swap_ends_p(edge_t * e)
825 public static boolean swap_ends_p(ST_Agedge_s e) {
826 ENTERING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p");
827 try {
828 while (ED_to_orig(e)!=null)
829 e = ED_to_orig(e);
830 if (ND_rank(aghead(e)) > ND_rank(agtail(e)))
831 return false;
832 if (ND_rank(aghead(e)) < ND_rank(agtail(e)))
833 return NOT(false);
834 if (ND_order(aghead(e)) >= ND_order(agtail(e)))
835 return false;
836 return NOT(false);
837 } finally {
838 LEAVING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p");
839 }
840 }
841
842
843 //1 300wnvw9sndobgke752j9u139
844 // static splineInfo sinfo =
845 /*static final __struct__<splineInfo> sinfo = JUtils.from(splineInfo.class);
846 static {
847 sinfo.setPtr("swapEnds", function(dotsplines__c.class, "swap_ends_p"));
848 sinfo.setPtr("splineMerge", function(dotsplines__c.class, "spline_merge"));
849 }*/
850
851
852
853
854 //3 3krohso3quojiv4fveh1en7o6
855 // int portcmp(port p0, port p1)
856 public static int portcmp(final ST_port p0, final ST_port p1) {
857 // WARNING!! STRUCT
858 return portcmp_w_(p0.copy(), p1.copy());
859 }
860 private static int portcmp_w_(final ST_port p0, final ST_port p1) {
861 ENTERING("3krohso3quojiv4fveh1en7o6","portcmp");
862 try {
863 int rv;
864 if (p1.defined == 0)
865 return (p0.defined!=0 ? 1 : 0);
866 if (p0.defined == 0)
867 return -1;
868 rv = (int) (p0.p.x - p1.p.x);
869 if (rv == 0)
870 rv = (int) (p0.p.y - p1.p.y);
871 return rv;
872 } finally {
873 LEAVING("3krohso3quojiv4fveh1en7o6","portcmp");
874 }
875 }
876
877
878
879
880 //3 10wbtt4gwnxgqutinpj4ymjpk
881 // static void swap_bezier(bezier * old, bezier * new)
882 public static void swap_bezier(ST_bezier.Array2 old, ST_bezier.Array2 new_) {
883 ENTERING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier");
884 try {
885 ST_pointf.Array list;
886 ST_pointf.Array lp;
887 ST_pointf.Array olp;
888 int i, sz;
889 sz = old.getStruct().size;
890 list = new ST_pointf.Array(sz);
891 lp = list;
892 olp = old.getStruct().list.plus(sz - 1);
893 for (i = 0; i < sz; i++) { /* reverse list of points */
894 lp.getStruct().___(olp.getStruct());
895 lp=lp.plus(1);
896 olp=olp.plus(-1);
897 }
898 new_.setPtr("list", list);
899 new_.setInt("size", sz);
900 new_.setInt("sflag", old.getStruct().eflag);
901 new_.setInt("eflag", old.getStruct().sflag);
902 new_.setStruct("sp", old.getStruct().ep);
903 new_.setStruct("ep", old.getStruct().sp);
904 } finally {
905 LEAVING("10wbtt4gwnxgqutinpj4ymjpk","swap_bezier");
906 }
907 }
908
909
910
911
912 //3 3256l3e2huarsy29dd97vqj85
913 // static void swap_spline(splines * s)
914 public static void swap_spline(ST_splines s) {
915 ENTERING("3256l3e2huarsy29dd97vqj85","swap_spline");
916 try {
917 ST_bezier.Array2 list;
918 ST_bezier.Array2 lp;
919 ST_bezier.Array2 olp;
920 int i, sz;
921 sz = s.size;
922 list = new ST_bezier.Array2(sz);
923 lp = list;
924 olp = s.list.plus(sz - 1);
925 for (i = 0; i < sz; i++) { /* reverse and swap list of beziers */
926 swap_bezier(olp, lp);
927 olp = olp.plus(-1);
928 lp = lp.plus(1);
929 }
930 /* free old structures */
931 for (i = 0; i < sz; i++)
932 Memory.free(((ST_bezier)s.list.get(i)).getPtr().list);
933 Memory.free(s.list);
934 s.list = (ST_bezier.Array2) list;
935 } finally {
936 LEAVING("3256l3e2huarsy29dd97vqj85","swap_spline");
937 }
938 }
939
940
941
942
943 //3 dgkssqjj566ifra0xy7m46qsb
944 // static void edge_normalize(graph_t * g)
945 public static void edge_normalize(ST_Agraph_s g) {
946 ENTERING("dgkssqjj566ifra0xy7m46qsb","edge_normalize");
947 try {
948 ST_Agedge_s e;
949 ST_Agnode_s n;
950 for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
951 for (e = agfstout(g, n); e!=null; e = agnxtout(g, e)) {
952 if ((Boolean)Z.z().sinfo.swapEnds.exe(e) && ED_spl(e)!=null)
953 swap_spline(ED_spl(e));
954 }
955 }
956 } finally {
957 LEAVING("dgkssqjj566ifra0xy7m46qsb","edge_normalize");
958 }
959 }
960
961
962
963
964 //3 bwzdgdea9suuagzueyw8ztx42
965 // static void resetRW (graph_t * g)
966 public static Object resetRW(Object... arg) {
967 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
968 UNSUPPORTED("c4vqsmfolc1meewxoebfkyppx"); // resetRW (graph_t * g)
969 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
970 UNSUPPORTED("7ma9kdgag30w5ofv1niitxbro"); // node_t* n;
971 UNSUPPORTED("7wq24g054kmx3aw25vk5ksj4"); // for (n = agfstnode(g); n; n = agnxtnode(g,n)) {
972 UNSUPPORTED("b83f20tdode2lz5a49mhmn9ei"); // if (ND_other(n).list) {
973 UNSUPPORTED("ez6pf4w4vi7z6fqq43v5i3gpv"); // double tmp = ND_rw(n);
974 UNSUPPORTED("24qsh566odunv14qzj2zan7bz"); // ND_rw(n) = ND_mval(n);
975 UNSUPPORTED("cgxuqwflawrd9e6dmnsh3sbwa"); // ND_mval(n) = tmp;
976 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
977 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
978 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
979
980 throw new UnsupportedOperationException();
981 }
982
983
984
985
986 //3 9co1bgu5603fx30juwb01faf
987 // static void setEdgeLabelPos (graph_t * g)
988 public static Object setEdgeLabelPos(Object... arg) {
989 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
990 UNSUPPORTED("7y94r9t4hf6d0ltbie4f323al"); // setEdgeLabelPos (graph_t * g)
991 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
992 UNSUPPORTED("7ma9kdgag30w5ofv1niitxbro"); // node_t* n;
993 UNSUPPORTED("1o9j4rz3dizwsgefis1axd6uw"); // textlabel_t* l;
994 UNSUPPORTED("cbzhyr6lytrowd5gxn3tg000a"); // /* place regular edge labels */
995 UNSUPPORTED("8g62mxpap4eeua2lkn9a1iosi"); // for (n = GD_nlist(g); n; n = ND_next(n)) {
996 UNSUPPORTED("53rvntgqit26uu0ydhawavshp"); // if (ND_node_type(n) == 1) {
997 UNSUPPORTED("7sijld2wh9ulkpkumhl6dqqaj"); // if (ND_alg(n)) { // label of non-adjacent flat edge
998 UNSUPPORTED("5ccfgna84rl1jtgmuk8nbffqy"); // edge_t* fe = (edge_t*)ND_alg(n);
999 UNSUPPORTED("8rofnso8jnaa77ukvfpwruvyx"); // assert ((l = ED_label(fe)));
1000 UNSUPPORTED("ak1kh1v4u9s5kof1svwbc6ssr"); // l->pos = ND_coord(n);
1001 UNSUPPORTED("9ehteylkrnipypq5s9c6jjm67"); // l->set = NOT(0);
1002 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1003 UNSUPPORTED("15c8rehrm31gtqtwrj9r863k5"); // else if ((l = ND_label(n))) {// label of regular edge
1004 UNSUPPORTED("3i64wd6mr21h7x0hadumabd5r"); // place_vnlabel(n);
1005 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1006 UNSUPPORTED("mlknwb70zhu4paqbncp6enq9"); // if (l) updateBB(g, l);
1007 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1008 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1009 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1010
1011 throw new UnsupportedOperationException();
1012 }
1013
1014
1015
1016
1017 //3 6agx6m2qof9lg57co232lwakj
1018 // static void _dot_splines(graph_t * g, int normalize)
1019 static void _dot_splines(ST_Agraph_s g, int normalize)
1020 {
1021 ENTERING("6agx6m2qof9lg57co232lwakj","_dot_splines");
1022 try {
1023 int i, j, k, n_nodes, n_edges, ind, cnt;
1024 ST_Agnode_s n;
1025 final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t();
1026 final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s();
1027 ST_Agedge_s e, e0, e1, ea, eb, le0, le1;
1028 ST_Agedge_s.ArrayOfStar edges;
1029 ST_path P;
1030 final ST_spline_info_t sd = new ST_spline_info_t();
1031 int et = (GD_flags(g) & (7 << 1));
1032 fwdedgea.out.base.setPtr("data", fwdedgeai);
1033 fwdedgeb.out.base.setPtr("data", fwdedgebi);
1034 if (et == (0 << 1)) return;
1035 if (et == (2 << 1)) {
1036 resetRW (g);
1037 if ((GD_has_labels(g) & (1 << 0))!=0) {
1038 UNSUPPORTED("4k888z8ymdp2b653twxc1ugbu"); // agerr (AGWARN, "edge labels with splines=curved not supported in dot - use xlabels\n");
1039 }
1040 for (n = agfstnode (g); n!=null; n = agnxtnode(g, n)) {
1041 for (e = agfstout(g, n); e!=null; e = agnxtout(g,e)) {
1042 makeStraightEdge(g, e, et, Z.z().sinfo);
1043 }
1044 }
1045 UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
1046 }
1047 mark_lowclusters(g);
1048 if (routesplinesinit()!=0) return;
1049 P = (ST_path) zmalloc(sizeof(ST_path.class));
1050 /* FlatHeight = 2 * GD_nodesep(g); */
1051 sd.setInt("Splinesep", GD_nodesep(g) / 4);
1052 sd.setInt("Multisep", GD_nodesep(g));
1053 edges = new ST_Agedge_s.ArrayOfStar(128);
1054 /* compute boundaries and list of splines */
1055 sd.setInt("RightBound", 0);
1056 sd.setInt("LeftBound", 0);
1057 n_edges = n_nodes = 0;
1058 for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
1059 n_nodes += GD_rank(g).get(i).n;
1060 if ((n = (ST_Agnode_s) GD_rank(g).get(i).v.get(0))!=null)
1061 sd.setInt("LeftBound", (int)MIN(sd.LeftBound, (ND_coord(n).x - ND_lw(n))));
1062 if (GD_rank(g).get(i).n!=0 && (n = (ST_Agnode_s) GD_rank(g).get(i).v.plus(GD_rank(g).get(i).n - 1).getPtr())!=null)
1063 sd.setInt("RightBound", (int)MAX(sd.RightBound, (ND_coord(n).x + ND_rw(n))));
1064 sd.setInt("LeftBound", sd.LeftBound - 16);
1065 sd.setInt("RightBound", sd.RightBound + 16);
1066 for (j = 0; j < GD_rank(g).get(i).n; j++) {
1067 n = (ST_Agnode_s) GD_rank(g).get(i).v.get(j);
1068 /* if n is the label of a flat edge, copy its position to
1069 * the label.
1070 */
1071 if (ND_alg(n)!=null) {
1072 ST_Agedge_s fe = (ST_Agedge_s) ND_alg(n);
1073 assert (ED_label(fe)!=null);
1074 ED_label(fe).setStruct("pos", ND_coord(n));
1075 ED_label(fe).set= NOTI(false);
1076 }
1077 if ((ND_node_type(n) != 0) &&
1078 ((Boolean)Z.z().sinfo.splineMerge.exe(n) == false))
1079 continue;
1080 for (k = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(k))!=null; k++) {
1081 if ((ED_edge_type(e) == 4)
1082 || (ED_edge_type(e) == 6))
1083 continue;
1084 setflags(e, 1, 16, 64);
1085 edges.plus(n_edges++).setPtr(e);
1086 if (n_edges % 128 == 0)
1087 edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
1088 }
1089 if (ND_flat_out(n).listNotNull())
1090 for (k = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(k))!=null; k++) {
1091 setflags(e, 2, 0, 128);
1092 edges.plus(n_edges++).setPtr(e);
1093 if (n_edges % 128 == 0)
1094 edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
1095 }
1096 if (ND_other(n).listNotNull()) {
1097 /* In position, each node has its rw stored in mval and,
1098 * if a node is part of a loop, rw may be increased to
1099 * reflect the loops and associated labels. We restore
1100 * the original value here.
1101 */
1102 if (ND_node_type(n) == 0) {
1103 double tmp = ND_rw(n);
1104 ND_rw(n, ND_mval(n));
1105 ND_mval(n, tmp);
1106 }
1107 for (k = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(k))!=null; k++) {
1108 setflags(e, 0, 0, 128);
1109 edges.plus(n_edges++).setPtr(e);
1110 if (n_edges % 128 == 0)
1111 edges = ALLOC_allocated_ST_Agedge_s (edges, n_edges + 128);
1112 }
1113 }
1114 }
1115 }
1116 /* Sort so that equivalent edges are contiguous.
1117 * Equivalence should basically mean that 2 edges have the
1118 * same set {(tailnode,tailport),(headnode,headport)}, or
1119 * alternatively, the edges would be routed identically if
1120 * routed separately.
1121 */
1122 LOG2("_dot_splines::n_edges="+n_edges);
1123 qsort(edges,
1124 n_edges,
1125 function(dotsplines__c.class, "edgecmp"));
1126 /* FIXME: just how many boxes can there be? */
1127 P.boxes = ST_boxf.malloc(n_nodes + 20 * 2 * 9);
1128 sd.Rank_box = ST_boxf.malloc(i);
1129 if (et == (1 << 1)) {
1130 /* place regular edge labels */
1131 for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
1132 if ((ND_node_type(n) == 1) && (ND_label(n)!=null)) {
1133 place_vnlabel(n);
1134 }
1135 }
1136 }
1137 for (i = 0; i < n_edges;) {
1138 boolean havePorts;
1139 ind = i;
1140 le0 = getmainedge((e0 = (ST_Agedge_s) edges.plus(i++).getPtr()));
1141 if (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) {
1142 havePorts = NOT(false);
1143 ea = e0;
1144 } else {
1145 havePorts = false;
1146 ea = le0;
1147 }
1148 if ((ED_tree_index(ea) & 32)!=0) {
1149 MAKEFWDEDGE(fwdedgea.out, ea);
1150 ea = (ST_Agedge_s) fwdedgea.out;
1151 }
1152 for (cnt = 1; i < n_edges; cnt++, i++) {
1153 if (NEQ(le0, (le1 = getmainedge((e1 = (ST_Agedge_s) edges.get(i))))))
1154 break;
1155 if (ED_adjacent(e0)!=0) continue; /* all flat adjacent edges at once */
1156 if (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) {
1157 if (N(havePorts)) break;
1158 else
1159 eb = e1;
1160 } else {
1161 if (havePorts) break;
1162 else
1163 eb = le1;
1164 }
1165 if ((ED_tree_index(eb) & 32)!=0) {
1166 MAKEFWDEDGE(fwdedgeb.out, eb);
1167 eb = (ST_Agedge_s) fwdedgeb.out;
1168 }
1169 if (portcmp(ED_tail_port(ea), ED_tail_port(eb))!=0)
1170 break;
1171 if (portcmp(ED_head_port(ea), ED_head_port(eb))!=0)
1172 break;
1173 if ((ED_tree_index(e0) & 15) == 2
1174 && NEQ(ED_label(e0), ED_label(e1)))
1175 break;
1176 if ((ED_tree_index(edges.get(i)) & 64)!=0) /* Aha! -C is on */
1177 break;
1178 }
1179 if (EQ(agtail(e0), aghead(e0))) {
1180 int b, sizey, r;
1181 n = agtail(e0);
1182 r = ND_rank(n);
1183 if (r == GD_maxrank(g)) {
1184 if (r > 0)
1185 sizey = (int) (ND_coord(GD_rank(g).get(r-1).v.get(0)).y - ND_coord(n).y);
1186 else
1187 sizey = (int) ND_ht(n);
1188 }
1189 else if (r == GD_minrank(g)) {
1190 sizey = (int)(ND_coord(n).y - ND_coord(GD_rank(g).get(r+1).v.get(0)).y);
1191 }
1192 else {
1193 int upy = (int) (ND_coord(GD_rank(g).get(r-1).v.get(0)).y - ND_coord(n).y);
1194 int dwny = (int) (ND_coord(n).y - ND_coord(GD_rank(g).get(r+1).v.get(0)).y);
1195 sizey = MIN(upy, dwny);
1196 }
1197 makeSelfEdge(P, edges, ind, cnt, sd.Multisep, sizey/2, Z.z().sinfo);
1198 for (b = 0; b < cnt; b++) {
1199 e = (ST_Agedge_s) edges.plus(ind+b).getPtr();
1200 if (ED_label(e)!=null)
1201 updateBB(g, ED_label(e));
1202 }
1203 }
1204 else if (ND_rank(agtail(e0)) == ND_rank(aghead(e0))) {
1205 make_flat_edge(g, sd, P, edges, ind, cnt, et);
1206 }
1207 else
1208 make_regular_edge(g, sd, P, edges, ind, cnt, et);
1209 }
1210 /* place regular edge labels */
1211 for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
1212 if ((ND_node_type(n) == 1) && (ND_label(n))!=null) {
1213 place_vnlabel(n);
1214 updateBB(g, ND_label(n));
1215 }
1216 }
1217 /* normalize splines so they always go from tail to head */
1218 /* place_portlabel relies on this being done first */
1219 if (normalize!=0)
1220 edge_normalize(g);
1221 finish :
1222 /* vladimir: place port labels */
1223 /* FIX: head and tail labels are not part of cluster bbox */
1224 if ((Z.z().E_headlabel!=null || Z.z().E_taillabel!=null) && (Z.z().E_labelangle!=null || Z.z().E_labeldistance!=null)) {
1225 UNSUPPORTED("attp4bsjqe99xnhi7lr7pszar"); // for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
1226 UNSUPPORTED("54jm4bbgzyl0txauszo1mappu"); // if (E_headlabel) {
1227 UNSUPPORTED("dw8yu56thd0wpolmtby8r5doo"); // for (e = agfstin(g, n); e; e = agnxtin(g, e))
1228 UNSUPPORTED("4h39n1vkqyqszgmg2o7d2pw7z"); // if (ED_head_label(AGMKOUT(e))) {
1229 UNSUPPORTED("ex7h0x60y0l4oi3dsqg7sfk1t"); // place_portlabel(AGMKOUT(e), NOT(0));
1230 UNSUPPORTED("9u960ou1xs0cdsdn0qe8a13ye"); // updateBB(g, ED_head_label(AGMKOUT(e)));
1231 UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // }
1232 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1233 UNSUPPORTED("cqi8doquf015wo1bw8on36qct"); // if (E_taillabel) {
1234 UNSUPPORTED("6gnq0yj07udpwxbuc86k8yysb"); // for (e = agfstout(g, n); e; e = agnxtout(g, e)) {
1235 UNSUPPORTED("ejz8yrj8mh0l0gdl5zeaht1ex"); // if (ED_tail_label(e)) {
1236 UNSUPPORTED("9pdg7peez077ldl84zfh73o1w"); // if (place_portlabel(e, 0))
1237 UNSUPPORTED("6jup6d9gfnx4b1wptmtw09n6w"); // updateBB(g, ED_tail_label(e));
1238 UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); // }
1239 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
1240 UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
1241 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1242 }
1243 /* end vladimir */
1244 if (et != (2 << 1)) {
1245 Memory.free(edges);
1246 Memory.free(P.boxes);
1247 Memory.free(P);
1248 Memory.free(sd.Rank_box);
1249 routesplinesterm();
1250 }
1251 Z.z().State = 1;
1252 Z.z().EdgeLabelsDone = 1;
1253 } finally {
1254 LEAVING("6agx6m2qof9lg57co232lwakj","_dot_splines");
1255 }
1256 }
1257
1258
1259
1260
1261 //3 5n306wbdfjbfnimdo9lg6jjaa
1262 // void dot_splines(graph_t * g)
1263 public static void dot_splines(ST_Agraph_s g) {
1264 ENTERING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines");
1265 try {
1266 _dot_splines (g, 1);
1267 } finally {
1268 LEAVING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines");
1269 }
1270 }
1271
1272
1273
1274
1275 //3 8jja9ukzsq8tlb9yy7uzavg91
1276 // static void place_vnlabel(node_t * n)
1277 public static void place_vnlabel(ST_Agnode_s n) {
1278 ENTERING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
1279 try {
1280 final ST_pointf dimen = new ST_pointf();
1281 double width;
1282 ST_Agedge_s e;
1283 if (ND_in(n).size == 0)
1284 return; /* skip flat edge labels here */
1285 for (e = (ST_Agedge_s) ND_out(n).getFromList(0); ED_edge_type(e) != 0;
1286 e = ED_to_orig(e));
1287 dimen.___(ED_label(e).dimen);
1288 width = GD_flip(agraphof(n))!=0 ? dimen.y : dimen.x;
1289 ED_label(e).pos.setDouble("x", ND_coord(n).x + width / 2.0);
1290 ED_label(e).pos.setDouble("y", ND_coord(n).y);
1291 ED_label(e).set= NOTI(false);
1292 } finally {
1293 LEAVING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
1294 }
1295 }
1296
1297
1298
1299
1300 //3 598jn37hjkm7j0kcg2nmdvlwq
1301 // static void setflags(edge_t *e, int hint1, int hint2, int f3)
1302 public static void setflags(ST_Agedge_s e, int hint1, int hint2, int f3) {
1303 ENTERING("598jn37hjkm7j0kcg2nmdvlwq","setflags");
1304 try {
1305 int f1, f2;
1306 if (hint1 != 0)
1307 f1 = hint1;
1308 else {
1309 if (EQ(agtail(e), aghead(e)))
1310 if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0)
1311 f1 = 4;
1312 else
1313 f1 = 8;
1314 else if (ND_rank(agtail(e)) == ND_rank(aghead(e)))
1315 f1 = 2;
1316 else
1317 f1 = 1;
1318 }
1319 if (hint2 != 0)
1320 f2 = hint2;
1321 else {
1322 if (f1 == 1)
1323 f2 = (ND_rank(agtail(e)) < ND_rank(aghead(e))) ? 16 : 32;
1324 else if (f1 == 2)
1325 f2 = (ND_order(agtail(e)) < ND_order(aghead(e))) ? 16 : 32;
1326 else /* f1 == SELF*EDGE */
1327 f2 = 16;
1328 }
1329 ED_tree_index(e, (f1 | f2 | f3));
1330 } finally {
1331 LEAVING("598jn37hjkm7j0kcg2nmdvlwq","setflags");
1332 }
1333 }
1334
1335
1336
1337
1338 //3 1nf1s6wkn35ptjn884ii56fh
1339 // static int edgecmp(edge_t** ptr0, edge_t** ptr1)
1340 public static int edgecmp(__ptr__ ptr0, __ptr__ ptr1) {
1341 ENTERING("1nf1s6wkn35ptjn884ii56fh","edgecmp");
1342 try {
1343 final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t();
1344 final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s();
1345 ST_Agedge_s e0, e1, ea, eb, le0, le1;
1346 int et0, et1, v0, v1, rv;
1347 double t0, t1;
1348 fwdedgea.out.base.setPtr("data", fwdedgeai);
1349 fwdedgeb.out.base.setPtr("data", fwdedgebi);
1350 e0 = (ST_Agedge_s) ptr0.getPtr();
1351 e1 = (ST_Agedge_s) ptr1.getPtr();
1352 et0 = ED_tree_index(e0) & 15;
1353 et1 = ED_tree_index(e1) & 15;
1354 if (et0 != et1)
1355 return (et1 - et0);
1356 le0 = getmainedge(e0);
1357 le1 = getmainedge(e1);
1358 t0 = ND_rank(agtail(le0)) - ND_rank(aghead(le0));
1359 t1 = ND_rank(agtail(le1)) - ND_rank(aghead(le1));
1360 v0 = ABS((int)t0); /* ugly, but explicit as to how we avoid equality tests on fp numbers */
1361 v1 = ABS((int)t1);
1362 if (v0 != v1)
1363 return (v0 - v1);
1364 t0 = ND_coord(agtail(le0)).x - ND_coord(aghead(le0)).x;
1365 t1 = ND_coord(agtail(le1)).x - ND_coord(aghead(le1)).x;
1366 v0 = ABS((int)t0);
1367 v1 = ABS((int)t1);
1368 if (v0 != v1)
1369 return (v0 - v1);
1370 /* This provides a cheap test for edges having the same set of endpoints. */
1371 if (AGSEQ(le0) != AGSEQ(le1))
1372 return (AGSEQ(le0) - AGSEQ(le1));
1373 ea = (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) ? e0 : le0;
1374 if ((ED_tree_index(ea) & 32)!=0) {
1375 MAKEFWDEDGE(fwdedgea.out, ea);
1376 ea = (ST_Agedge_s) fwdedgea.out;
1377 }
1378 eb = (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) ? e1 : le1;
1379 if ((ED_tree_index(eb) & 32)!=0) {
1380 MAKEFWDEDGE(fwdedgeb.out, eb);
1381 eb = (ST_Agedge_s) fwdedgeb.out;
1382 }
1383 if ((rv = portcmp(ED_tail_port(ea), ED_tail_port(eb)))!=0)
1384 return rv;
1385 if ((rv = portcmp(ED_head_port(ea), ED_head_port(eb)))!=0)
1386 return rv;
1387 et0 = ED_tree_index(e0) & 192;
1388 et1 = ED_tree_index(e1) & 192;
1389 if (et0 != et1)
1390 return (et0 - et1);
1391 if (et0 == 2 && NEQ(ED_label(e0), ED_label(e1)))
1392 UNSUPPORTED("return (int) (ED_label(e0) - ED_label(e1))");
1393 return (AGSEQ(e0) - AGSEQ(e1));
1394 } finally {
1395 LEAVING("1nf1s6wkn35ptjn884ii56fh","edgecmp");
1396 }
1397 }
1398
1399
1400
1401
1402 //3 djq8tev8thshox7bob64vi0tf
1403 // static void setState (graph_t* auxg, attr_state_t* attr_state)
1404 public static Object setState(Object... arg) {
1405 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
1406 UNSUPPORTED("7ovh16jwyjc9wtu0rfxnlws9r"); // setState (graph_t* auxg, attr_state_t* attr_state)
1407 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1408 UNSUPPORTED("1ko3jd94xpoli03tk73ardy84"); // /* save state */
1409 UNSUPPORTED("3ibgalw3fchq736xx1ozbvh27"); // attr_state->E_constr = E_constr;
1410 UNSUPPORTED("e9yatqfh98i71w3v1jcx1agi9"); // attr_state->E_samehead = E_samehead;
1411 UNSUPPORTED("57rkvwknyk9urdhck24todttg"); // attr_state->E_sametail = E_sametail;
1412 UNSUPPORTED("4y5i0lqx0ze46l88ehzdh2x1z"); // attr_state->E_weight = E_weight;
1413 UNSUPPORTED("3yryq1e1hmam5hqciu93ywjj2"); // attr_state->E_minlen = E_minlen;
1414 UNSUPPORTED("1n91lxusirg2v758j4v9o9hcg"); // attr_state->E_fontcolor = E_fontcolor;
1415 UNSUPPORTED("1ssj9fq3o1sm21ggttj4r3mo0"); // attr_state->E_fontname = E_fontname;
1416 UNSUPPORTED("45ntpz46gx7j2hfu2r6ceescw"); // attr_state->E_fontsize = E_fontsize;
1417 UNSUPPORTED("6vxi0wxhhjg065ishw2vebsqv"); // attr_state->E_headclip = E_headclip;
1418 UNSUPPORTED("aqu557ovwt2k4j894b5p9dssa"); // attr_state->E_headlabel = E_headlabel;
1419 UNSUPPORTED("6shb2vynxxgck2x8e8oz63ye"); // attr_state->E_label = E_label;
1420 UNSUPPORTED("84eq22wy1zlxwofo8cwwbddbb"); // attr_state->E_label_float = E_label_float;
1421 UNSUPPORTED("czndn89byb90jujvx2sudb6d6"); // attr_state->E_labelfontcolor = E_labelfontcolor;
1422 UNSUPPORTED("385rz6p4kom75dmgvepqmxlrq"); // attr_state->E_labelfontname = E_labelfontname;
1423 UNSUPPORTED("397fs88n9xnlcqo4z8at7j66s"); // attr_state->E_labelfontsize = E_labelfontsize;
1424 UNSUPPORTED("f2nu6sif9lmukmlj2um7gnxns"); // attr_state->E_tailclip = E_tailclip;
1425 UNSUPPORTED("3ctu9gb3ojun885w9ymnch0er"); // attr_state->E_taillabel = E_taillabel;
1426 UNSUPPORTED("qiafl7ru9bq54qol6lov5rgm"); // attr_state->E_xlabel = E_xlabel;
1427 UNSUPPORTED("ap9hj5xd4dfmwws8egpgvk5ti"); // attr_state->N_height = N_height;
1428 UNSUPPORTED("ctvaloqgyn45in0jdkkvdpf6g"); // attr_state->N_width = N_width;
1429 UNSUPPORTED("75ey3ud905155tfmw9zapeawj"); // attr_state->N_shape = N_shape;
1430 UNSUPPORTED("19bnzpge8znnwzna8ub6otjze"); // attr_state->N_style = N_style;
1431 UNSUPPORTED("6242e8neunx553zs7jb52e2i3"); // attr_state->N_fontsize = N_fontsize;
1432 UNSUPPORTED("1rjcall3fixy49t0s4bcdgoho"); // attr_state->N_fontname = N_fontname;
1433 UNSUPPORTED("1bj2vtyz3gettntmktngyjv02"); // attr_state->N_fontcolor = N_fontcolor;
1434 UNSUPPORTED("1mj5q5f1eft9otmsuyiadl54z"); // attr_state->N_label = N_label;
1435 UNSUPPORTED("5lkkhmgpur2i2arkoxbpb8lse"); // attr_state->N_xlabel = N_xlabel;
1436 UNSUPPORTED("3c9tzymzuj2wkftyepa2epzur"); // attr_state->N_showboxes = N_showboxes;
1437 UNSUPPORTED("9urvz64idw6yth9938puegx1d"); // attr_state->N_ordering = N_ordering;
1438 UNSUPPORTED("9wqn3lttroloie8t4urgw9dwl"); // attr_state->N_sides = N_sides;
1439 UNSUPPORTED("7aovr97vmuic712quqt6n4gkd"); // attr_state->N_peripheries = N_peripheries;
1440 UNSUPPORTED("dc9knw1esnnr7j77so6k8zblk"); // attr_state->N_skew = N_skew;
1441 UNSUPPORTED("eoium8gqo2cgsjv87c20ixx5k"); // attr_state->N_orientation = N_orientation;
1442 UNSUPPORTED("aq6is6cduc5wvclu1hjacuyk0"); // attr_state->N_distortion = N_distortion;
1443 UNSUPPORTED("3w13k0cqxkk8gniu6ydy3qii6"); // attr_state->N_fixed = N_fixed;
1444 UNSUPPORTED("32p2drvqb6h9n0118du912gv0"); // attr_state->N_nojustify = N_nojustify;
1445 UNSUPPORTED("e2hsbuo1kd2fghtopje0lfp2b"); // attr_state->N_group = N_group;
1446 UNSUPPORTED("74w0uzukx3derbgpgi60dzyyg"); // attr_state->State = State;
1447 UNSUPPORTED("936fjorw02qiz50qpj7y6en2m"); // attr_state->G_ordering = G_ordering;
1448 UNSUPPORTED("2l0v2tecrgmws3to99rcimxzm"); // E_constr = NULL;
1449 UNSUPPORTED("93dfyiz6pxq59j6ujx97hdd0c"); // E_samehead = agattr(auxg,AGEDGE, "samehead", NULL);
1450 UNSUPPORTED("7kovxag1wgr874sgxwpz7ls6a"); // E_sametail = agattr(auxg,AGEDGE, "sametail", NULL);
1451 UNSUPPORTED("295z0g5v309fbrrdopfy66rf4"); // E_weight = agattr(auxg,AGEDGE, "weight", NULL);
1452 UNSUPPORTED("3uo53r92k5fuzy9gb2i1k7612"); // if (!E_weight)
1453 UNSUPPORTED("4oq1f4cnu0hk0xm34kx9m79le"); // E_weight = agattr (auxg,AGEDGE,"weight", "");
1454 UNSUPPORTED("aoqamti27wg8hvpyho5xmdc9"); // E_minlen = NULL;
1455 UNSUPPORTED("8jzaf5sdfgbpqx8y0squconvr"); // E_fontcolor = NULL;
1456 UNSUPPORTED("25csaeghkl1rd5cha609fm2vm"); // E_fontname = (agattr(auxg,AGEDGE,"fontname",NULL));
1457 UNSUPPORTED("d9ivs4hv5xdhsxwh8oz1dri02"); // E_fontsize = (agattr(auxg,AGEDGE,"fontsize",NULL));
1458 UNSUPPORTED("djpd3vd7suatk0n76mplhzog4"); // E_headclip = (agattr(auxg,AGEDGE,"headclip",NULL));
1459 UNSUPPORTED("8fy5jrgw22q72jvvjmqh6ajjb"); // E_headlabel = NULL;
1460 UNSUPPORTED("93a15wlfj0tmijeeyd1qb12v6"); // E_label = (agattr(auxg,AGEDGE,"label",NULL));
1461 UNSUPPORTED("2l6gmyi1pz4cv9i29k4u3mpjf"); // E_label_float = (agattr(auxg,AGEDGE,"label_float",NULL));
1462 UNSUPPORTED("dcp5qxpq37yer9cipch7q2oc4"); // E_labelfontcolor = NULL;
1463 UNSUPPORTED("133ni5qwdb96od0wcma7hj05h"); // E_labelfontname = (agattr(auxg,AGEDGE,"labelfontname",NULL));
1464 UNSUPPORTED("cq9n4kf29qgqy1ll6gandld7f"); // E_labelfontsize = (agattr(auxg,AGEDGE,"labelfontsize",NULL));
1465 UNSUPPORTED("2l9pqb0sug1sr8dlojy1gvik0"); // E_tailclip = (agattr(auxg,AGEDGE,"tailclip",NULL));
1466 UNSUPPORTED("9a173t42nyif5cx0ee6c4qos2"); // E_taillabel = NULL;
1467 UNSUPPORTED("pu58ta2e8cevjt84brxtyecs"); // E_xlabel = NULL;
1468 UNSUPPORTED("2p7j1fghgsib6tkic2cc1t601"); // N_height = (agattr(auxg,AGNODE,"height",NULL));
1469 UNSUPPORTED("49eok3z6e4piel4m6f7rk8fb6"); // N_width = (agattr(auxg,AGNODE,"width",NULL));
1470 UNSUPPORTED("8cyc904mtcb0zlwybzrqxujrv"); // N_shape = (agattr(auxg,AGNODE,"shape",NULL));
1471 UNSUPPORTED("1ggb495lty2zumaw3qh2d3ssd"); // N_style = NULL;
1472 UNSUPPORTED("6hcb194pxn8upijardzdy3v2a"); // N_fontsize = (agattr(auxg,AGNODE,"fontsize",NULL));
1473 UNSUPPORTED("e1cg6m56w3uwo3m2dfdh71o5x"); // N_fontname = (agattr(auxg,AGNODE,"fontname",NULL));
1474 UNSUPPORTED("1gjzz1tv51zd3vsgyc6b8dfdz"); // N_fontcolor = NULL;
1475 UNSUPPORTED("42y8wmut30tkdxrxdvh5v8xtz"); // N_label = (agattr(auxg,AGNODE,"label",NULL));
1476 UNSUPPORTED("7jni9lzv0nagk8mnil6vsgzpt"); // N_xlabel = NULL;
1477 UNSUPPORTED("5hshk2a2mwuk7cjxsc4mzky7g"); // N_showboxes = NULL;
1478 UNSUPPORTED("1j63bq1sarpj53iwvo4ynyeck"); // N_ordering = (agattr(auxg,AGNODE,"ordering",NULL));
1479 UNSUPPORTED("7yaoaugb8cqh7ksl8w4i4utlv"); // N_sides = (agattr(auxg,AGNODE,"sides",NULL));
1480 UNSUPPORTED("15x8xrchzah7wcc5ukej42hut"); // N_peripheries = (agattr(auxg,AGNODE,"peripheries",NULL));
1481 UNSUPPORTED("dcu49fws0uvo8falspy1lno4k"); // N_skew = (agattr(auxg,AGNODE,"skew",NULL));
1482 UNSUPPORTED("bvjg1ch1pmuvfhvf5ubyrqhl3"); // N_orientation = (agattr(auxg,AGNODE,"orientation",NULL));
1483 UNSUPPORTED("b67lzfds2wabbxqa4qaoj0iv8"); // N_distortion = (agattr(auxg,AGNODE,"distortion",NULL));
1484 UNSUPPORTED("yet2s8h61hoih7vba5lhvbn"); // N_fixed = (agattr(auxg,AGNODE,"fixed",NULL));
1485 UNSUPPORTED("dv9ccs2r6bgkfuzvquyym1z1k"); // N_nojustify = NULL;
1486 UNSUPPORTED("7kwmsq3m3f4oe4jyi2hzkq544"); // N_group = NULL;
1487 UNSUPPORTED("3lqtt3u3nf2945mjpkjcw6s48"); // G_ordering = (agattr(auxg,AGRAPH,"ordering",NULL));
1488 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1489
1490 throw new UnsupportedOperationException();
1491 }
1492
1493
1494
1495
1496 //3 14hhte1l3zo45pzop5ugwahiv
1497 // static graph_t* cloneGraph (graph_t* g, attr_state_t* attr_state)
1498 public static Object cloneGraph(Object... arg) {
1499 UNSUPPORTED("9bkg8lvj5zr49zg08g7iijeg0"); // static graph_t*
1500 UNSUPPORTED("4uq8e6159vvwjuygnnrtonzjr"); // cloneGraph (graph_t* g, attr_state_t* attr_state)
1501 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1502 UNSUPPORTED("d4lkyrfdivg76lnwroshuwy1r"); // Agsym_t* sym;
1503 UNSUPPORTED("8scmnlh4aqjfli9hjn7snnhb2"); // graph_t* auxg;
1504 UNSUPPORTED("9wn75gbfikchs3m5ip8uqbqp9"); // if (agisdirected(g))
1505 UNSUPPORTED("bc2kavqqh860759qs0rw39g9w"); // auxg = agopen ("auxg",Agdirected, ((Agdisc_t *)0));
1506 UNSUPPORTED("div10atae09n36x269sl208r1"); // else
1507 UNSUPPORTED("41dm8ksorga6af1u82vvp2o08"); // auxg = agopen ("auxg",Agundirected, ((Agdisc_t *)0));
1508 UNSUPPORTED("dvx3r3ba8ihb3ho0irr3iflz9"); // agbindrec(auxg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0));
1509 UNSUPPORTED("8o4tyxwwt6nurmyulizd8yx4h"); // agattr(auxg, AGRAPH, "rank", "");
1510 UNSUPPORTED("4azamavz8yei4klxixxjkjdzy"); // GD_drawing(auxg) = (layout_t*)zmalloc(sizeof(layout_t));
1511 UNSUPPORTED("bl2bbfcsejbdva171i3uuah14"); // GD_drawing(auxg)->quantum = GD_drawing(g)->quantum;
1512 UNSUPPORTED("96jzn981deono0qtt4353wjnd"); // GD_drawing(auxg)->dpi = GD_drawing(g)->dpi;
1513 UNSUPPORTED("am2ry0w98859w4vlnhjmoegj2"); // GD_charset(auxg) = GD_charset (g);
1514 UNSUPPORTED("8qqdurbqk0iszxbs1xz13bx72"); // if (GD_flip(g))
1515 UNSUPPORTED("dldh0wwkfscuwx8vmqd78zne6"); // (GD_rankdir2(auxg) = 0);
1516 UNSUPPORTED("div10atae09n36x269sl208r1"); // else
1517 UNSUPPORTED("a1gxjxg6ob083fwqk6gac69va"); // (GD_rankdir2(auxg) = 1);
1518 UNSUPPORTED("94df1x35koj4u57phwmdtoipp"); // GD_nodesep(auxg) = GD_nodesep(g);
1519 UNSUPPORTED("m7a4df7fb58fj3qpf7ocrnth"); // GD_ranksep(auxg) = GD_ranksep(g);
1520 UNSUPPORTED("ehand70vpsfxy8xo2usw3sdpd"); // //copy node attrs to auxg
1521 UNSUPPORTED("ee6l5a5uekrqgzpa1tzzvn8lu"); // sym=agnxtattr(agroot(g),AGNODE,NULL); //get the first attr.
1522 UNSUPPORTED("e9gle5ohw021fnltrv101u94f"); // for (; sym; sym = agnxtattr(agroot(g),AGNODE,sym))
1523 UNSUPPORTED("4mgrl284otjjxa13ifyvsix9o"); // agattr (auxg, AGNODE,sym->name, sym->defval);
1524 UNSUPPORTED("8l0npxgg53xbodt3h5bsxaf1u"); // //copy edge attributes
1525 UNSUPPORTED("d0l2zhgn9atu49ot95sjvnjx7"); // sym=agnxtattr(agroot(g),AGEDGE,NULL); //get the first attr.
1526 UNSUPPORTED("2syhqyxjtl43g8k8nszcgv3qa"); // for (; sym; sym = agnxtattr(agroot(g),AGEDGE,sym))
1527 UNSUPPORTED("7ne23vf4nlppvlnjcbkj9xj7s"); // agattr (auxg, AGEDGE,sym->name, sym->defval);
1528 UNSUPPORTED("dbdwjxpzch7ieese5oq712h84"); // if (!agattr(auxg,AGEDGE, "headport", NULL))
1529 UNSUPPORTED("8e9itu32gwm54e46x9vefuuc"); // agattr(auxg,AGEDGE, "headport", "");
1530 UNSUPPORTED("8d6592shcigbk3cnbs3g6zd5o"); // if (!agattr(auxg,AGEDGE, "tailport", NULL))
1531 UNSUPPORTED("1afdsvho7rpgcscq77epwq7h0"); // agattr(auxg,AGEDGE, "tailport", "");
1532 UNSUPPORTED("8g7yfvh0djzbxpsk11iys8s73"); // setState (auxg, attr_state);
1533 UNSUPPORTED("84c7zokshe6lxrxoh1l48oh0b"); // return auxg;
1534 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1535
1536 throw new UnsupportedOperationException();
1537 }
1538
1539
1540
1541
1542 //3 75bd23hms71i6w46oddi0v7c7
1543 // static void cleanupCloneGraph (graph_t* g, attr_state_t* attr_state)
1544 public static Object cleanupCloneGraph(Object... arg) {
1545 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
1546 UNSUPPORTED("8l276u9l2gpbol4c2u457ic4o"); // cleanupCloneGraph (graph_t* g, attr_state_t* attr_state)
1547 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1548 UNSUPPORTED("81hz17qm480gekbimxzqp5917"); // /* restore main graph syms */
1549 UNSUPPORTED("dyp7mrvrp7pgbjcxvjp3k0rb0"); // E_constr = attr_state->E_constr;
1550 UNSUPPORTED("8x6a3xddh4y42i73tahevx314"); // E_samehead = attr_state->E_samehead;
1551 UNSUPPORTED("cr53qmp35pahyiy1lksf7pc7o"); // E_sametail = attr_state->E_sametail;
1552 UNSUPPORTED("3x6ebo3n7gp5ys2ei418ehbmt"); // E_weight = attr_state->E_weight;
1553 UNSUPPORTED("1ho97fsth1t5vvxc5xlwbtvyp"); // E_minlen = attr_state->E_minlen;
1554 UNSUPPORTED("bfo2q1yt9zej3021f132mqwe6"); // E_fontcolor = attr_state->E_fontcolor;
1555 UNSUPPORTED("caxxsouex07crddgxredl1u2p"); // E_fontname = attr_state->E_fontname;
1556 UNSUPPORTED("etmu0sib2tphqwe1wujlnfrup"); // E_fontsize = attr_state->E_fontsize;
1557 UNSUPPORTED("6gb56lwdjjgzcqilrpq8m22ns"); // E_headclip = attr_state->E_headclip;
1558 UNSUPPORTED("7arkupsho8bk69qdlx5osz58q"); // E_headlabel = attr_state->E_headlabel;
1559 UNSUPPORTED("8dbqaxdoyj9z0pkuwsg9vl0eu"); // E_label = attr_state->E_label;
1560 UNSUPPORTED("k2wg526i4loudvbn7p6a8e68"); // E_label_float = attr_state->E_label_float;
1561 UNSUPPORTED("2tux1z7sjyb58ty6c0bvgfn7u"); // E_labelfontcolor = attr_state->E_labelfontcolor;
1562 UNSUPPORTED("exlraaiion456s8e3xwpxozb4"); // E_labelfontname = attr_state->E_labelfontname;
1563 UNSUPPORTED("31yhqytdbu2odz0oi3cudffo1"); // E_labelfontsize = attr_state->E_labelfontsize;
1564 UNSUPPORTED("frcohw4vy68cah25ckm1cobw"); // E_tailclip = attr_state->E_tailclip;
1565 UNSUPPORTED("2z89ojbnte8kwtr9jotk499fc"); // E_taillabel = attr_state->E_taillabel;
1566 UNSUPPORTED("3ujqfey1gvz17vmhn9w63qxob"); // E_xlabel = attr_state->E_xlabel;
1567 UNSUPPORTED("atq6bae3mv1qr8egljjfsrit6"); // N_height = attr_state->N_height;
1568 UNSUPPORTED("aiqf0nz6dfedq2jwgmajnranb"); // N_width = attr_state->N_width;
1569 UNSUPPORTED("dt3zktdkst02y23fr3owwe9b9"); // N_shape = attr_state->N_shape;
1570 UNSUPPORTED("6pul6vxncmyc96hnj7hoh9xlv"); // N_style = attr_state->N_style;
1571 UNSUPPORTED("bbr363noiuq4fiv6dc11hrgki"); // N_fontsize = attr_state->N_fontsize;
1572 UNSUPPORTED("5jr71bz21o8ex4piwuj7cyf35"); // N_fontname = attr_state->N_fontname;
1573 UNSUPPORTED("muitbco7ytv8yr71bth3vd45"); // N_fontcolor = attr_state->N_fontcolor;
1574 UNSUPPORTED("gz675ugjp8z2xgply33d6llr"); // N_label = attr_state->N_label;
1575 UNSUPPORTED("3l56ed3d2ocqttxq2mwcaxrs"); // N_xlabel = attr_state->N_xlabel;
1576 UNSUPPORTED("2fmh1t4tflmptq1d2wqygd7qt"); // N_showboxes = attr_state->N_showboxes;
1577 UNSUPPORTED("br7qgmqsjpzi772b9wc7g00x0"); // N_ordering = attr_state->N_ordering;
1578 UNSUPPORTED("cpjgwylhr8d4gvztykf36mf71"); // N_sides = attr_state->N_sides;
1579 UNSUPPORTED("dzvcridjcoqlimn9odmlcn9ao"); // N_peripheries = attr_state->N_peripheries;
1580 UNSUPPORTED("7wd3t9ok31e37hdqtnffwum66"); // N_skew = attr_state->N_skew;
1581 UNSUPPORTED("bkocxpinr1crae21mcidps0"); // N_orientation = attr_state->N_orientation;
1582 UNSUPPORTED("bni1bp9we328ofu8dqwnws3b8"); // N_distortion = attr_state->N_distortion;
1583 UNSUPPORTED("9ni0gtudygio7exe31uyvwwxy"); // N_fixed = attr_state->N_fixed;
1584 UNSUPPORTED("2ep79qyr9wgfu8hyateqngx4o"); // N_nojustify = attr_state->N_nojustify;
1585 UNSUPPORTED("77t5uu3931h080u18f50zr0qw"); // N_group = attr_state->N_group;
1586 UNSUPPORTED("1czw51da8yggj3mvb5v6dircs"); // G_ordering = attr_state->G_ordering;
1587 UNSUPPORTED("60kkiysc7uy667s1kr04csskc"); // State = attr_state->State;
1588 UNSUPPORTED("9wfeu3yikah30i1eq789pb1dc"); // free (attr_state);
1589 UNSUPPORTED("2tv8es032rxzavamw0dgvm53h"); // dot_cleanup(g);
1590 UNSUPPORTED("ego3r1tvwrpv2hie8y9p8vq4z"); // agclose(g);
1591 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1592
1593 throw new UnsupportedOperationException();
1594 }
1595
1596
1597
1598
1599 //3 19tqa2ag8idq1y6l3zslax8e8
1600 // static node_t* cloneNode (graph_t* g, node_t* orign, int flipped)
1601 public static Object cloneNode(Object... arg) {
1602 UNSUPPORTED("b9dd3satxbh59hljdxzcxecc"); // static node_t*
1603 UNSUPPORTED("o807sh2podu4gxrp6mweyg3p"); // cloneNode (graph_t* g, node_t* orign, int flipped)
1604 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1605 UNSUPPORTED("9mlzre34kwhn9wm44mck7e8li"); // node_t* n = agnode(g, agnameof(orign),1);
1606 UNSUPPORTED("21wqfabmz2qk7g2vnunyyw1n8"); // agbindrec(n, "Agnodeinfo_t", sizeof(Agnodeinfo_t), NOT(0));
1607 UNSUPPORTED("80tteudx6zbkyxy4erhh0fqeo"); // agcopyattr (orign, n);
1608 UNSUPPORTED("65o4lsnpkxraq4wik0gzbv3g3"); // if (shapeOf(orign) == SH_RECORD) {
1609 UNSUPPORTED("7w0wn4e9gizbzrsqcre4pnx7"); // int lbllen = strlen(ND_label(orign)->text);
1610 UNSUPPORTED("3avq2zh3wpi2nrhofz3l9esev"); // char* buf = (char*)gmalloc((lbllen+3)*sizeof(char));
1611 UNSUPPORTED("bbilsao6wizinl5kripcoya9d"); // sprintf (buf, "{%s}", ND_label(orign)->text);
1612 UNSUPPORTED("e93wd087tiy2p8rvqlme93ynm"); // agset (n, "label", buf);
1613 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1614 UNSUPPORTED("69hc24ic55i66g8tf2ne42327"); // return n;
1615 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1616
1617 throw new UnsupportedOperationException();
1618 }
1619
1620
1621
1622
1623 //3 eqzwnj9u1k6ij1842mph3kly9
1624 // static edge_t* cloneEdge (graph_t* g, node_t* tn, node_t* hn, edge_t* orig)
1625 public static Object cloneEdge(Object... arg) {
1626 UNSUPPORTED("adyfsyiyu158mwhrtm33biik2"); // static edge_t*
1627 UNSUPPORTED("cpg8ogbdq9zzrqiadh2q271ky"); // cloneEdge (graph_t* g, node_t* tn, node_t* hn, edge_t* orig)
1628 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1629 UNSUPPORTED("mdnixwzb9bm22acv2mbc4yo2"); // edge_t* e = agedge(g, tn, hn,NULL,1);
1630 UNSUPPORTED("ce403szny1a2xoli6uh7ocakq"); // /* for (; ED_edge_type(orig) != NORMAL; orig = ED_to_orig(orig)); */
1631 UNSUPPORTED("554nt9t4qnutd0wixwbpok522"); // agbindrec(e, "Agedgeinfo_t", sizeof(Agedgeinfo_t), NOT(0));
1632 UNSUPPORTED("6yfr23jllhpfychz887mht80b"); // agcopyattr (orig, e);
1633 UNSUPPORTED("4v614d3uabme2jyn0anuritbb"); // /*
1634 UNSUPPORTED("jgkgn8228j52jq4wc7yo2q8t"); // if (orig->tail != ND_alg(tn)) {
1635 UNSUPPORTED("86dayio2rrehbyot92z4xh4d1"); // char* hdport = agget (orig, HEAD_ID);
1636 UNSUPPORTED("39vbjr08q96wugxyva077qpok"); // char* tlport = agget (orig, TAIL_ID);
1637 UNSUPPORTED("3z0livr6yj8gkkuxtvqwrqy95"); // agset (e, TAIL_ID, (hdport ? hdport : ""));
1638 UNSUPPORTED("dilecd9q5c2tj0pnl7tfwgixx"); // agset (e, HEAD_ID, (tlport ? tlport : ""));
1639 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1640 UNSUPPORTED("bnetqzovnscxile7ao44kc0qd"); // */
1641 UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); // return e;
1642 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1643
1644 throw new UnsupportedOperationException();
1645 }
1646
1647
1648
1649
1650 //3 3zb2qrqaqzr6n3m7dgxp4pmrp
1651 // static pointf transformf (pointf p, pointf del, int flip)
1652 public static Object transformf(Object... arg) {
1653 UNSUPPORTED("2zzd7mrm2u540dwuyzehozffj"); // static pointf
1654 UNSUPPORTED("a59oomtgi9wbd42kpsaaref6e"); // transformf (pointf p, pointf del, int flip)
1655 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
1656 UNSUPPORTED("9wlzvfxuhvsgkkq6lvlrw01d2"); // if (flip) {
1657 UNSUPPORTED("3vhnqvj1whk5vk9hofkhjtksr"); // double i = p.x;
1658 UNSUPPORTED("9sla4yejg4e4tlklijoil9k4u"); // p.x = p.y;
1659 UNSUPPORTED("688l858wkw5j2uqosjyesr15h"); // p.y = -i;
1660 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1661 UNSUPPORTED("890s36h0fh77q487p72cjtyz"); // return add_pointf(p, del);
1662 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
1663
1664 throw new UnsupportedOperationException();
1665 }
1666
1667
1668
1669
1670 //3 bmsa24i3avg14po4sp17yh89k
1671 // static int edgelblcmpfn(edge_t** ptr0, edge_t** ptr1)
1672 public static int edgelblcmpfn(__ptr__ ptr0, __ptr__ ptr1) {
1673 ENTERING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn");
1674 try {
1675 ST_Agedge_s e0, e1;
1676 final ST_pointf sz0 = new ST_pointf(), sz1 = new ST_pointf();
1677 e0 = (ST_Agedge_s) ptr0.getPtr();
1678 e1 = (ST_Agedge_s) ptr1.getPtr();
1679 if (ED_label(e0)!=null) {
1680 if (ED_label(e1)!=null) {
1681 sz0.___(ED_label(e0).dimen);
1682 sz1.___(ED_label(e1).dimen);
1683 if (sz0.x > sz1.x) return -1;
1684 else if (sz0.x < sz1.x) return 1;
1685 else if (sz0.y > sz1.y) return -1;
1686 else if (sz0.y < sz1.y) return 1;
1687 else return 0;
1688 }
1689 else
1690 return -1;
1691 }
1692 else if (ED_label(e1)!=null) {
1693 return 1;
1694 }
1695 else
1696 return 0;
1697 } finally {
1698 LEAVING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn");
1699 }
1700 }
1701
1702
1703
1704
1705 //3 3xmylrnypvoqrj2yrxnomsj5k
1706 // static void makeSimpleFlatLabels (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et, int n_lbls)
1707 public static void makeSimpleFlatLabels(ST_Agnode_s tn, ST_Agnode_s hn, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et, int n_lbls) {
1708 ENTERING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels");
1709 try {
1710 ST_pointf.Array ps;
1711 final ST_Ppoly_t poly = new ST_Ppoly_t();
1712 int pn[] = new int[1];
1713 ST_Agedge_s e = (ST_Agedge_s) edges.get(ind);
1714 final ST_pointf.Array points = new ST_pointf.Array(10);
1715 final ST_pointf tp = new ST_pointf(), hp = new ST_pointf();
1716 int i, pointn;
1717 double leftend, rightend, ctrx=0, ctry=0, miny, maxy;
1718 double uminx=0, umaxx=0;
1719 double lminx=0, lmaxx=0;
1720 ST_Agedge_s.ArrayOfStar earray = new ST_Agedge_s.ArrayOfStar(cnt);
1721 for (i = 0; i < cnt; i++) {
1722 earray.plus(i).setPtr(edges.plus(ind + i).getPtr());
1723 }
1724 qsort(earray,
1725 cnt,
1726 function(dotsplines__c.class, "edgelblcmpfn"));
1727 tp.___(add_pointf(ND_coord(tn), (ST_pointf) ED_tail_port(e).p));
1728 hp.___(add_pointf(ND_coord(hn), (ST_pointf) ED_head_port(e).p));
1729 leftend = tp.x+ND_rw(tn);
1730 rightend = hp.x-ND_lw(hn);
1731 ctrx = (leftend + rightend)/2.0;
1732 /* do first edge */
1733 e = (ST_Agedge_s) earray.get(0);
1734 pointn = 0;
1735 points.plus(pointn++).setStruct(tp);
1736 points.plus(pointn++).setStruct(tp);
1737 points.plus(pointn++).setStruct(hp);
1738 points.plus(pointn++).setStruct(hp);
1739 clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo);
1740 ED_label(e).pos.setDouble("x", ctrx);
1741 ED_label(e).pos.setDouble("y", tp.y + (ED_label(e).dimen.y+6)/2.0);
1742 ED_label(e).set= NOTI(false);
1743 miny = tp.y + 6/2.0;
1744 maxy = miny + ED_label(e).dimen.y;
1745 uminx = ctrx - (ED_label(e).dimen.x)/2.0;
1746 umaxx = ctrx + (ED_label(e).dimen.x)/2.0;
1747 for (i = 1; i < n_lbls; i++) {
1748 e = (ST_Agedge_s) earray.get(i);
1749 if (i%2!=0) { /* down */
1750 if (i == 1) {
1751 lminx = ctrx - (ED_label(e).dimen.x)/2.0;
1752 lmaxx = ctrx + (ED_label(e).dimen.x)/2.0;
1753 }
1754 miny -= 6 + ED_label(e).dimen.y;
1755 points.plus(0).setStruct(tp);
1756 points.plus(1).setDouble("x", tp.x);
1757 points.plus(1).setDouble("y", miny - 6);
1758 points.plus(2).setDouble("x", hp.x);
1759 points.plus(2).setDouble("y", points.get(1).y);
1760 points.plus(3).setStruct(hp);
1761 points.plus(4).setDouble("x", lmaxx);
1762 points.plus(4).setDouble("y", hp.y);
1763 points.plus(5).setDouble("x", lmaxx);
1764 points.plus(5).setDouble("y", miny);
1765 points.plus(6).setDouble("x", lminx);
1766 points.plus(6).setDouble("y", miny);
1767 points.plus(7).setDouble("x", lminx);
1768 points.plus(7).setDouble("y", tp.y);
1769 ctry = miny + (ED_label(e).dimen.y)/2.0;
1770 }
1771 else { /* up */
1772 UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp;
1773 UNSUPPORTED("43w0zont6q3y1axlcy96rzm5x"); // points[1].x = uminx;
1774 UNSUPPORTED("285u4l65puy5nr3pgq6acl4i2"); // points[1].y = tp.y;
1775 UNSUPPORTED("uctdrwzmec4w6vmirs9on197"); // points[2].x = uminx;
1776 UNSUPPORTED("d9b8e2upja8koam9memys7nj1"); // points[2].y = maxy;
1777 UNSUPPORTED("e8a8ucdpq7sgmbi3qyldleb1s"); // points[3].x = umaxx;
1778 UNSUPPORTED("d7xd9vzbdbezltrxsp9a3byuc"); // points[3].y = maxy;
1779 UNSUPPORTED("59abeyxxk9ow1g6m45t4ahih7"); // points[4].x = umaxx;
1780 UNSUPPORTED("2lzgl5468xguophz9d5wyer2x"); // points[4].y = hp.y;
1781 UNSUPPORTED("41u0uroraw4xanvpgg6l74kyh"); // points[5].x = hp.x;
1782 UNSUPPORTED("cwkk5bnko3e1udrx4cb720zss"); // points[5].y = hp.y;
1783 UNSUPPORTED("eev7hf3617k74bnq18uiedyb0"); // points[6].x = hp.x;
1784 UNSUPPORTED("aqxt1dvgfq5zcptjwgx1b3mmq"); // points[6].y = maxy + 6;
1785 UNSUPPORTED("5s3o04yf5lzca6ruuygfxngj2"); // points[7].x = tp.x;
1786 UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6;
1787 UNSUPPORTED("ehcig8trxc4ble6pcochubv7z"); // ctry = maxy + (ED_label(e)->dimen.y)/2.0 + 6;
1788 UNSUPPORTED("e2zgxycgqefryde9nbv6cqz1u"); // maxy += ED_label(e)->dimen.y + 6;
1789 }
1790 poly.pn = 8;
1791 poly.ps = points;
1792 ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1));
1793 if (pn[0] == 0) return;
1794 ED_label(e).pos.setDouble("x", ctrx);
1795 ED_label(e).pos.setDouble("y", ctry);
1796 ED_label(e).set= NOTI(false);
1797 clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
1798 }
1799 /* edges with no labels */
1800 for (; i < cnt; i++) {
1801 e = (ST_Agedge_s) earray.get(i);
1802 if (i%2!=0) { /* down */
1803 if (i == 1) {
1804 lminx = (2*leftend + rightend)/3.0;
1805 lmaxx = (leftend + 2*rightend)/3.0;
1806 }
1807 miny -= 6;
1808 points.plus(0).setStruct(tp);
1809 points.plus(1).setDouble("x", tp.x);
1810 points.plus(1).setDouble("y", miny - 6);
1811 points.plus(2).setDouble("x", hp.x);
1812 points.plus(2).setDouble("y", points.get(1).y);
1813 points.plus(3).setStruct(hp);
1814 points.plus(4).setDouble("x", lmaxx);
1815 points.plus(4).setDouble("y", hp.y);
1816 points.plus(5).setDouble("x", lmaxx);
1817 points.plus(5).setDouble("y", miny);
1818 points.plus(6).setDouble("x", lminx);
1819 points.plus(6).setDouble("y", miny);
1820 points.plus(7).setDouble("x", lminx);
1821 points.plus(7).setDouble("y", tp.y);
1822 }
1823 else { /* up */
1824 UNSUPPORTED("7owdudualx55z2cnm9x3iio0w"); // points[0] = tp;
1825 UNSUPPORTED("43w0zont6q3y1axlcy96rzm5x"); // points[1].x = uminx;
1826 UNSUPPORTED("285u4l65puy5nr3pgq6acl4i2"); // points[1].y = tp.y;
1827 UNSUPPORTED("uctdrwzmec4w6vmirs9on197"); // points[2].x = uminx;
1828 UNSUPPORTED("d9b8e2upja8koam9memys7nj1"); // points[2].y = maxy;
1829 UNSUPPORTED("e8a8ucdpq7sgmbi3qyldleb1s"); // points[3].x = umaxx;
1830 UNSUPPORTED("d7xd9vzbdbezltrxsp9a3byuc"); // points[3].y = maxy;
1831 UNSUPPORTED("59abeyxxk9ow1g6m45t4ahih7"); // points[4].x = umaxx;
1832 UNSUPPORTED("2lzgl5468xguophz9d5wyer2x"); // points[4].y = hp.y;
1833 UNSUPPORTED("41u0uroraw4xanvpgg6l74kyh"); // points[5].x = hp.x;
1834 UNSUPPORTED("cwkk5bnko3e1udrx4cb720zss"); // points[5].y = hp.y;
1835 UNSUPPORTED("eev7hf3617k74bnq18uiedyb0"); // points[6].x = hp.x;
1836 UNSUPPORTED("aqxt1dvgfq5zcptjwgx1b3mmq"); // points[6].y = maxy + 6;
1837 UNSUPPORTED("5s3o04yf5lzca6ruuygfxngj2"); // points[7].x = tp.x;
1838 UNSUPPORTED("56zheeat0b8mo4uvlcbvgbu80"); // points[7].y = maxy + 6;
1839 UNSUPPORTED("7un2qk34mmmhqi296vl50bacs"); // maxy += + 6;
1840 }
1841 poly.pn = 8;
1842 poly.ps = points;
1843 ps = simpleSplineRoute (tp, hp, poly, pn, et == (3 << 1));
1844 if (pn[0] == 0) return;
1845 clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
1846 }
1847 Memory.free (earray);
1848 } finally {
1849 LEAVING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels");
1850 }
1851 }
1852
1853
1854
1855
1856 //3 8kqyzk43ovc2sq6jegua6ytp
1857 // static void makeSimpleFlat (node_t* tn, node_t* hn, edge_t** edges, int ind, int cnt, int et)
1858 public static void makeSimpleFlat(ST_Agnode_s tn, ST_Agnode_s hn, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
1859 ENTERING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
1860 try {
1861 ST_Agedge_s e = (ST_Agedge_s) edges.get(ind);
1862 final ST_pointf.Array points = new ST_pointf.Array( 10);
1863 final ST_pointf tp = new ST_pointf(), hp = new ST_pointf();
1864 int i, pointn;
1865 double stepy, dy;
1866 tp.___(add_pointf(ND_coord(tn), (ST_pointf) ED_tail_port(e).p));
1867 hp.___(add_pointf(ND_coord(hn), (ST_pointf) ED_head_port(e).p));
1868 stepy = (cnt > 1) ? ND_ht(tn) / (double)(cnt - 1) : 0.;
1869 dy = tp.y - ((cnt > 1) ? ND_ht(tn) / 2. : 0.);
1870 for (i = 0; i < cnt; i++) {
1871 e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
1872 pointn = 0;
1873 if ((et == (5 << 1)) || (et == (1 << 1))) {
1874 points.plus(pointn++).setStruct(tp);
1875 points.plus(pointn++).setStruct(pointfof((2 * tp.x + hp.x) / 3, dy));
1876 points.plus(pointn++).setStruct(pointfof((2 * hp.x + tp.x) / 3, dy));
1877 points.plus(pointn++).setStruct(hp);
1878 }
1879 else { /* ET_PLINE */
1880 UNSUPPORTED("cai7diqq01v8vb92u4mx1xh38"); // points[pointn++] = tp;
1881 UNSUPPORTED("cai7diqq01v8vb92u4mx1xh38"); // points[pointn++] = tp;
1882 UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy);
1883 UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy);
1884 UNSUPPORTED("bnd7kao912fmo940u1gz3cmws"); // points[pointn++] = pointfof((2 * tp.x + hp.x) / 3, dy);
1885 UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy);
1886 UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy);
1887 UNSUPPORTED("akir2i0ddpv2ombgdzzs9qqqa"); // points[pointn++] = pointfof((2 * hp.x + tp.x) / 3, dy);
1888 UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp;
1889 UNSUPPORTED("59cwjy3j5e0igp278migykzi"); // points[pointn++] = hp;
1890 }
1891 dy += stepy;
1892 clip_and_install(e, aghead(e), points.asPtr(), pointn, Z.z().sinfo);
1893 }
1894 } finally {
1895 LEAVING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
1896 }
1897 }
1898
1899
1900
1901
1902 //3 bhnjospwghq4plid12757c928
1903 // static void make_flat_adj_edges(graph_t* g, path* P, edge_t** edges, int ind, int cnt, edge_t* e0, int et)
1904 public static void make_flat_adj_edges(ST_Agraph_s g, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, ST_Agedge_s e0, int et) {
1905 ENTERING("bhnjospwghq4plid12757c928","make_flat_adj_edges");
1906 try {
1907 ST_Agnode_s n;
1908 ST_Agnode_s tn, hn;
1909 ST_Agedge_s e;
1910 int labels = 0, ports = 0;
1911 ST_Agraph_s auxg;
1912 ST_Agraph_s subg;
1913 ST_Agnode_s auxt, auxh;
1914 ST_Agedge_s auxe;
1915 int i, j, midx, midy, leftx, rightx;
1916 final ST_pointf del = new ST_pointf();
1917 ST_Agedge_s hvye = null;
1918 attr_state_t attrs;
1919 tn = agtail(e0); hn = aghead(e0);
1920 for (i = 0; i < cnt; i++) {
1921 e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
1922 if (ED_label(e)!=null) labels++;
1923 if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0) ports = 1;
1924 }
1925 if (ports == 0) {
1926 /* flat edges without ports and labels can go straight left to right */
1927 if (labels == 0) {
1928 makeSimpleFlat (tn, hn, edges, ind, cnt, et);
1929 }
1930 /* flat edges without ports but with labels take more work */
1931 else {
1932 makeSimpleFlatLabels (tn, hn, edges, ind, cnt, et, labels);
1933 }
1934 return;
1935 }
1936 UNSUPPORTED("3ua0mgcwxnpymnpiv77owaur2"); // attrs = (attr_state_t*)zmalloc(sizeof(attr_state_t));
1937 UNSUPPORTED("5qcpchn65culafc5t2ibioksb"); // auxg = cloneGraph (g, attrs);
1938 UNSUPPORTED("cwolismpef6l1w4xj5etx8w09"); // subg = agsubg (auxg, "xxx",1);
1939 UNSUPPORTED("eocu0fte9egz381w3t8y5m64t"); // agbindrec(subg, "Agraphinfo_t", sizeof(Agraphinfo_t), NOT(0));
1940 UNSUPPORTED("er19m8huvnjjn1v6rreiisdf6"); // agset (subg, "rank", "source");
1941 UNSUPPORTED("du7zwfglureqnv5g2wiammuuu"); // rightx = ND_coord(hn).x;
1942 UNSUPPORTED("5qa24lmumrg29fbtl0fo4d4z1"); // leftx = ND_coord(tn).x;
1943 UNSUPPORTED("b2x6j7m1cmmkcmdl5jo9wn0ap"); // if (GD_flip(g)) {
1944 UNSUPPORTED("2elvc001uux0vbe7sv4098e0c"); // node_t* n;
1945 UNSUPPORTED("6m8k99c09zmhwgcdsgo33dugz"); // n = tn;
1946 UNSUPPORTED("cenlfgoeymhe1am5z6632xniq"); // tn = hn;
1947 UNSUPPORTED("cp2gf6c1xawd2yjbqerw98we3"); // hn = n;
1948 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1949 UNSUPPORTED("1e98fnf9lsk7hwgjt70gh5r55"); // auxt = cloneNode(subg, tn, GD_flip(g));
1950 UNSUPPORTED("a4xa8i1nw83hhnknv84280z00"); // auxh = cloneNode(auxg, hn, GD_flip(g));
1951 UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) {
1952 UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i];
1953 UNSUPPORTED("b3w40fpgfj0j66yi6j582thq2"); // for (; ED_edge_type(e) != 0; e = ED_to_orig(e));
1954 UNSUPPORTED("bcu59ji1apn0rvv7aisl6e4pw"); // if (agtail(e) == tn)
1955 UNSUPPORTED("4o3mq2ztiyxlbkpgcyygj4lny"); // auxe = cloneEdge (auxg, auxt, auxh, e);
1956 UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
1957 UNSUPPORTED("3a7m578mxun4c8zv0jurzh7ox"); // auxe = cloneEdge (auxg, auxh, auxt, e);
1958 UNSUPPORTED("e6khamu7fhu5m7il9r2v06mui"); // ED_alg(e) = auxe;
1959 UNSUPPORTED("64u9xrw8iwy3mtuupoktw7xoz"); // if (!hvye && !ED_tail_port(e).defined && !ED_head_port(e).defined) {
1960 UNSUPPORTED("6t23nfzzldtl419g582pr0wjn"); // hvye = auxe;
1961 UNSUPPORTED("3fi2uxwkmau5664gnhzyosan5"); // ED_alg(hvye) = e;
1962 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1963 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1964 UNSUPPORTED("co4n3cv6ybhgvm341r3re61vu"); // if (!hvye) {
1965 UNSUPPORTED("a0sxhnruv0ip65j05wt7dciak"); // hvye = agedge (auxg, auxt, auxh,NULL,1);
1966 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1967 UNSUPPORTED("26l323zwxztuc6sfnh36x7i9f"); // agxset (hvye, E_weight, "10000");
1968 UNSUPPORTED("4pj2d4pwf7wi9fcu4v0byk83z"); // GD_gvc(auxg) = GD_gvc(g);
1969 UNSUPPORTED("b6dpjp9wgjzgoy0tq7b9kms74"); // GD_dotroot(auxg) = auxg;
1970 UNSUPPORTED("e08t9bx8ldb1d5e0582wg82sx"); // setEdgeType (auxg, et);
1971 UNSUPPORTED("8y4433lgybq35f4t7viqsvz5v"); // dot_init_node_edge(auxg);
1972 UNSUPPORTED("13c2nt4jwumpvtwudz38a4sb3"); // dot_rank(auxg, 0);
1973 UNSUPPORTED("6onnznyz9fof6r8we5z1e4r63"); // dot_mincross(auxg, 0);
1974 UNSUPPORTED("4ry85qx5xmahkm0mdv9s65azo"); // dot_position(auxg, 0);
1975 UNSUPPORTED("9921qakdgil2jvrvinke44xsz"); // /* reposition */
1976 UNSUPPORTED("ang8wy78872hvqkzvgfjwqwfl"); // midx = (ND_coord(tn).x - ND_rw(tn) + ND_coord(hn).x + ND_lw(hn))/2;
1977 UNSUPPORTED("2r2ywte92l423tbcdfvbhz3zh"); // midy = (ND_coord(auxt).x + ND_coord(auxh).x)/2;
1978 UNSUPPORTED("b8juh1dggb6sz4d9df42i150k"); // for (n = GD_nlist(auxg); n; n = ND_next(n)) {
1979 UNSUPPORTED("4prtyy13ox1fif8vil3g86g87"); // if (n == auxt) {
1980 UNSUPPORTED("7gvpia4yo3bfvh5dl7uwr3dbe"); // ND_coord(n).y = rightx;
1981 UNSUPPORTED("2zsspnn0nfrdf9fx8sh3ld8j4"); // ND_coord(n).x = midy;
1982 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1983 UNSUPPORTED("ba2aaoh9ujy4ww9luial39sya"); // else if (n == auxh) {
1984 UNSUPPORTED("aoy1ze6hhjuym44mkasdt19qp"); // ND_coord(n).y = leftx;
1985 UNSUPPORTED("2zsspnn0nfrdf9fx8sh3ld8j4"); // ND_coord(n).x = midy;
1986 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
1987 UNSUPPORTED("80o8q2qh1hr671ladbyqzglnt"); // else ND_coord(n).y = midx;
1988 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1989 UNSUPPORTED("48hn94qz2y2kb6lqc3462vlco"); // dot_sameports(auxg);
1990 UNSUPPORTED("bglhuc9grqkk9ozb97oeh0m3b"); // _dot_splines(auxg, 0);
1991 UNSUPPORTED("euvfot8f7xxnibd223qgsylew"); // dotneato_postprocess(auxg);
1992 UNSUPPORTED("4mg60pszj0s1anwg8zp0tq0ra"); // /* copy splines */
1993 UNSUPPORTED("b2x6j7m1cmmkcmdl5jo9wn0ap"); // if (GD_flip(g)) {
1994 UNSUPPORTED("baukf0b2l91bkgnfdc04rvuxe"); // del.x = ND_coord(tn).x - ND_coord(auxt).y;
1995 UNSUPPORTED("96sq686mw9bvj7dli7wb241au"); // del.y = ND_coord(tn).y + ND_coord(auxt).x;
1996 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
1997 UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
1998 UNSUPPORTED("bxg8i1hqms0izrryxh2at6p7b"); // del.x = ND_coord(tn).x - ND_coord(auxt).x;
1999 UNSUPPORTED("3xqgvdcxmu8e4eqtnhaa256tk"); // del.y = ND_coord(tn).y - ND_coord(auxt).y;
2000 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2001 UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) {
2002 UNSUPPORTED("47ogn0fae1yuy3kefpawcgcmx"); // bezier* auxbz;
2003 UNSUPPORTED("4mujfxtr0wy7m1rbm57rwigo4"); // bezier* bz;
2004 UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i];
2005 UNSUPPORTED("b3w40fpgfj0j66yi6j582thq2"); // for (; ED_edge_type(e) != 0; e = ED_to_orig(e));
2006 UNSUPPORTED("3ii7nnxg3x8jpdk6lcijbizvf"); // auxe = (edge_t*)ED_alg(e);
2007 UNSUPPORTED("5rc7uvn4xqfetekcci1uwri5v"); // if ((auxe == hvye) & !ED_alg(auxe)) continue; /* pseudo-edge */
2008 UNSUPPORTED("52vy3jbu67nebznqkhxxqthih"); // auxbz = ED_spl(auxe)->list;
2009 UNSUPPORTED("azr1tv8blnu3i6b7wstpqv2tc"); // bz = new_spline(e, auxbz->size);
2010 UNSUPPORTED("df84ie4egl6l1i82tz1zp7hg"); // bz->sflag = auxbz->sflag;
2011 UNSUPPORTED("49bzonc32mbuchcsmw7csexdw"); // bz->sp = transformf(auxbz->sp, del, GD_flip(g));
2012 UNSUPPORTED("9g1glpjjy5wmh7dyr6u0nb2cn"); // bz->eflag = auxbz->eflag;
2013 UNSUPPORTED("44tftrsdjjuh1qjmxjpysmee3"); // bz->ep = transformf(auxbz->ep, del, GD_flip(g));
2014 UNSUPPORTED("w0xl6ghxoii2ze2xmbbunv4d"); // for (j = 0; j < auxbz->size; ) {
2015 UNSUPPORTED("22zm6ljvhpz7j2kiqee31nx61"); // pointf cp[4];
2016 UNSUPPORTED("4c88sva3ojadip5w3ehu782tp"); // cp[0] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g));
2017 UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++;
2018 UNSUPPORTED("duk541biqshfomah8rlxeyigr"); // if ( j >= auxbz->size )
2019 UNSUPPORTED("9ekmvj13iaml5ndszqyxa8eq"); // break;
2020 UNSUPPORTED("2qrbm7mhicvoxzk91h9x3gq64"); // cp[1] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g));
2021 UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++;
2022 UNSUPPORTED("f4x9unnnofgnvy91ejtm90kw"); // cp[2] = bz->list[j] = transformf(auxbz->list[j], del, GD_flip(g));
2023 UNSUPPORTED("5jqtd9htl25cd3if3pjtl8dpo"); // j++;
2024 UNSUPPORTED("6pldfj31dg88qzsa012v8auxn"); // cp[3] = transformf(auxbz->list[j], del, GD_flip(g));
2025 UNSUPPORTED("2xvehdctlpogpd7xhdf1pku00"); // update_bb_bz(&GD_bb(g), cp);
2026 UNSUPPORTED("4mhlpjofolwivhm0tl8cxznly"); // }
2027 UNSUPPORTED("8bokoh0vcnmvjcahn7de1z0kd"); // if (ED_label(e)) {
2028 UNSUPPORTED("8ido4wfhvlqvczqfq5xz33kak"); // ED_label(e)->pos = transformf(ED_label(auxe)->pos, del, GD_flip(g));
2029 UNSUPPORTED("3tkba5lhpnujfu8lcz8lewsyn"); // ED_label(e)->set = NOT(0);
2030 UNSUPPORTED("c62p0r1jj71ceakgzrv2gorvu"); // updateBB(g, ED_label(e));
2031 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
2032 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2033 UNSUPPORTED("22prbnbyxmapn1fcer1sktez7"); // cleanupCloneGraph (auxg, attrs);
2034 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
2035
2036 throw new UnsupportedOperationException();
2037 } finally {
2038 LEAVING("bhnjospwghq4plid12757c928","make_flat_adj_edges");
2039 }
2040 }
2041
2042
2043
2044
2045 //3 fybar4mljnmkh3kure5k1eod
2046 // static void makeFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp, boolean isBegin)
2047 public static void makeFlatEnd(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agnode_s n, ST_Agedge_s e, ST_pathend_t endp, boolean isBegin) {
2048 ENTERING("fybar4mljnmkh3kure5k1eod","makeFlatEnd");
2049 try {
2050 final ST_boxf b = new ST_boxf();
2051 b.___(maximal_bbox(g, sp, n, null, e));
2052 endp.setStruct("nb", b);
2053 endp.setInt("sidemask", 1<<2);
2054 if (isBegin) beginpath(P, e, 2, endp, false);
2055 else endpath(P, e, 2, endp, false);
2056 b.UR.y = endp.boxes[endp.boxn - 1].UR.y;
2057 b.LL.y = endp.boxes[endp.boxn - 1].LL.y;
2058 b.___(makeregularend((ST_boxf) b, (1<<2), ND_coord(n).y + GD_rank(g).get(ND_rank(n)).ht2));
2059 if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2060 UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b;
2061 } finally {
2062 LEAVING("fybar4mljnmkh3kure5k1eod","makeFlatEnd");
2063 }
2064 }
2065
2066
2067
2068
2069 //3 rfro0b2nsukdjenux3f6osgj
2070 // static void makeBottomFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e, pathend_t* endp, boolean isBegin)
2071 public static Object makeBottomFlatEnd(Object... arg) {
2072 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
2073 UNSUPPORTED("8ai1jk8aigoqod7sj7pw1phw3"); // makeBottomFlatEnd (graph_t* g, spline_info_t* sp, path* P, node_t* n, edge_t* e,
2074 UNSUPPORTED("25ij2tn6de7b481tpf1ac644s"); // pathend_t* endp, boolean isBegin)
2075 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
2076 UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); // boxf b;
2077 UNSUPPORTED("458vjrt5zjt6am715aiuxdlpo"); // b = endp->nb = maximal_bbox(g, sp, n, NULL, e);
2078 UNSUPPORTED("9wzfokn3t7zckgoaxgywy6cbz"); // endp->sidemask = (1<<0);
2079 UNSUPPORTED("c3u0b2z8mb4le2v1g6q8amjt"); // if (isBegin) beginpath(P, e, 2, endp, 0);
2080 UNSUPPORTED("1e0zyjb03r85tgqddfnlk9e9"); // else endpath(P, e, 2, endp, 0);
2081 UNSUPPORTED("7pwqqvagpkzye4cdmjlbrmt7a"); // b.UR.y = endp->boxes[endp->boxn - 1].UR.y;
2082 UNSUPPORTED("1mefjjoto40rfwb1qhzvobhje"); // b.LL.y = endp->boxes[endp->boxn - 1].LL.y;
2083 UNSUPPORTED("4sn8dc58suk2d3oqlu13cr7ic"); // b = makeregularend(b, (1<<0), ND_coord(n).y - GD_rank(g)[ND_rank(n)].ht2);
2084 UNSUPPORTED("6xj9sv3inmj1rwtz76qp6p30n"); // if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2085 UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b;
2086 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
2087
2088 throw new UnsupportedOperationException();
2089 }
2090
2091
2092
2093
2094 //3 w8ptjibydq995d2lexg85mku
2095 // static void make_flat_labeled_edge(graph_t* g, spline_info_t* sp, path* P, edge_t* e, int et)
2096 public static void make_flat_labeled_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s e, int et) {
2097 ENTERING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge");
2098 try {
2099 ST_Agnode_s tn, hn, ln;
2100 ST_pointf.Array ps = null;
2101 final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
2102 final ST_boxf lb = new ST_boxf();
2103 int boxn, i, ydelta;
2104 int pn[] = new int[1];
2105 ST_Agedge_s f;
2106 final ST_pointf.Array points = new ST_pointf.Array( 7);
2107 tn = agtail(e);
2108 hn = aghead(e);
2109 for (f = ED_to_virt(e); ED_to_virt(f)!=null; f = ED_to_virt(f));
2110 ln = agtail(f);
2111 ED_label(e).setStruct("pos", ND_coord(ln));
2112 ED_label(e).set= NOTI(false);
2113 if (et == (1 << 1)) {
2114 UNSUPPORTED("ataaqkehwb736ts2x6olzqokx"); // pointf startp, endp, lp;
2115 UNSUPPORTED("48h6vk2e5niep4dmpua377248"); // startp = add_pointf(ND_coord(tn), ED_tail_port(e).p);
2116 UNSUPPORTED("8fokfn1629eyiqnzi7mey9o2q"); // endp = add_pointf(ND_coord(hn), ED_head_port(e).p);
2117 UNSUPPORTED("8zpih1olxdgp3sxk2br3lezzx"); // lp = ED_label(e)->pos;
2118 UNSUPPORTED("1sblcap44288tmc3cr80iqpj5"); // lp.y -= (ED_label(e)->dimen.y)/2.0;
2119 UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp;
2120 UNSUPPORTED("16h577fdghqtaeot735guew4e"); // points[2] = points[3] = points[4] = lp;
2121 UNSUPPORTED("9zjfovamhwwehbviws68s5woy"); // points[5] = points[6] = endp;
2122 UNSUPPORTED("68ojpcos92c96bc0i5ag1yb6v"); // ps = points;
2123 UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7;
2124 }
2125 else {
2126 lb.LL.x = ND_coord(ln).x - ND_lw(ln);
2127 lb.UR.x = ND_coord(ln).x + ND_rw(ln);
2128 lb.UR.y = ND_coord(ln).y + ND_ht(ln)/2;
2129 ydelta = (int)(ND_coord(ln).y - GD_rank(g).get(ND_rank(tn)).ht1 -
2130 ND_coord(tn).y + GD_rank(g).get(ND_rank(tn)).ht2);
2131 ydelta = (int)(ydelta / 6.);
2132 lb.LL.y = lb.UR.y - MAX(5.,ydelta);
2133 boxn = 0;
2134 makeFlatEnd (g, sp, P, tn, e, tend, NOT(false));
2135 makeFlatEnd (g, sp, P, hn, e, hend, false);
2136 ((Z.z().boxes[boxn])).LL.x = (tend).boxes[tend.boxn - 1].LL.x;
2137 ((Z.z().boxes[boxn])).LL.y = (tend).boxes[tend.boxn - 1].UR.y;
2138 ((Z.z().boxes[boxn])).UR.x = lb.LL.x;
2139 ((Z.z().boxes[boxn])).UR.y = lb.LL.y;
2140 boxn++;
2141 ((Z.z().boxes[boxn])).LL.x = (tend).boxes[tend.boxn - 1].LL.x;
2142 ((Z.z().boxes[boxn])).LL.y = lb.LL.y;
2143 ((Z.z().boxes[boxn])).UR.x = (hend).boxes[hend.boxn - 1].UR.x;
2144 ((Z.z().boxes[boxn])).UR.y = lb.UR.y;
2145 boxn++;
2146 ((Z.z().boxes[boxn])).LL.x = lb.UR.x;
2147 ((Z.z().boxes[boxn])).UR.y = lb.LL.y;
2148 ((Z.z().boxes[boxn])).LL.y = (hend).boxes[hend.boxn - 1].UR.y;
2149 ((Z.z().boxes[boxn])).UR.x = (hend).boxes[hend.boxn - 1].UR.x;
2150 boxn++;
2151 for (i = 0; i < tend.boxn; i++) add_box(P, (tend).boxes[i]);
2152 for (i = 0; i < boxn; i++) add_box(P, Z.z().boxes[i]);
2153 for (i = hend.boxn - 1; i >= 0; i--) add_box(P, (hend).boxes[i]);
2154 if (et == (5 << 1)) ps = routesplines(P, pn);
2155 else ps = routepolylines(P, pn);
2156 if (pn[0] == 0) return;
2157 }
2158 clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
2159 } finally {
2160 LEAVING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge");
2161 }
2162 }
2163
2164
2165
2166
2167 //3 d97ga7gm34rs6r0jo494nhhuo
2168 // static void make_flat_bottom_edges(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, edge_t* e, int splines)
2169 public static Object make_flat_bottom_edges(Object... arg) {
2170 UNSUPPORTED("e2z2o5ybnr5tgpkt8ty7hwan1"); // static void
2171 UNSUPPORTED("bkp39vt080is6iiqobsw59sk9"); // make_flat_bottom_edges(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int
2172 UNSUPPORTED("2gat0ltxh7j57lspwmm9s9x7j"); // ind, int cnt, edge_t* e, int splines)
2173 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
2174 UNSUPPORTED("5np4z3gp6cfmicyuz91nownp8"); // node_t *tn, *hn;
2175 UNSUPPORTED("3zgmm04g7gq65c57gco0id1eb"); // int j, i, r;
2176 UNSUPPORTED("5wdd96amz7w1sym59mg5nfj51"); // double stepx, stepy, vspace;
2177 UNSUPPORTED("63ozqzusft8gpehyaqrdjyr1"); // rank_t* nextr;
2178 UNSUPPORTED("7hps2kejtrotcphg5gymma43b"); // int pn;
2179 UNSUPPORTED("2rkzhui0essisp5zlw44vx4j9"); // pointf *ps;
2180 UNSUPPORTED("32b8td88encjfj6yd1sp8bef"); // pathend_t tend, hend;
2181 UNSUPPORTED("d0x4emyekwlcpua99voy3764p"); // tn = agtail(e);
2182 UNSUPPORTED("axoua6xpo7xc40u2oj0a8dmr9"); // hn = aghead(e);
2183 UNSUPPORTED("63jjxtcojh1aq4na9u4w2a6xe"); // r = ND_rank(tn);
2184 UNSUPPORTED("atjnavwfg3xe4ygorslb4vvtv"); // if (r < GD_maxrank(g)) {
2185 UNSUPPORTED("6b35lbhficoaf5216p3sdq1cj"); // nextr = GD_rank(g) + (r+1);
2186 UNSUPPORTED("bj0cch0dmhpux7wm3fg4zg368"); // vspace = ND_coord(tn).y - GD_rank(g)[r].pht1 -
2187 UNSUPPORTED("dqcrkagghulp8u9iuoyckepf7"); // (ND_coord(nextr->v[0]).y + nextr->pht2);
2188 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2189 UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
2190 UNSUPPORTED("1sai54q4zfayczfcrklgw4x17"); // vspace = GD_ranksep(g);
2191 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2192 UNSUPPORTED("dyxkx5ftlgbeem7089pcu1qo4"); // stepx = ((double)(sp->Multisep)) / (cnt+1);
2193 UNSUPPORTED("63qqo8mqbn6alfa5k3gfalz53"); // stepy = vspace / (cnt+1);
2194 UNSUPPORTED("euw24sa4cgazdf9z7a3sretis"); // makeBottomFlatEnd (g, sp, P, tn, e, &tend, NOT(0));
2195 UNSUPPORTED("c8ip2hla7pb8tz4fhsj5m34wk"); // makeBottomFlatEnd (g, sp, P, hn, e, &hend, 0);
2196 UNSUPPORTED("1psokm6w9e7qw7fm2g1cayuk7"); // for (i = 0; i < cnt; i++) {
2197 UNSUPPORTED("3smlz0a87gj8w58rwau2ewq23"); // int boxn;
2198 UNSUPPORTED("bg5tj2hjixth58v04043jb3do"); // boxf b;
2199 UNSUPPORTED("8hwholxjp08y4q0zbb561684q"); // e = edges[ind + i];
2200 UNSUPPORTED("cpcqkqkhkaviy153h92apd82e"); // boxn = 0;
2201 UNSUPPORTED("4wkbaj2424ug9j97efwu1r5mc"); // b = tend.boxes[tend.boxn - 1];
2202 UNSUPPORTED("3eyfj1o1bqxlfqw7tq76qiiiz"); // boxes[boxn].LL.x = b.LL.x;
2203 UNSUPPORTED("dwlejn7xasxh4yyoq2xodqnyj"); // boxes[boxn].UR.y = b.LL.y;
2204 UNSUPPORTED("10o1e4r5ux8d7cr6zg379ss59"); // boxes[boxn].UR.x = b.UR.x + (i + 1) * stepx;
2205 UNSUPPORTED("79f4mryzkqqs3t4sxnet9jc7b"); // boxes[boxn].LL.y = b.LL.y - (i + 1) * stepy;
2206 UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++;
2207 UNSUPPORTED("7n7f256w4ewtzexwfxjo28b2"); // boxes[boxn].LL.x = tend.boxes[tend.boxn - 1].LL.x;
2208 UNSUPPORTED("6in0ql0upnjg00mgj5k8av2m4"); // boxes[boxn].UR.y = boxes[boxn-1].LL.y;
2209 UNSUPPORTED("46ftsiqovpzo9r0mnlc4nf83"); // boxes[boxn].UR.x = hend.boxes[hend.boxn - 1].UR.x;
2210 UNSUPPORTED("4bjnn4mhczzd1un9rbib5glch"); // boxes[boxn].LL.y = boxes[boxn].UR.y - stepy;
2211 UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++;
2212 UNSUPPORTED("6oycftap8apw4glb1s5jzineu"); // b = hend.boxes[hend.boxn - 1];
2213 UNSUPPORTED("77c1sajrw9kfc7avomly90gm8"); // boxes[boxn].UR.x = b.UR.x;
2214 UNSUPPORTED("e94nxsepfdq17q69drbro41je"); // boxes[boxn].UR.y = b.LL.y;
2215 UNSUPPORTED("6cipt7th0uv2xfwyh4rvwignj"); // boxes[boxn].LL.x = b.LL.x - (i + 1) * stepx;
2216 UNSUPPORTED("50uajtfbvgkrruywpjq9m4zoj"); // boxes[boxn].LL.y = boxes[boxn-1].UR.y;
2217 UNSUPPORTED("cbrsymd5wpvadg3ziz4dypa50"); // boxn++;
2218 UNSUPPORTED("eu29s7oeoca2yo9trhfhb9juy"); // for (j = 0; j < tend.boxn; j++) add_box(P, tend.boxes[j]);
2219 UNSUPPORTED("b8xs00axp4lkksof6hmim3n3x"); // for (j = 0; j < boxn; j++) add_box(P, boxes[j]);
2220 UNSUPPORTED("ahci7z910ypoj0e54wchvk54v"); // for (j = hend.boxn - 1; j >= 0; j--) add_box(P, hend.boxes[j]);
2221 UNSUPPORTED("7r9nsxbfy7w3csc04nxo97xpq"); // if (splines) ps = routesplines(P, &pn);
2222 UNSUPPORTED("dfku80ag90r137s9az9493oow"); // else ps = routepolylines(P, &pn);
2223 UNSUPPORTED("919jubmuis4tp1c1f87rvfhog"); // if (pn == 0)
2224 UNSUPPORTED("6cprbghvenu9ldc0ez1ifc63q"); // return;
2225 UNSUPPORTED("62oxk9cc5wf0f8gqbothfte1f"); // clip_and_install(e, aghead(e), ps, pn, &sinfo);
2226 UNSUPPORTED("l1nh40fo9oar4mz31h14bc9i"); // P->nbox = 0;
2227 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2228 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
2229
2230 throw new UnsupportedOperationException();
2231 }
2232
2233
2234
2235
2236 //3 6yr3jfkljl5w0z6dv354ryx63
2237 // static void make_flat_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et)
2238 public static void make_flat_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
2239 ENTERING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge");
2240 try {
2241 ST_Agnode_s tn, hn;
2242 final ST_Agedgeinfo_t fwdedgei = new ST_Agedgeinfo_t();
2243 final ST_Agedgepair_s fwdedge = new ST_Agedgepair_s();
2244 ST_Agedge_s e;
2245 int j, i, r, isAdjacent;
2246 double stepx, stepy, vspace;
2247 int tside, hside;
2248 int pn[] = new int[] {0};
2249 ST_pointf.Array ps;
2250 final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
2251 fwdedge.out.base.setPtr("data", fwdedgei);
2252 /* Get sample edge; normalize to go from left to right */
2253 e = (ST_Agedge_s) edges.get(ind);
2254 isAdjacent = ED_adjacent(e);
2255 if ((ED_tree_index(e) & 32)!=0) {
2256 MAKEFWDEDGE(fwdedge.out, e);
2257 e = (ST_Agedge_s) fwdedge.out;
2258 }
2259 for (i = 1; i < cnt; i++) {
2260 if (ED_adjacent(edges.plus(ind+i).getPtr())!=0) {
2261 isAdjacent = 1;
2262 break;
2263 }
2264 }
2265 /* The lead edge edges[ind] might not have been marked earlier as adjacent,
2266 * so check them all.
2267 */
2268 if (isAdjacent!=0) {
2269 make_flat_adj_edges (g, P, edges, ind, cnt, e, et);
2270 return;
2271 }
2272 if (ED_label(e)!=null) { /* edges with labels aren't multi-edges */
2273 make_flat_labeled_edge (g, sp, P, e, et);
2274 return;
2275 }
2276 if (et == (1 << 1)) {
2277 makeSimpleFlat (agtail(e), aghead(e), edges, ind, cnt, et);
2278 return;
2279 }
2280 tside = ED_tail_port(e).side;
2281 hside = ED_head_port(e).side;
2282 if (((tside == (1<<0)) && (hside != (1<<2))) ||
2283 ((hside == (1<<0)) && (tside != (1<<2)))) {
2284 make_flat_bottom_edges (g, sp, P, edges, ind, cnt, e, et == (5 << 1));
2285 return;
2286 }
2287 tn = agtail(e);
2288 hn = aghead(e);
2289 r = ND_rank(tn);
2290 if (r > 0) {
2291 ST_rank_t.Array2 prevr;
2292 if ((GD_has_labels(g) & (1 << 0))!=0)
2293 prevr = GD_rank(g).plus(r-2);
2294 else
2295 prevr = GD_rank(g).plus(r-1);
2296 vspace = ND_coord(prevr.getPtr().v.get(0)).y - prevr.getPtr().ht1
2297 - ND_coord(tn).y - GD_rank(g).get(r).ht2;
2298 }
2299 else {
2300 vspace = GD_ranksep(g);
2301 }
2302 stepx = ((double)sp.Multisep) / (cnt+1);
2303 stepy = vspace / (cnt+1);
2304 makeFlatEnd (g, sp, P, tn, e, tend, true);
2305 makeFlatEnd (g, sp, P, hn, e, hend, false);
2306 for (i = 0; i < cnt; i++) {
2307 int boxn;
2308 final ST_boxf b = new ST_boxf();
2309 e = (ST_Agedge_s) edges.plus(ind + i).getPtr();
2310 boxn = 0;
2311 b.___((tend).boxes[tend.boxn - 1]);
2312 ((Z.z().boxes[boxn])).LL.x = b.LL.x;
2313 ((Z.z().boxes[boxn])).LL.y = b.UR.y;
2314 ((Z.z().boxes[boxn])).UR.x = b.UR.x + (i + 1) * stepx;
2315 ((Z.z().boxes[boxn])).UR.y = b.UR.y + (i + 1) * stepy;
2316 boxn++;
2317 ((Z.z().boxes[boxn])).LL.x = ((ST_boxf)((tend).boxes[tend.boxn - 1])).LL.x;
2318 ((Z.z().boxes[boxn])).LL.y = (Z.z().boxes[boxn-1]).UR.y;
2319 ((Z.z().boxes[boxn])).UR.x = ((ST_boxf)((hend).boxes[hend.boxn - 1])).UR.x;
2320 ((Z.z().boxes[boxn])).UR.y = ((Z.z().boxes[boxn])).LL.y + stepy;
2321 boxn++;
2322 b.___((hend).boxes[hend.boxn - 1]);
2323 ((Z.z().boxes[boxn])).UR.x = b.UR.x;
2324 ((Z.z().boxes[boxn])).LL.y = b.UR.y;
2325 ((Z.z().boxes[boxn])).LL.x = b.LL.x - (i + 1) * stepx;
2326 ((Z.z().boxes[boxn])).UR.y = (Z.z().boxes[boxn-1]).LL.y;
2327 boxn++;
2328 for (j = 0; j < tend.boxn; j++) add_box(P, (tend).boxes[j]);
2329 for (j = 0; j < boxn; j++) add_box(P, Z.z().boxes[j]);
2330 for (j = hend.boxn - 1; j >= 0; j--) add_box(P, (hend).boxes[j]);
2331 if (et == (5 << 1)) ps = routesplines(P, pn);
2332 else ps = routepolylines(P, pn);
2333 if (pn[0] == 0)
2334 return;
2335 clip_and_install(e, aghead(e), ps, pn[0], Z.z().sinfo);
2336 P.nbox = 0;
2337 }
2338 } finally {
2339 LEAVING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge");
2340 }
2341 }
2342
2343
2344
2345
2346 //3 78oy7e2xm3t4de66du11ej05j
2347 // static int leftOf (pointf p1, pointf p2, pointf p3)
2348 public static Object leftOf(Object... arg) {
2349 UNSUPPORTED("eyp5xkiyummcoc88ul2b6tkeg"); // static int
2350 UNSUPPORTED("iqhj2moads3aafqx5xa8j44g"); // leftOf (pointf p1, pointf p2, pointf p3)
2351 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
2352 UNSUPPORTED("5azgw3jpyk2yccpp3p4s3q817"); // int d;
2353 UNSUPPORTED("42n6sq1mbcvm3tugypozccbua"); // d = ((p1.y - p2.y) * (p3.x - p2.x)) -
2354 UNSUPPORTED("7y9r79gtx363mln6v9yaisvz6"); // ((p3.y - p2.y) * (p1.x - p2.x));
2355 UNSUPPORTED("8y4f8e0mnow6139qoguzsxojx"); // return (d > 0);
2356 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
2357
2358 throw new UnsupportedOperationException();
2359 }
2360
2361
2362
2363
2364 //3 2n9bpvx34fnukqu1f9u4v7v6n
2365 // static int makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp)
2366 public static int makeLineEdge(ST_Agraph_s g, ST_Agedge_s fe, __ptr__ points, __ptr__ hp) {
2367 ENTERING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge");
2368 try {
2369 UNSUPPORTED("d9cz56vtrl0ri6hz88cumukuf"); // static int
2370 UNSUPPORTED("1act0rov08v6lg5ydqldks7d1"); // makeLineEdge(graph_t* g, edge_t* fe, pointf* points, node_t** hp)
2371 UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
2372 UNSUPPORTED("awgar8whid8l1c7lyj8w53w3i"); // int delr, pn;
2373 UNSUPPORTED("ewlm0dtv1gpudqhfx5nsr9d77"); // node_t* hn;
2374 UNSUPPORTED("cncpk333257fxnc9w8kfl8m70"); // node_t* tn;
2375 UNSUPPORTED("etezq0kgy6mttiwr53pna62d7"); // edge_t* e = fe;
2376 UNSUPPORTED("3ll9r1mvzzbhqrs4dwsduif44"); // pointf startp, endp, lp;
2377 UNSUPPORTED("bgjjpl6jaaa122twwwd0vif6x"); // pointf dimen;
2378 UNSUPPORTED("gdtli7sq5cifvdpg3ecrudew"); // double width, height;
2379 UNSUPPORTED("1pa1p9mnpooqack43qfpnoio2"); // while (ED_edge_type(e) != 0)
2380 UNSUPPORTED("bdmai1d040qmubf08ds339v9x"); // e = ED_to_orig(e);
2381 UNSUPPORTED("axoua6xpo7xc40u2oj0a8dmr9"); // hn = aghead(e);
2382 UNSUPPORTED("d0x4emyekwlcpua99voy3764p"); // tn = agtail(e);
2383 UNSUPPORTED("b4x4vd9cei4o3tjifzw7pdec6"); // delr = ABS(ND_rank(hn)-ND_rank(tn));
2384 UNSUPPORTED("447fk34earndyf1qvvzttsxtk"); // if ((delr == 1) || ((delr == 2) && (GD_has_labels(g) & (1 << 0))))
2385 UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); // return 0;
2386 UNSUPPORTED("cbnarpi971ox21zdds7a60axh"); // if (agtail(fe) == agtail(e)) {
2387 UNSUPPORTED("o7usaxh5vv7rla55dxzkfmk7"); // *hp = hn;
2388 UNSUPPORTED("48h6vk2e5niep4dmpua377248"); // startp = add_pointf(ND_coord(tn), ED_tail_port(e).p);
2389 UNSUPPORTED("8fokfn1629eyiqnzi7mey9o2q"); // endp = add_pointf(ND_coord(hn), ED_head_port(e).p);
2390 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2391 UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
2392 UNSUPPORTED("3uxftvwe3olgfi579s8izpl76"); // *hp = tn;
2393 UNSUPPORTED("akhrhgryddg74jqispnh1j1nn"); // startp = add_pointf(ND_coord(hn), ED_head_port(e).p);
2394 UNSUPPORTED("dqdai9l5thna19ynowkfwstuh"); // endp = add_pointf(ND_coord(tn), ED_tail_port(e).p);
2395 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2396 UNSUPPORTED("brrmfllffwlnqxljgrwy8x5pq"); // if (ED_label(e)) {
2397 UNSUPPORTED("et7phi46cskfaxzpfo97e1s5s"); // dimen = ED_label(e)->dimen;
2398 UNSUPPORTED("z26zaj60vrdy38k1c2vk7law"); // if (GD_flip(agraphof(hn))) {
2399 UNSUPPORTED("6mcl7j0bp09d061f0dywd1ru8"); // width = dimen.y;
2400 UNSUPPORTED("eax7dzvpgqzsiffa2dn2idrxe"); // height = dimen.x;
2401 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
2402 UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else {
2403 UNSUPPORTED("de3o94hui5i4dbq9moun6h57f"); // width = dimen.x;
2404 UNSUPPORTED("41ge1nnwfokwi43f6tlkgmvb0"); // height = dimen.y;
2405 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
2406 UNSUPPORTED("d9umd1qjkl4kkybpd7se993ij"); // lp = ED_label(e)->pos, lp;
2407 UNSUPPORTED("arxilpbzpy5a2s8skwl644jj2"); // if (leftOf (endp,startp,lp)) {
2408 UNSUPPORTED("7bfb4rovu9obr4fje0hi95e67"); // lp.x += width/2.0;
2409 UNSUPPORTED("7y2ejp6vr760aqh5qp4v5zdc8"); // lp.y -= height/2.0;
2410 UNSUPPORTED("9l9roc1u8a03ljwm2mmeaiqq2"); // }
2411 UNSUPPORTED("8k75h069sv2k9b6tgz77dscwd"); // else {
2412 UNSUPPORTED("a4spf3n199lr00qkdb3vb8i6c"); // lp.x -= width/2.0;
2413 UNSUPPORTED("f15m64yxj1oq475bvrt63d5gf"); // lp.y += height/2.0;
2414 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
2415 UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp;
2416 UNSUPPORTED("16h577fdghqtaeot735guew4e"); // points[2] = points[3] = points[4] = lp;
2417 UNSUPPORTED("9zjfovamhwwehbviws68s5woy"); // points[5] = points[6] = endp;
2418 UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7;
2419 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2420 UNSUPPORTED("1nyzbeonram6636b1w955bypn"); // else {
2421 UNSUPPORTED("8ew9p3k3j0b33dnq0ntgbb6x8"); // points[1] = points[0] = startp;
2422 UNSUPPORTED("aztkfl5qctibiu6en7xf6xf3e"); // points[3] = points[2] = endp;
2423 UNSUPPORTED("5rmgdadjn23z8djo32eh9bhzd"); // pn = 4;
2424 UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
2425 UNSUPPORTED("abnopd2ggrpdb538wf7zsmrhq"); // return pn;
2426 UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
2427
2428 throw new UnsupportedOperationException();
2429 } finally {
2430 LEAVING("2n9bpvx34fnukqu1f9u4v7v6n","makeLineEdge");
2431 }
2432 }
2433
2434
2435
2436
2437 //private static __ptr__ pointfs;
2438 //private static __ptr__ pointfs2;
2439 //private static int numpts;
2440 //private static int numpts2;
2441 //3 30wfq1dby4t07hft9io52nq6z
2442 // static void make_regular_edge(graph_t* g, spline_info_t* sp, path * P, edge_t ** edges, int ind, int cnt, int et)
2443 public static void make_regular_edge(ST_Agraph_s g, ST_spline_info_t sp, ST_path P, ST_Agedge_s.ArrayOfStar edges, int ind, int cnt, int et) {
2444 ENTERING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
2445 try {
2446 ST_Agnode_s tn, hn = null;
2447 final ST_Agedgeinfo_t fwdedgeai = new ST_Agedgeinfo_t(), fwdedgebi = new ST_Agedgeinfo_t(), fwdedgei = new ST_Agedgeinfo_t();
2448 final ST_Agedgepair_s fwdedgea = new ST_Agedgepair_s(), fwdedgeb = new ST_Agedgepair_s(), fwdedge = new ST_Agedgepair_s();
2449 ST_Agedge_s e, fe, le, segfirst;
2450 ST_pointf.Array ps = null;
2451 final ST_pathend_t tend = new ST_pathend_t(), hend = new ST_pathend_t();
2452 final ST_boxf b = new ST_boxf();
2453 int boxn, sl, si, i, j, dx, hackflag, longedge;
2454 boolean smode;
2455 int pn[] = new int[] {0};
2456 int pointn[] = new int[] {0};
2457 fwdedgea.out.base.setPtr("data", fwdedgeai);
2458 fwdedgeb.out.base.setPtr("data", fwdedgebi);
2459 fwdedge.out.base.setPtr("data", fwdedgei);
2460 if (N(Z.z().pointfs)) {
2461 Z.z().pointfs = new ST_pointf.Array(2000);
2462 Z.z().pointfs2 = new ST_pointf.Array(2000);
2463 Z.z().numpts = 2000;
2464 Z.z().numpts2 = 2000;
2465 }
2466 sl = 0;
2467 e = (ST_Agedge_s) edges.get(ind);
2468 hackflag = 0;
2469 if (ABS(ND_rank(agtail(e)) - ND_rank(aghead(e))) > 1) {
2470 UNSUPPORTED("8f17srpa5iisomehrb4b01h51"); // fwdedgeai = *(Agedgeinfo_t*)e->base.data;
2471 UNSUPPORTED("97znyysf99vzzwpgnqcpp5yek"); // fwdedgea.out = *e;
2472 UNSUPPORTED("b6jipryp9p354gtq9lwa35lzj"); // fwdedgea.out.base.data = (Agrec_t*)&fwdedgeai;
2473 UNSUPPORTED("568s5ftes1chv9n1s98g9cncf"); // if (ED_tree_index(e) & 32) {
2474 UNSUPPORTED("9hw2l0eu91vauhvj3cxf3andc"); // MAKEFWDEDGE(&fwdedgeb.out, e);
2475 UNSUPPORTED("1rql0qzotc0yyozcfkj9p8xkm"); // agtail(&fwdedgea.out) = aghead(e);
2476 UNSUPPORTED("dw3p473qmkgjvxewsr8pimi2h"); // ED_tail_port(&fwdedgea.out) = ED_head_port(e);
2477 UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); // } else {
2478 UNSUPPORTED("2gys0bodxz4fbasfnrvx6ivg2"); // fwdedgebi = *(Agedgeinfo_t*)e->base.data;
2479 UNSUPPORTED("1qqbo2mfls7xhbdno0no8xq54"); // fwdedgeb.out = *e;
2480 UNSUPPORTED("980ksnsma7kvvr9755ge8bhzh"); // fwdedgeb.out.base.data = (Agrec_t*)&fwdedgebi;
2481 UNSUPPORTED("6le0rehxs2odmv3zg1qg5wvd4"); // agtail(&fwdedgea.out) = agtail(e);
2482 UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
2483 UNSUPPORTED("3p0d08nntark676jlv1jl0j27"); // le = getmainedge(e);
2484 UNSUPPORTED("6tmwmfqoz3y8k44xamrpv82tl"); // while (ED_to_virt(le))
2485 UNSUPPORTED("1c19c7ftue4zoibf7d2tm6uxy"); // le = ED_to_virt(le);
2486 UNSUPPORTED("d29k9lzj5g3d8dfxigwogdnoe"); // aghead(&fwdedgea.out) = aghead(le);
2487 UNSUPPORTED("36l0czce101bg0wbmu68xjd7z"); // ED_head_port(&fwdedgea.out).defined = 0;
2488 UNSUPPORTED("497rb9p6jdgdoyem0y42ecy6c"); // ED_edge_type(&fwdedgea.out) = 1;
2489 UNSUPPORTED("4tjj1vbw4mog2qlouazrdirvw"); // ED_head_port(&fwdedgea.out).p.x = ED_head_port(&fwdedgea.out).p.y = 0;
2490 UNSUPPORTED("8kdma1vi9aibo7isrge0lunrh"); // ED_to_orig(&fwdedgea.out) = e;
2491 UNSUPPORTED("eih8eaai768x1un5mixrtgstp"); // e = &fwdedgea.out;
2492 UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
2493 } else {
2494 if ((ED_tree_index(e) & 32)!=0) {
2495 MAKEFWDEDGE(fwdedgea.out, e);
2496 e = fwdedgea.out;
2497 }
2498 }
2499 fe = e;
2500 /* compute the spline points for the edge */
2501 if ((et == (1 << 1)) && (pointn[0] = makeLineEdge (g, fe, Z.z().pointfs, hn.unsupported()))!=0) {
2502 }
2503 else {
2504 boolean splines = (et == (5 << 1));
2505 boxn = 0;
2506 pointn[0] = 0;
2507 segfirst = e;
2508 tn = agtail(e);
2509 hn = aghead(e);
2510 b.___(maximal_bbox(g, sp, tn, null, e));
2511 tend.nb.___(b);
2512 beginpath(P, e, 1, tend, spline_merge(tn));
2513 b.UR.y =
2514 (tend).boxes[tend.boxn - 1].UR.y;
2515 b.LL.y =
2516 (tend).boxes[tend.boxn - 1].LL.y;
2517 b.___(makeregularend(b, (1<<0),
2518 ND_coord(tn).y - GD_rank(g).get(ND_rank(tn)).ht1));
2519 if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2520 {
2521 tend.boxes[tend.boxn].___(b);
2522 tend.setInt("boxn", tend.boxn + 1);
2523 }
2524 longedge = 0;
2525 smode = false; si = -1;
2526 while (ND_node_type(hn) == 1 && N(((Boolean)Z.z().sinfo.splineMerge.exe(hn)).booleanValue())) {
2527 longedge = 1;
2528 Z.z().boxes[boxn++].___(rank_box(sp, g, ND_rank(tn)));
2529 if (N(smode)
2530 && ((sl = straight_len(hn)) >=
2531 ((GD_has_labels(g) & (1 << 0))!=0 ? 4 + 1 : 2 + 1))) {
2532 smode = NOT(false);
2533 si = 1; sl -= 2;
2534 }
2535 if (N(smode) || si > 0) {
2536 si--;
2537 Z.z().boxes[boxn++].___(maximal_bbox(g, sp, hn, e, (ST_Agedge_s) ND_out(hn).getFromList(0)));
2538 e = (ST_Agedge_s) ND_out(hn).getFromList(0);
2539 tn = agtail(e);
2540 hn = aghead(e);
2541 continue;
2542 }
2543 hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (ST_Agedge_s) ND_out(hn).getFromList(0)));
2544 endpath(P, e, 1, hend, spline_merge(aghead(e)));
2545 b.___(makeregularend((hend).boxes[hend.boxn - 1], (1<<2),
2546 ND_coord(hn).y + GD_rank(g).get(ND_rank(hn)).ht2));
2547 if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2548 UNSUPPORTED("1crhubfzekx1qi2ti9ajqsfoc"); // hend.boxes[hend.boxn++] = b;
2549 P.end.setDouble("theta", M_PI / 2);
2550 P.end.constrained= NOTI(false);
2551 completeregularpath(P, segfirst, e, tend, hend, Z.z().boxes, boxn, 1);
2552 if (splines) ps = routesplines(P, pn);
2553 else {
2554 UNSUPPORTED("biyp75vm751j3qmqacagfej4b"); // ps = routepolylines (P, &pn);
2555 UNSUPPORTED("4fmdmgg43suu7ppgrcaofwqzh"); // if ((et == (1 << 1)) && (pn > 4)) {
2556 UNSUPPORTED("2ftwbx9nsy10ldzds3ej4hxi7"); // ps[1] = ps[0];
2557 UNSUPPORTED("2fedie0btpk43e74p462n0y4n"); // ps[3] = ps[2] = ps[pn-1];
2558 UNSUPPORTED("3fwatldph3opctz8aieqd214d"); // pn = 4;
2559 UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
2560 }
2561 if (pn[0] == 0)
2562 return;
2563 if (pointn[0] + pn[0] > Z.z().numpts) {
2564 /* This should be enough to include 3 extra points added by
2565 * straight_path below.
2566 */
2567 UNSUPPORTED("k37sqlxbjikqg4xdonnvefo3"); // numpts = 2*(pointn+pn);
2568 UNSUPPORTED("8kbxhk7qirj3tr7hn1ukwar3h"); // pointfs = RALLOC(numpts, pointfs, pointf);
2569 }
2570 for (i = 0; i < pn[0]; i++) {
2571 Z.z().pointfs.plus(pointn[0]++).setStruct(ps.plus(i).getStruct());
2572 }
2573 e = straight_path((ST_Agedge_s)ND_out(hn).getFromList(0), sl, Z.z().pointfs, pointn);
2574 recover_slack(segfirst, P);
2575 segfirst = e;
2576 tn = agtail(e);
2577 hn = aghead(e);
2578 boxn = 0;
2579 tend.setStruct("nb", maximal_bbox(g, sp, tn, (ST_Agedge_s) ND_in(tn).getFromList(0), e));
2580 beginpath(P, e, 1, tend, spline_merge(tn));
2581 b.___(makeregularend((tend).boxes[tend.boxn - 1], (1<<0),
2582 ND_coord(tn).y - GD_rank(g).get(ND_rank(tn)).ht1));
2583 if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2584 UNSUPPORTED("cjx6tldge3otk1pk6ks1pkn2w"); // tend.boxes[tend.boxn++] = b;
2585 P.start.setDouble("theta", -M_PI / 2);
2586 P.start.constrained= NOTI(false);
2587 smode = false;
2588 }
2589 Z.z().boxes[boxn++].___(rank_box(sp, g, ND_rank(tn)));
2590 b.___(maximal_bbox(g, sp, hn, e, null));
2591 hend.nb.___(b);
2592 endpath(P, (ST_Agedge_s) (hackflag!=0 ? fwdedgeb.out : e), 1, hend, spline_merge(aghead(e)));
2593 b.UR.y = (hend).boxes[hend.boxn - 1].UR.y;
2594 b.LL.y = (hend).boxes[hend.boxn - 1].LL.y;
2595 b.___(makeregularend(b, (1<<2),
2596 ND_coord(hn).y + GD_rank(g).get(ND_rank(hn)).ht2));
2597 if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
2598 {
2599 hend.boxes[hend.boxn].___(b);
2600 hend.setInt("boxn", hend.boxn+1);
2601 }
2602 completeregularpath(P, segfirst, e, tend, hend, Z.z().boxes, boxn,
2603 longedge);
2604 if (splines) ps = routesplines(P, pn);
2605 else ps = routepolylines (P, pn);
2606 if ((et == (1 << 1)) && (pn[0] > 4)) {
2607 /* Here we have used the polyline case to handle
2608 * an edge between two nodes on adjacent ranks. If the
2609 * results really is a polyline, straighten it.
2610 */
2611 UNSUPPORTED("1u7e6lrkiipml54kkm7ylw56t"); // ps[1] = ps[0];
2612 UNSUPPORTED("76bh6z0xok01d0gdybxcx4ful"); // ps[3] = ps[2] = ps[pn-1];
2613 UNSUPPORTED("95b6xp8h5ai070bekyjhmiehh"); // pn = 4;
2614 }
2615 if (pn[0] == 0)
2616 return;
2617 if (pointn[0] + pn[0] > Z.z().numpts) {
2618 UNSUPPORTED("c6ux5effs02grz7xh3k8ernda"); // numpts = 2*(pointn+pn);
2619 UNSUPPORTED("bedaqcn9h03q6ia6zbezuee1m"); // pointfs = RALLOC(numpts, pointfs, pointf);
2620 }
2621 for (i = 0; i < pn[0]; i++) {
2622 Z.z().pointfs.plus(pointn[0]).setStruct(ps.plus(i).getStruct());
2623 pointn[0]++;
2624 }
2625 recover_slack(segfirst, P);
2626 hn = hackflag!=0 ? aghead(fwdedgeb.out) : aghead(e);
2627 }
2628 /* make copies of the spline points, one per multi-edge */
2629 if (cnt == 1) {
2630 clip_and_install(fe, hn, Z.z().pointfs, pointn[0], Z.z().sinfo);
2631 return;
2632 }
2633 dx = sp.Multisep * (cnt - 1) / 2;
2634 for (i = 1; i < pointn[0] - 1; i++)
2635 Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.get(i).x - dx);
2636 if (Z.z().numpts > Z.z().numpts2) {
2637 UNSUPPORTED("9ubr4m7bdv5f5ldk2ta6yw3up"); // numpts2 = numpts;
2638 UNSUPPORTED("8qwp7ddy5ztgam63fzfjmu890"); // pointfs2 = RALLOC(numpts2, pointfs2, pointf);
2639 }
2640 for (i = 0; i < pointn[0]; i++)
2641 Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct());
2642 clip_and_install(fe, hn, Z.z().pointfs2, pointn[0], Z.z().sinfo);
2643 for (j = 1; j < cnt; j++) {
2644 e = (ST_Agedge_s) edges.plus(ind + j).getPtr();
2645 if ((ED_tree_index(e) & 32)!=0) {
2646 MAKEFWDEDGE(fwdedge.out, e);
2647 e = (ST_Agedge_s) fwdedge.out;
2648 }
2649 for (i = 1; i < pointn[0] - 1; i++)
2650 Z.z().pointfs.plus(i).setDouble("x", Z.z().pointfs.get(i).x + sp.Multisep);
2651 for (i = 0; i < pointn[0]; i++)
2652 Z.z().pointfs2.plus(i).setStruct(Z.z().pointfs.plus(i).getStruct());
2653 clip_and_install(e, aghead(e), Z.z().pointfs2, pointn[0], Z.z().sinfo);
2654 }
2655 } finally {
2656 LEAVING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
2657 }
2658 }
2659
2660
2661
2662
2663 //3 va61hggynvb6z6j34w7otmab
2664 // static void completeregularpath(path * P, edge_t * first, edge_t * last, pathend_t * tendp, pathend_t * hendp, boxf * boxes, int boxn, int flag)
2665 public static void completeregularpath(ST_path P, ST_Agedge_s first, ST_Agedge_s last, ST_pathend_t tendp, ST_pathend_t hendp, ST_boxf[] boxes, int boxn, int flag) {
2666 ENTERING("va61hggynvb6z6j34w7otmab","completeregularpath");
2667 try {
2668 ST_Agedge_s uleft, uright, lleft, lright;
2669 int i, fb, lb;
2670 ST_splines spl;
2671 ST_pointf.Array pp;
2672 int pn;
2673 fb = lb = -1;
2674 uleft = uright = null;
2675 uleft = top_bound(first, -1);
2676 uright = top_bound(first, 1);
2677 if (uleft!=null) {
2678 if (N(spl = getsplinepoints(uleft))) return;
2679 pp = ((ST_bezier)spl.list.get(0).getPtr()).list;
2680 pn = spl.list.get(0).size;
2681 }
2682 if (uright!=null) {
2683 if (N(spl = getsplinepoints(uright))) return;
2684 pp = ((ST_bezier)spl.list.get(0).getPtr()).list;
2685 pn = spl.list.get(0).size;
2686 }
2687 lleft = lright = null;
2688 lleft = bot_bound(last, -1);
2689 lright = bot_bound(last, 1);
2690 if (lleft!=null) {
2691 if (N(spl = getsplinepoints(lleft))) return;
2692 pp = ((ST_bezier)spl.list.plus(spl.size - 1).getPtr().getPtr()).list;
2693 pn = spl.list.plus(spl.size - 1).getPtr().size;
2694 }
2695 if (lright!=null) {
2696 if (N(spl = getsplinepoints(lright))) return;
2697 pp = ((ST_bezier)spl.list.plus(spl.size - 1).getPtr().getPtr()).list;
2698 pn = spl.list.plus(spl.size - 1).getPtr().size;
2699 }
2700 for (i = 0; i < tendp.boxn; i++)
2701 add_box(P, (tendp).boxes[i]);
2702 fb = P.nbox + 1;
2703 lb = fb + boxn - 3;
2704 for (i = 0; i < boxn; i++)
2705 add_box(P, boxes[i]);
2706 for (i = hendp.boxn - 1; i >= 0; i--)
2707 add_box(P, (hendp).boxes[i]);
2708 adjustregularpath(P, fb, lb);
2709 } finally {
2710 LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath");
2711 }
2712 }
2713
2714
2715
2716
2717 //3 3wwhczhpkcnflwr1l9wcga7tq
2718 // static boxf makeregularend(boxf b, int side, double y)
2719 public static ST_boxf makeregularend(final ST_boxf b, int side, double y) {
2720 // WARNING!! STRUCT
2721 return makeregularend_w_(b.copy(), side, y).copy();
2722 }
2723 private static ST_boxf makeregularend_w_(final ST_boxf b, int side, double y) {
2724 ENTERING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend");
2725 try {
2726 final ST_boxf newb = new ST_boxf();
2727 switch (side) {
2728 case (1<<0):
2729 newb.___(boxfof(b.LL.x, y, b.UR.x, b.LL.y));
2730 break;
2731 case (1<<2):
2732 newb.___(boxfof(b.LL.x, b.UR.y, b.UR.x, y));
2733 break;
2734 }
2735 return newb;
2736 } finally {
2737 LEAVING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend");
2738 }
2739 }
2740
2741
2742
2743
2744 //3 88xrlzjovkxcnay9b2y5zyiid
2745 // static void adjustregularpath(path * P, int fb, int lb)
2746 public static void adjustregularpath(ST_path P, int fb, int lb) {
2747 ENTERING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath");
2748 try {
2749 ST_boxf bp1, bp2;
2750 int i, x;
2751 for (i = fb-1; i < lb+1; i++) {
2752 bp1 = (ST_boxf) P.boxes[i];
2753 if ((i - fb) % 2 == 0) {
2754 if (bp1.LL.x >= bp1.UR.x) {
2755 x = (int)((bp1.LL.x + bp1.UR.x) / 2);
2756 bp1.LL.setDouble("x", x - 8);
2757 bp1.UR.setDouble("x", x + 8);
2758 }
2759 } else {
2760 if (bp1.LL.x + 16 > bp1.UR.x) {
2761 x = (int)((bp1.LL.x + bp1.UR.x) / 2);
2762 bp1.LL.setDouble("x", x - 8);
2763 bp1.UR.setDouble("x", x + 8);
2764 }
2765 }
2766 }
2767 for (i = 0; i < P.nbox - 1; i++) {
2768 bp1 = (ST_boxf) P.boxes[i];
2769 bp2 = (ST_boxf) P.boxes[i+1];
2770 if (i >= fb && i <= lb && (i - fb) % 2 == 0) {
2771 if (bp1.LL.x + 16 > bp2.UR.x)
2772 bp2.UR.setDouble("x", bp1.LL.x + 16);
2773 if (bp1.UR.x - 16 < bp2.LL.x)
2774 bp2.LL.setDouble("x", bp1.UR.x - 16);
2775 } else if (i + 1 >= fb && i < lb && (i + 1 - fb) % 2 == 0) {
2776 if (bp1.LL.x + 16 > bp2.UR.x)
2777 bp1.LL.setDouble("x", bp2.UR.x - 16);
2778 if (bp1.UR.x - 16 < bp2.LL.x)
2779 bp1.UR.setDouble("x", bp2.LL.x + 16);
2780 }
2781 }
2782 } finally {
2783 LEAVING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath");
2784 }
2785 }
2786
2787
2788
2789
2790 //3 bajn5vx0isu427n6dh131b985
2791 // static boxf rank_box(spline_info_t* sp, graph_t * g, int r)
2792 public static ST_boxf rank_box(ST_spline_info_t sp, ST_Agraph_s g, int r) {
2793 // WARNING!! STRUCT
2794 return rank_box_w_(sp, g, r).copy();
2795 }
2796 private static ST_boxf rank_box_w_(ST_spline_info_t sp, ST_Agraph_s g, int r) {
2797 ENTERING("bajn5vx0isu427n6dh131b985","rank_box");
2798 try {
2799 final ST_boxf b = new ST_boxf();
2800 ST_Agnode_s /* *right0, *right1, */ left0, left1;
2801 b.___(sp.Rank_box[r]);
2802 if (b.LL.x == b.UR.x) {
2803 left0 = (ST_Agnode_s) GD_rank(g).get(r).v.get(0);
2804 /* right0 = GD_rank(g)[r].v[GD_rank(g)[r].n - 1]; */
2805 left1 = (ST_Agnode_s) GD_rank(g).get(r + 1).v.get(0);
2806 /* right1 = GD_rank(g)[r + 1].v[GD_rank(g)[r + 1].n - 1]; */
2807 b.LL.x = sp.LeftBound;
2808 b.LL.y = ND_coord(left1).y + GD_rank(g).get(r + 1).ht2;
2809 b.UR.x = sp.RightBound;
2810 b.UR.y = ND_coord(left0).y - GD_rank(g).get(r).ht1;
2811 sp.Rank_box[r].setStruct(b);
2812 }
2813 return b;
2814 } finally {
2815 LEAVING("bajn5vx0isu427n6dh131b985","rank_box");
2816 }
2817 }
2818
2819
2820
2821
2822 //3 6qwcnugx2ytjrvi5rgxzyzg5i
2823 // static int straight_len(node_t * n)
2824 public static int straight_len(ST_Agnode_s n) {
2825 ENTERING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len");
2826 try {
2827 int cnt = 0;
2828 ST_Agnode_s v;
2829 v = n;
2830 while (true) {
2831 v = (ST_Agnode_s) aghead(ND_out(v).getFromList(0));
2832 if (ND_node_type(v) != 1)
2833 break;
2834 if ((ND_out(v).size != 1) || (ND_in(v).size != 1))
2835 break;
2836 if (ND_coord(v).x != ND_coord(n).x)
2837 break;
2838 cnt++;
2839 }
2840 return cnt;
2841 } finally {
2842 LEAVING("6qwcnugx2ytjrvi5rgxzyzg5i","straight_len");
2843 }
2844 }
2845
2846
2847
2848
2849 //3 15pgjjuil2c1rjldu29j07gbz
2850 // static edge_t *straight_path(edge_t * e, int cnt, pointf * plist, int *np)
2851 public static ST_Agedge_s straight_path(ST_Agedge_s e, int cnt, __ptr__ plist, int np[]) {
2852 ENTERING("15pgjjuil2c1rjldu29j07gbz","straight_path");
2853 try {
2854 int n = np[0];
2855 ST_Agedge_s f = e;
2856 while ((cnt--)!=0)
2857 f = (ST_Agedge_s) ND_out(aghead(f)).getFromList(0);
2858 plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
2859 plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
2860 plist.plus(np[0]).setStruct(ND_coord(agtail(f))); /* will be overwritten by next spline */
2861 return f;
2862 } finally {
2863 LEAVING("15pgjjuil2c1rjldu29j07gbz","straight_path");
2864 }
2865 }
2866
2867
2868
2869
2870 //3 4ilkzqtegd5uffawb4qcjthu1
2871 // static void recover_slack(edge_t * e, path * p)
2872 public static void recover_slack(ST_Agedge_s e, ST_path p) {
2873 ENTERING("4ilkzqtegd5uffawb4qcjthu1","recover_slack");
2874 try {
2875 int b;
2876 ST_Agnode_s vn;
2877 b = 0; /* skip first rank box */
2878 for (vn = aghead(e);
2879 ND_node_type(vn) == 1 && N(((Boolean)Z.z().sinfo.splineMerge.exe(vn)).booleanValue());
2880 vn = aghead(ND_out(vn).getFromList(0))) {
2881 while ((b < p.nbox) && (p.boxes[b].LL.y > ND_coord(vn).y))
2882 b++;
2883 if (b >= p.nbox)
2884 break;
2885 if (p.boxes[b].UR.y < ND_coord(vn).y)
2886 continue;
2887 if (ND_label(vn)!=null)
2888 resize_vn(vn, (int)p.boxes[b].LL.x, (int)p.boxes[b].UR.x,
2889 (int)(p.boxes[b].UR.x + ND_rw(vn)));
2890 else
2891 resize_vn(vn, (int)p.boxes[b].LL.x, (int)((p.boxes[b].LL.x +
2892 p.boxes[b].UR.x) / 2),
2893 (int)p.boxes[b].UR.x);
2894 }
2895 } finally {
2896 LEAVING("4ilkzqtegd5uffawb4qcjthu1","recover_slack");
2897 }
2898 }
2899
2900
2901
2902
2903 //3 3vmg1q1r0eb14etvjdk4cukpd
2904 // static void resize_vn(vn, lx, cx, rx) node_t *vn
2905 public static void resize_vn(ST_Agnode_s vn, int lx, int cx, int rx) {
2906 ENTERING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn");
2907 try {
2908 ND_coord(vn).setDouble("x", cx);
2909 ND_lw(vn, cx - lx);
2910 ND_rw(vn, rx - cx);
2911 } finally {
2912 LEAVING("3vmg1q1r0eb14etvjdk4cukpd","resize_vn");
2913 }
2914 }
2915
2916
2917
2918
2919 //3 9t0v5wicmjuc3ij9hko6iawle
2920 // static edge_t *top_bound(edge_t * e, int side)
2921 public static ST_Agedge_s top_bound(ST_Agedge_s e, int side) {
2922 ENTERING("9t0v5wicmjuc3ij9hko6iawle","top_bound");
2923 try {
2924 ST_Agedge_s f, ans = null;
2925 int i;
2926 for (i = 0; (f = (ST_Agedge_s) ND_out(agtail(e)).getFromList(i))!=null; i++) {
2927 if (side * (ND_order(aghead(f)) - ND_order(aghead(e))) <= 0)
2928 continue;
2929 if ((ED_spl(f) == null)
2930 && ((ED_to_orig(f) == null) || (ED_spl(ED_to_orig(f)) == null)))
2931 continue;
2932 if ((ans == null)
2933 || (side * (ND_order(aghead(ans)) - ND_order(aghead(f))) > 0))
2934 ans = f;
2935 }
2936 return ans;
2937 } finally {
2938 LEAVING("9t0v5wicmjuc3ij9hko6iawle","top_bound");
2939 }
2940 }
2941
2942
2943
2944
2945 //3 9fsg0uiyhtrayd4mimmc0i25e
2946 // static edge_t *bot_bound(edge_t * e, int side)
2947 public static ST_Agedge_s bot_bound(ST_Agedge_s e, int side) {
2948 ENTERING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
2949 try {
2950 ST_Agedge_s f, ans = null;
2951 int i;
2952 for (i = 0; (f = (ST_Agedge_s) ND_in(aghead(e)).getFromList(i))!=null; i++) {
2953 if (side * (ND_order(agtail(f)) - ND_order(agtail(e))) <= 0)
2954 continue;
2955 if ((ED_spl(f) == null)
2956 && ((ED_to_orig(f) == null) || (ED_spl(ED_to_orig(f)) == null)))
2957 continue;
2958 if ((ans == null)
2959 || (side * (ND_order(agtail(ans)) - ND_order(agtail(f))) > 0))
2960 ans = f;
2961 }
2962 return ans;
2963 } finally {
2964 LEAVING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
2965 }
2966 }
2967
2968
2969
2970
2971 //3 65uvkv1mextaah5m997ibe3qs
2972 // static int cl_vninside(graph_t * cl, node_t * n)
2973 public static boolean cl_vninside(ST_Agraph_s cl, ST_Agnode_s n) {
2974 ENTERING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
2975 try {
2976 return (BETWEEN(GD_bb(cl).LL.x, (double)(ND_coord(n).x), GD_bb(cl).UR.x) &&
2977 BETWEEN(GD_bb(cl).LL.y, (double)(ND_coord(n).y), GD_bb(cl).UR.y));
2978 } finally {
2979 LEAVING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
2980 }
2981 }
2982
2983
2984
2985
2986 //3 dzvvmxkya868w5x78lkvchigk
2987 // static Agraph_t *cl_bound(graph_t* g, node_t *n, node_t *adj)
2988 public static ST_Agraph_s cl_bound(ST_Agraph_s g, ST_Agnode_s n, ST_Agnode_s adj) {
2989 ENTERING("dzvvmxkya868w5x78lkvchigk","cl_bound");
2990 try {
2991 ST_Agraph_s rv, cl, tcl, hcl;
2992 ST_Agedge_s orig;
2993 rv = null;
2994 if (ND_node_type(n) == 0)
2995 tcl = hcl = ND_clust(n);
2996 else {
2997 orig = ED_to_orig(ND_out(n).getFromList(0));
2998 tcl = ND_clust(agtail(orig));
2999 hcl = ND_clust(aghead(orig));
3000 }
3001 if (ND_node_type(adj) == 0) {
3002 cl = ( EQ(ND_clust(adj), g) ? null:ND_clust(adj));
3003 if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl))
3004 rv = cl;
3005 } else {
3006 orig = ED_to_orig(ND_out(adj).getFromList(0));
3007 cl = ( EQ(ND_clust(agtail(orig)), g) ? null:ND_clust(agtail(orig)));
3008 if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl) && cl_vninside(cl, adj))
3009 rv = cl;
3010 else {
3011 cl = ( EQ(ND_clust(aghead(orig)), g) ? null:ND_clust(aghead(orig)));
3012 if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl) && cl_vninside(cl, adj))
3013 rv = cl;
3014 }
3015 }
3016 return rv;
3017 } finally {
3018 LEAVING("dzvvmxkya868w5x78lkvchigk","cl_bound");
3019 }
3020 }
3021
3022
3023
3024
3025 //3 6qwgl36ugfnduc5x59ohuewv1
3026 // static boxf maximal_bbox(graph_t* g, spline_info_t* sp, node_t* vn, edge_t* ie, edge_t* oe)
3027 public static ST_boxf maximal_bbox(ST_Agraph_s g, ST_spline_info_t sp, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe) {
3028 // WARNING!! STRUCT
3029 return maximal_bbox_w_(g, sp, vn, ie, oe).copy();
3030 }
3031 private static ST_boxf maximal_bbox_w_(ST_Agraph_s g, ST_spline_info_t sp, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe) {
3032 ENTERING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
3033 try {
3034 double b, nb;
3035 ST_Agraph_s left_cl, right_cl;
3036 ST_Agnode_s left, right;
3037 final ST_boxf rv = new ST_boxf();
3038 left_cl = right_cl = null;
3039 /* give this node all the available space up to its neighbors */
3040 b = (double)(ND_coord(vn).x - ND_lw(vn) - 4);
3041 if ((left = neighbor(g, vn, ie, oe, -1))!=null) {
3042 if ((left_cl = cl_bound(g, vn, left))!=null)
3043 nb = GD_bb(left_cl).UR.x + (double)(sp.Splinesep);
3044 else {
3045 nb = (double)(ND_coord(left).x + ND_mval(left));
3046 if (ND_node_type(left) == 0)
3047 nb += GD_nodesep(g) / 2.;
3048 else
3049 nb += (double)(sp.Splinesep);
3050 }
3051 if (nb < b)
3052 b = nb;
3053 rv.LL.x = ROUND(b);
3054 } else
3055 rv.LL.x = MIN(ROUND(b), sp.LeftBound);
3056 /* we have to leave room for our own label! */
3057 if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null))
3058 b = (double)(ND_coord(vn).x + 10);
3059 else
3060 b = (double)(ND_coord(vn).x + ND_rw(vn) + 4);
3061 if ((right = neighbor(g, vn, ie, oe, 1))!=null) {
3062 if ((right_cl = cl_bound(g, vn, right))!=null)
3063 nb = GD_bb(right_cl).LL.x - (double)(sp.Splinesep);
3064 else {
3065 nb = ND_coord(right).x - ND_lw(right);
3066 if (ND_node_type(right) == 0)
3067 nb -= GD_nodesep(g) / 2.;
3068 else
3069 nb -= (double)(sp.Splinesep);
3070 }
3071 if (nb > b)
3072 b = nb;
3073 rv.UR.x = ROUND(b);
3074 } else
3075 rv.UR.x = MAX(ROUND(b), sp.RightBound);
3076 if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null)) {
3077 rv.UR.x = rv.UR.x - ND_rw(vn);
3078 if (rv.UR.x < rv.LL.x) rv.UR.x = ND_coord(vn).x;
3079 }
3080 rv.LL.y = ND_coord(vn).y - GD_rank(g).get(ND_rank(vn)).ht1;
3081 rv.UR.y = ND_coord(vn).y + GD_rank(g).get(ND_rank(vn)).ht2;
3082 return rv;
3083 } finally {
3084 LEAVING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
3085 }
3086 }
3087
3088
3089
3090
3091 //3 18pm6r3xcy90f0xi5hpm9jdhk
3092 // static node_t * neighbor(graph_t* g, node_t *vn, edge_t *ie, edge_t *oe, int dir)
3093 public static ST_Agnode_s neighbor(ST_Agraph_s g, ST_Agnode_s vn, ST_Agedge_s ie, ST_Agedge_s oe, int dir) {
3094 ENTERING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor");
3095 try {
3096 int i;
3097 ST_Agnode_s n, rv = null;
3098 ST_rank_t.Array2 rank = GD_rank(g).plus(ND_rank(vn));
3099 for (i = ND_order(vn) + dir; ((i >= 0) && (i < rank.getPtr().n)); i += dir) {
3100 n = (ST_Agnode_s) rank.getPtr().v.get(i);
3101 if ((ND_node_type(n) == 1) && (ND_label(n)!=null)) {
3102 rv = n;
3103 break;
3104 }
3105 if (ND_node_type(n) == 0) {
3106 rv = n;
3107 break;
3108 }
3109 if (pathscross(n, vn, ie, oe) == false) {
3110 rv = n;
3111 break;
3112 }
3113 }
3114 return rv;
3115 } finally {
3116 LEAVING("18pm6r3xcy90f0xi5hpm9jdhk","neighbor");
3117 }
3118 }
3119
3120
3121
3122
3123 //3 f4q0oqe165s9pl5k0th5noeyv
3124 // static boolean pathscross(n0, n1, ie1, oe1) node_t *n0, *n1
3125 public static boolean pathscross(ST_Agnode_s n0, ST_Agnode_s n1, ST_Agedge_s ie1, ST_Agedge_s oe1) {
3126 ENTERING("f4q0oqe165s9pl5k0th5noeyv","pathscross");
3127 try {
3128 ST_Agedge_s e0, e1;
3129 ST_Agnode_s na, nb;
3130 boolean order;
3131 int cnt;
3132 order = (ND_order(n0) > ND_order(n1));
3133 if ((ND_out(n0).size != 1) && (ND_out(n0).size != 1))
3134 return false;
3135 e1 = oe1;
3136 if (ND_out(n0).size == 1 && e1!=null) {
3137 e0 = (ST_Agedge_s) ND_out(n0).getFromList(0);
3138 for (cnt = 0; cnt < 2; cnt++) {
3139 if (EQ(na = aghead(e0), nb = aghead(e1)))
3140 break;
3141 if (order != (ND_order(na) > ND_order(nb)))
3142 return NOT(false);
3143 if ((ND_out(na).size != 1) || (ND_node_type(na) == 0))
3144 break;
3145 e0 = (ST_Agedge_s) ND_out(na).getFromList(0);
3146 if ((ND_out(nb).size != 1) || (ND_node_type(nb) == 0))
3147 break;
3148 e1 = (ST_Agedge_s) ND_out(nb).getFromList(0);
3149 }
3150 }
3151 e1 = ie1;
3152 if (ND_in(n0).size == 1 && e1!=null) {
3153 e0 = (ST_Agedge_s) ND_in(n0).getFromList(0);
3154 for (cnt = 0; cnt < 2; cnt++) {
3155 if (EQ(na = agtail(e0), nb = agtail(e1)))
3156 break;
3157 if (order != (ND_order(na) > ND_order(nb)))
3158 return NOT(false);
3159 if ((ND_in(na).size != 1) || (ND_node_type(na) == 0))
3160 break;
3161 e0 = (ST_Agedge_s) ND_in(na).getFromList(0);
3162 if ((ND_in(nb).size != 1) || (ND_node_type(nb) == 0))
3163 break;
3164 e1 = (ST_Agedge_s) ND_in(nb).getFromList(0);
3165 }
3166 }
3167 return false;
3168 } finally {
3169 LEAVING("f4q0oqe165s9pl5k0th5noeyv","pathscross");
3170 }
3171 }
3172
3173
3174 }