| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
package gen.lib.dotgen; |
| 47 |
import static gen.lib.cgraph.attr__c.agget; |
| 48 |
import static gen.lib.cgraph.edge__c.aghead; |
| 49 |
import static gen.lib.cgraph.edge__c.agtail; |
| 50 |
import static gen.lib.cgraph.graph__c.agnnodes; |
| 51 |
import static gen.lib.cgraph.obj__c.agcontains; |
| 52 |
import static gen.lib.cgraph.obj__c.agroot; |
| 53 |
import static gen.lib.common.ns__c.rank; |
| 54 |
import static gen.lib.common.splines__c.selfRightSpace; |
| 55 |
import static gen.lib.common.utils__c.late_int; |
| 56 |
import static gen.lib.dotgen.cluster__c.mark_lowclusters; |
| 57 |
import static gen.lib.dotgen.conc__c.dot_concentrate; |
| 58 |
import static gen.lib.dotgen.dotinit__c.dot_root; |
| 59 |
import static gen.lib.dotgen.fastgr__c.fast_edge; |
| 60 |
import static gen.lib.dotgen.fastgr__c.find_fast_edge; |
| 61 |
import static gen.lib.dotgen.fastgr__c.virtual_node; |
| 62 |
import static gen.lib.dotgen.fastgr__c.zapinlist; |
| 63 |
import static gen.lib.dotgen.flat__c.flat_edges; |
| 64 |
import static smetana.core.JUtils.EQ; |
| 65 |
import static smetana.core.JUtils.NEQ; |
| 66 |
import static smetana.core.JUtils.USHRT_MAX; |
| 67 |
import static smetana.core.JUtils.atof; |
| 68 |
import static smetana.core.JUtils.enumAsInt; |
| 69 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 70 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 71 |
import static smetana.core.Macro.AGINEDGE; |
| 72 |
import static smetana.core.Macro.AGOUTEDGE; |
| 73 |
import static smetana.core.Macro.AGTYPE; |
| 74 |
import static smetana.core.Macro.ALLOC_allocated_ST_Agnode_s; |
| 75 |
import static smetana.core.Macro.ED_dist; |
| 76 |
import static smetana.core.Macro.ED_head_port; |
| 77 |
import static smetana.core.Macro.ED_label; |
| 78 |
import static smetana.core.Macro.ED_minlen; |
| 79 |
import static smetana.core.Macro.ED_tail_port; |
| 80 |
import static smetana.core.Macro.ED_to_orig; |
| 81 |
import static smetana.core.Macro.ED_weight; |
| 82 |
import static smetana.core.Macro.GD_bb; |
| 83 |
import static smetana.core.Macro.GD_border; |
| 84 |
import static smetana.core.Macro.GD_clust; |
| 85 |
import static smetana.core.Macro.GD_drawing; |
| 86 |
import static smetana.core.Macro.GD_exact_ranksep; |
| 87 |
import static smetana.core.Macro.GD_flip; |
| 88 |
import static smetana.core.Macro.GD_has_labels; |
| 89 |
import static smetana.core.Macro.GD_ht1; |
| 90 |
import static smetana.core.Macro.GD_ht2; |
| 91 |
import static smetana.core.Macro.GD_label; |
| 92 |
import static smetana.core.Macro.GD_ln; |
| 93 |
import static smetana.core.Macro.GD_maxrank; |
| 94 |
import static smetana.core.Macro.GD_minrank; |
| 95 |
import static smetana.core.Macro.GD_n_cluster; |
| 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.GD_rn; |
| 101 |
import static smetana.core.Macro.INT_MAX; |
| 102 |
import static smetana.core.Macro.MAX; |
| 103 |
import static smetana.core.Macro.MIN; |
| 104 |
import static smetana.core.Macro.N; |
| 105 |
import static smetana.core.Macro.ND_UF_size; |
| 106 |
import static smetana.core.Macro.ND_alg; |
| 107 |
import static smetana.core.Macro.ND_clust; |
| 108 |
import static smetana.core.Macro.ND_coord; |
| 109 |
import static smetana.core.Macro.ND_flat_out; |
| 110 |
import static smetana.core.Macro.ND_ht; |
| 111 |
import static smetana.core.Macro.ND_in; |
| 112 |
import static smetana.core.Macro.ND_inleaf; |
| 113 |
import static smetana.core.Macro.ND_lw; |
| 114 |
import static smetana.core.Macro.ND_mval; |
| 115 |
import static smetana.core.Macro.ND_next; |
| 116 |
import static smetana.core.Macro.ND_node_type; |
| 117 |
import static smetana.core.Macro.ND_order; |
| 118 |
import static smetana.core.Macro.ND_other; |
| 119 |
import static smetana.core.Macro.ND_out; |
| 120 |
import static smetana.core.Macro.ND_outleaf; |
| 121 |
import static smetana.core.Macro.ND_prev; |
| 122 |
import static smetana.core.Macro.ND_rank; |
| 123 |
import static smetana.core.Macro.ND_ranktype; |
| 124 |
import static smetana.core.Macro.ND_rw; |
| 125 |
import static smetana.core.Macro.ND_save_in; |
| 126 |
import static smetana.core.Macro.ND_save_out; |
| 127 |
import static smetana.core.Macro.NOT; |
| 128 |
import static smetana.core.Macro.ROUND; |
| 129 |
import static smetana.core.Macro.UNSUPPORTED; |
| 130 |
import static smetana.core.Macro.aghead; |
| 131 |
import static smetana.core.Macro.agtail; |
| 132 |
import static smetana.core.Macro.alloc_elist; |
| 133 |
import static smetana.core.Macro.free_list; |
| 134 |
import h.ST_Agedge_s; |
| 135 |
import h.ST_Agedgeinfo_t; |
| 136 |
import h.ST_Agedgepair_s; |
| 137 |
import h.ST_Agnode_s; |
| 138 |
import h.ST_Agraph_s; |
| 139 |
import h.ST_aspect_t; |
| 140 |
import h.ST_point; |
| 141 |
import h.ST_pointf; |
| 142 |
import h.ST_rank_t; |
| 143 |
import h.ratio_t; |
| 144 |
import smetana.core.CString; |
| 145 |
import smetana.core.Memory; |
| 146 |
import smetana.core.Z; |
| 147 |
|
| 148 |
public class position__c { |
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
|
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
|
| 339 |
|
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
public static Object pointof(Object... arg) { |
| 390 |
UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); |
| 391 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 392 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 393 |
UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); |
| 394 |
UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); |
| 395 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 396 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 397 |
|
| 398 |
throw new UnsupportedOperationException(); |
| 399 |
} |
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
public static ST_pointf pointfof(double x, double y) { |
| 407 |
|
| 408 |
return pointfof_w_(x, y).copy(); |
| 409 |
} |
| 410 |
private static ST_pointf pointfof_w_(double x, double y) { |
| 411 |
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 412 |
try { |
| 413 |
final ST_pointf r = new ST_pointf(); |
| 414 |
r.setDouble("x", x); |
| 415 |
r.setDouble("y", y); |
| 416 |
return r; |
| 417 |
} finally { |
| 418 |
LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 419 |
} |
| 420 |
} |
| 421 |
|
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
public static Object boxof(Object... arg) { |
| 428 |
UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); |
| 429 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 430 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 431 |
UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); |
| 432 |
UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); |
| 433 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 434 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 435 |
|
| 436 |
throw new UnsupportedOperationException(); |
| 437 |
} |
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
public static Object add_point(Object... arg) { |
| 449 |
UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); |
| 450 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 451 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 452 |
UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); |
| 453 |
UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); |
| 454 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 455 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 456 |
|
| 457 |
throw new UnsupportedOperationException(); |
| 458 |
} |
| 459 |
|
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) { |
| 466 |
|
| 467 |
return add_pointf_w_(p.copy(), q.copy()).copy(); |
| 468 |
} |
| 469 |
private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) { |
| 470 |
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 471 |
try { |
| 472 |
final ST_pointf r = new ST_pointf(); |
| 473 |
r.setDouble("x", p.x + q.x); |
| 474 |
r.setDouble("y", p.y + q.y); |
| 475 |
return r; |
| 476 |
} finally { |
| 477 |
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 478 |
} |
| 479 |
} |
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
public static Object sub_point(Object... arg) { |
| 487 |
UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); |
| 488 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 489 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 490 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 491 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 492 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 493 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 494 |
|
| 495 |
throw new UnsupportedOperationException(); |
| 496 |
} |
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
public static Object sub_pointf(Object... arg) { |
| 504 |
UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); |
| 505 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 506 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 507 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 508 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 509 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 510 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 511 |
|
| 512 |
throw new UnsupportedOperationException(); |
| 513 |
} |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
public static Object mid_point(Object... arg) { |
| 521 |
UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); |
| 522 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 523 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 524 |
UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); |
| 525 |
UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); |
| 526 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 527 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 528 |
|
| 529 |
throw new UnsupportedOperationException(); |
| 530 |
} |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
public static Object mid_pointf(Object... arg) { |
| 538 |
UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); |
| 539 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 540 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 541 |
UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); |
| 542 |
UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); |
| 543 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 544 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 545 |
|
| 546 |
throw new UnsupportedOperationException(); |
| 547 |
} |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
public static Object interpolate_pointf(Object... arg) { |
| 555 |
UNSUPPORTED("894yimn33kmtm454llwdaotu8"); |
| 556 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 557 |
UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); |
| 558 |
UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); |
| 559 |
UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); |
| 560 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 561 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 562 |
|
| 563 |
throw new UnsupportedOperationException(); |
| 564 |
} |
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
public static Object exch_xy(Object... arg) { |
| 572 |
UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); |
| 573 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 574 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 575 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 576 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 577 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 578 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 579 |
|
| 580 |
throw new UnsupportedOperationException(); |
| 581 |
} |
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
public static Object exch_xyf(Object... arg) { |
| 589 |
UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); |
| 590 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 591 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 592 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 593 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 594 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 595 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 596 |
|
| 597 |
throw new UnsupportedOperationException(); |
| 598 |
} |
| 599 |
|
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
|
| 604 |
|
| 605 |
public static Object box_bb(Object... arg) { |
| 606 |
UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); |
| 607 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 608 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 609 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 610 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 611 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 612 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 613 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 614 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 615 |
|
| 616 |
throw new UnsupportedOperationException(); |
| 617 |
} |
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
public static Object boxf_bb(Object... arg) { |
| 625 |
UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); |
| 626 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 627 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 628 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 629 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 630 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 631 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 632 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 633 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 634 |
|
| 635 |
throw new UnsupportedOperationException(); |
| 636 |
} |
| 637 |
|
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
public static Object box_intersect(Object... arg) { |
| 644 |
UNSUPPORTED("34gv28cldst09bl71itjgviue"); |
| 645 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 646 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 647 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 648 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 649 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 650 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 651 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 652 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 653 |
|
| 654 |
throw new UnsupportedOperationException(); |
| 655 |
} |
| 656 |
|
| 657 |
|
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
public static Object boxf_intersect(Object... arg) { |
| 663 |
UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); |
| 664 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 665 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 666 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 667 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 668 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 669 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 670 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 671 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 672 |
|
| 673 |
throw new UnsupportedOperationException(); |
| 674 |
} |
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 |
|
| 680 |
|
| 681 |
public static Object box_overlap(Object... arg) { |
| 682 |
UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); |
| 683 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 684 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 685 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 686 |
|
| 687 |
throw new UnsupportedOperationException(); |
| 688 |
} |
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 |
public static Object boxf_overlap(Object... arg) { |
| 696 |
UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); |
| 697 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 698 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 699 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 700 |
|
| 701 |
throw new UnsupportedOperationException(); |
| 702 |
} |
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
|
| 707 |
|
| 708 |
|
| 709 |
public static Object box_contains(Object... arg) { |
| 710 |
UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); |
| 711 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 712 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 713 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 714 |
|
| 715 |
throw new UnsupportedOperationException(); |
| 716 |
} |
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
|
| 721 |
|
| 722 |
|
| 723 |
public static Object boxf_contains(Object... arg) { |
| 724 |
UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); |
| 725 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 726 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 727 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 728 |
|
| 729 |
throw new UnsupportedOperationException(); |
| 730 |
} |
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
public static Object perp(Object... arg) { |
| 738 |
UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); |
| 739 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 740 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 741 |
UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); |
| 742 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 743 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 744 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 745 |
|
| 746 |
throw new UnsupportedOperationException(); |
| 747 |
} |
| 748 |
|
| 749 |
|
| 750 |
|
| 751 |
|
| 752 |
|
| 753 |
|
| 754 |
public static Object scale(Object... arg) { |
| 755 |
UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); |
| 756 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 757 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 758 |
UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); |
| 759 |
UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); |
| 760 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 761 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 762 |
|
| 763 |
throw new UnsupportedOperationException(); |
| 764 |
} |
| 765 |
|
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
|
| 771 |
public static double largeMinlen(double l) { |
| 772 |
ENTERING("6knxbdrmgk6294aw61s2lpvvf","largeMinlen"); |
| 773 |
try { |
| 774 |
UNSUPPORTED("lt6cippjix5bbvyhkcpl8g7g"); |
| 775 |
UNSUPPORTED("e2f0xhw6om2fpgt48xyjjg3i"); |
| 776 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 777 |
UNSUPPORTED("dad2o3vzemegi5fywxl7hcezk"); |
| 778 |
UNSUPPORTED("dlasv24dnuygpwagcamhyg15w"); |
| 779 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 780 |
|
| 781 |
throw new UnsupportedOperationException(); |
| 782 |
} finally { |
| 783 |
LEAVING("6knxbdrmgk6294aw61s2lpvvf","largeMinlen"); |
| 784 |
} |
| 785 |
} |
| 786 |
|
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
public static void connectGraph(ST_Agraph_s g) { |
| 793 |
ENTERING("ccowbxkwmrj75tojopmhcmubx","connectGraph"); |
| 794 |
try { |
| 795 |
int i, j, r, found; |
| 796 |
ST_Agnode_s tp; |
| 797 |
ST_Agnode_s hp; |
| 798 |
ST_Agnode_s sn; |
| 799 |
ST_Agedge_s e; |
| 800 |
ST_rank_t.Array2 rp; |
| 801 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 802 |
rp = GD_rank(g).plus(r); |
| 803 |
found =0; |
| 804 |
tp = null; |
| 805 |
for (i = 0; i < rp.getPtr().n; i++) { |
| 806 |
tp = (ST_Agnode_s) rp.getPtr().v.get(i); |
| 807 |
if (ND_save_out(tp).listNotNull()) { |
| 808 |
for (j = 0; (e = (ST_Agedge_s) ND_save_out(tp).getFromList(j))!=null; j++) { |
| 809 |
if ((ND_rank(aghead(e)) > r) || (ND_rank(agtail(e)) > r)) { |
| 810 |
found = 1; |
| 811 |
break; |
| 812 |
} |
| 813 |
} |
| 814 |
if (found!=0) break; |
| 815 |
} |
| 816 |
if (ND_save_in(tp).listNotNull()) { |
| 817 |
for (j = 0; (e = (ST_Agedge_s) ND_save_in(tp).getFromList(j))!=null; j++) { |
| 818 |
if ((ND_rank(agtail(e)) > r) || (ND_rank(aghead(e)) > r)) { |
| 819 |
found = 1; |
| 820 |
break; |
| 821 |
} |
| 822 |
} |
| 823 |
if (found!=0) break; |
| 824 |
} |
| 825 |
} |
| 826 |
if (found!=0 || N(tp)) continue; |
| 827 |
tp = (ST_Agnode_s) rp.getPtr().v.get(0); |
| 828 |
if (r < GD_maxrank(g)) hp = (ST_Agnode_s) rp.get(1).v.get(0); |
| 829 |
else hp = (ST_Agnode_s) rp.plus(-1).getPtr().v.get(0); |
| 830 |
|
| 831 |
sn = virtual_node(g); |
| 832 |
ND_node_type(sn, 2); |
| 833 |
make_aux_edge(sn, tp, 0, 0); |
| 834 |
make_aux_edge(sn, hp, 0, 0); |
| 835 |
ND_rank(sn, MIN(ND_rank(tp), ND_rank(hp))); |
| 836 |
} |
| 837 |
} finally { |
| 838 |
LEAVING("ccowbxkwmrj75tojopmhcmubx","connectGraph"); |
| 839 |
} |
| 840 |
} |
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
public static void dot_position(ST_Agraph_s g, ST_aspect_t asp) { |
| 848 |
ENTERING("33snzyd9z0loienur06dnily9","dot_position"); |
| 849 |
try { |
| 850 |
if (GD_nlist(g) == null) |
| 851 |
return; |
| 852 |
mark_lowclusters(g); |
| 853 |
set_ycoords(g); |
| 854 |
if (Z.z().Concentrate) |
| 855 |
dot_concentrate(g); |
| 856 |
expand_leaves(g); |
| 857 |
if (flat_edges(g)!=0) |
| 858 |
set_ycoords(g); |
| 859 |
create_aux_edges(g); |
| 860 |
if (rank(g, 2, nsiter2(g))!=0) { |
| 861 |
connectGraph (g); |
| 862 |
|
| 863 |
} |
| 864 |
set_xcoords(g); |
| 865 |
set_aspect(g, asp); |
| 866 |
remove_aux_edges(g); |
| 867 |
|
| 868 |
|
| 869 |
} finally { |
| 870 |
LEAVING("33snzyd9z0loienur06dnily9","dot_position"); |
| 871 |
} |
| 872 |
} |
| 873 |
|
| 874 |
|
| 875 |
|
| 876 |
|
| 877 |
|
| 878 |
|
| 879 |
public static int nsiter2(ST_Agraph_s g) { |
| 880 |
ENTERING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2"); |
| 881 |
try { |
| 882 |
int maxiter = INT_MAX; |
| 883 |
CString s; |
| 884 |
if ((s = agget(g, new CString("nslimit")))!=null) |
| 885 |
maxiter = (int)(atof(s) * agnnodes(g)); |
| 886 |
return maxiter; |
| 887 |
} finally { |
| 888 |
LEAVING("90vn63m6v0w9fn9a2dgfxxx3h","nsiter2"); |
| 889 |
} |
| 890 |
} |
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
public static boolean go(ST_Agnode_s u, ST_Agnode_s v) { |
| 898 |
ENTERING("5bax8ut6nnk4pr7yxdumk9chl","go"); |
| 899 |
try { |
| 900 |
int i; |
| 901 |
ST_Agedge_s e; |
| 902 |
if (EQ(u, v)) |
| 903 |
return NOT(false); |
| 904 |
for (i = 0; (e = (ST_Agedge_s) ND_out(u).getFromList(i))!=null; i++) { |
| 905 |
if (go(aghead(e), v)) |
| 906 |
return NOT(false); |
| 907 |
} |
| 908 |
return false; |
| 909 |
} finally { |
| 910 |
LEAVING("5bax8ut6nnk4pr7yxdumk9chl","go"); |
| 911 |
} |
| 912 |
} |
| 913 |
|
| 914 |
|
| 915 |
|
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
public static boolean canreach(ST_Agnode_s u, ST_Agnode_s v) { |
| 920 |
ENTERING("9xz8numztzj4qsq85pziahv1k","canreach"); |
| 921 |
try { |
| 922 |
return go(u, v); |
| 923 |
} finally { |
| 924 |
LEAVING("9xz8numztzj4qsq85pziahv1k","canreach"); |
| 925 |
} |
| 926 |
} |
| 927 |
|
| 928 |
|
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
public static ST_Agedge_s make_aux_edge(ST_Agnode_s u, ST_Agnode_s v, double len, int wt) { |
| 934 |
ENTERING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge"); |
| 935 |
try { |
| 936 |
ST_Agedge_s e; |
| 937 |
ST_Agedgepair_s e2 = new ST_Agedgepair_s(); |
| 938 |
AGTYPE(e2.in, AGINEDGE); |
| 939 |
AGTYPE(e2.out, AGOUTEDGE); |
| 940 |
e2.out.base.setPtr("data", new ST_Agedgeinfo_t()); |
| 941 |
e = (ST_Agedge_s) e2.out; |
| 942 |
agtail(e, u); |
| 943 |
aghead(e, v); |
| 944 |
if (len > USHRT_MAX) |
| 945 |
len = largeMinlen (len); |
| 946 |
ED_minlen(e, ROUND(len)); |
| 947 |
ED_weight(e, wt); |
| 948 |
fast_edge(e); |
| 949 |
return e; |
| 950 |
} finally { |
| 951 |
LEAVING("4cvgiatny97ou6mhqoq6aqwek","make_aux_edge"); |
| 952 |
} |
| 953 |
} |
| 954 |
|
| 955 |
|
| 956 |
|
| 957 |
|
| 958 |
|
| 959 |
|
| 960 |
public static void allocate_aux_edges(ST_Agraph_s g) { |
| 961 |
ENTERING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges"); |
| 962 |
try { |
| 963 |
int i, j, n_in; |
| 964 |
ST_Agnode_s n; |
| 965 |
|
| 966 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 967 |
ND_save_in(n, ND_in(n)); |
| 968 |
ND_save_out(n, ND_out(n)); |
| 969 |
for (i = 0; ND_out(n).getFromList(i)!=null; i++); |
| 970 |
for (j = 0; ND_in(n).getFromList(j)!=null; j++); |
| 971 |
n_in = i + j; |
| 972 |
alloc_elist(n_in + 3, ND_in(n)); |
| 973 |
alloc_elist(3, ND_out(n)); |
| 974 |
} |
| 975 |
} finally { |
| 976 |
LEAVING("53fvij7oun7aezlb7x66vzuyb","allocate_aux_edges"); |
| 977 |
} |
| 978 |
} |
| 979 |
|
| 980 |
|
| 981 |
|
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
public static void make_LR_constraints(ST_Agraph_s g) { |
| 986 |
ENTERING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints"); |
| 987 |
try { |
| 988 |
int i, j, k; |
| 989 |
int sw; |
| 990 |
int m0, m1; |
| 991 |
double width; |
| 992 |
int sep[] = new int[2]; |
| 993 |
int nodesep; |
| 994 |
ST_Agedge_s e, e0, e1, ff; |
| 995 |
ST_Agnode_s u, v, t0, h0; |
| 996 |
ST_rank_t.Array2 rank = GD_rank(g); |
| 997 |
|
| 998 |
if ((GD_has_labels(g) & (1 << 0))!=0) { |
| 999 |
sep[0] = GD_nodesep(g); |
| 1000 |
sep[1] = 5; |
| 1001 |
} |
| 1002 |
else { |
| 1003 |
sep[1] = sep[0] = GD_nodesep(g); |
| 1004 |
} |
| 1005 |
|
| 1006 |
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { |
| 1007 |
double last; |
| 1008 |
ND_rank(rank.get(i).v.get(0), 0); |
| 1009 |
last = 0; |
| 1010 |
nodesep = sep[i & 1]; |
| 1011 |
for (j = 0; j < rank.get(i).n; j++) { |
| 1012 |
u = (ST_Agnode_s) rank.get(i).v.get(j); |
| 1013 |
ND_mval(u, ND_rw(u)); |
| 1014 |
if (ND_other(u).size > 0) { |
| 1015 |
|
| 1016 |
|
| 1017 |
|
| 1018 |
|
| 1019 |
|
| 1020 |
|
| 1021 |
|
| 1022 |
|
| 1023 |
sw = 0; |
| 1024 |
for (k = 0; (e = (ST_Agedge_s) ND_other(u).getFromList(k))!=null; k++) { |
| 1025 |
if (EQ(agtail(e), aghead(e))) { |
| 1026 |
sw += selfRightSpace (e); |
| 1027 |
} |
| 1028 |
} |
| 1029 |
ND_rw(u, ND_rw(u) + sw); |
| 1030 |
} |
| 1031 |
v = (ST_Agnode_s) rank.get(i).v.plus(j + 1).getPtr(); |
| 1032 |
if (v!=null) { |
| 1033 |
width = ND_rw(u) + ND_lw(v) + nodesep; |
| 1034 |
e0 = make_aux_edge(u, v, width, 0); |
| 1035 |
ND_rank(v, (int)(last + width)); |
| 1036 |
last = (int)(last + width); |
| 1037 |
} |
| 1038 |
|
| 1039 |
if ((e = (ST_Agedge_s) ND_alg(u))!=null) { |
| 1040 |
e0 = (ST_Agedge_s) ND_save_out(u).getFromList(0); |
| 1041 |
e1 = (ST_Agedge_s) ND_save_out(u).getFromList(1); |
| 1042 |
if (ND_order(aghead(e0)) > ND_order(aghead(e1))) { |
| 1043 |
ff = e0; |
| 1044 |
e0 = e1; |
| 1045 |
e1 = ff; |
| 1046 |
} |
| 1047 |
m0 = (ED_minlen(e) * GD_nodesep(g)) / 2; |
| 1048 |
m1 = m0 + ((int)(ND_rw(aghead(e0)) + ND_lw(agtail(e0)))); |
| 1049 |
|
| 1050 |
|
| 1051 |
if (canreach(agtail(e0), aghead(e0)) == false) |
| 1052 |
make_aux_edge(aghead(e0), agtail(e0), m1, |
| 1053 |
ED_weight(e)); |
| 1054 |
m1 = m0 + ((int)(ND_rw(agtail(e1)) + ND_lw(aghead(e1)))); |
| 1055 |
if (canreach(aghead(e1), agtail(e1)) == false) |
| 1056 |
make_aux_edge(agtail(e1), aghead(e1), m1, |
| 1057 |
ED_weight(e)); |
| 1058 |
} |
| 1059 |
|
| 1060 |
for (k = 0; k < ND_flat_out(u).size; k++) { |
| 1061 |
e = (ST_Agedge_s) ND_flat_out(u).getFromList(k); |
| 1062 |
if (ND_order(agtail(e)) < ND_order(aghead(e))) { |
| 1063 |
t0 = agtail(e); |
| 1064 |
h0 = aghead(e); |
| 1065 |
} else { |
| 1066 |
t0 = aghead(e); |
| 1067 |
h0 = agtail(e); |
| 1068 |
} |
| 1069 |
width = ND_rw(t0) + ND_lw(h0); |
| 1070 |
m0 = (int) (ED_minlen(e) * GD_nodesep(g) + width); |
| 1071 |
if ((e0 = find_fast_edge(t0, h0))!=null) { |
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
m0 = MAX(m0, (int)(width + GD_nodesep(g) + ROUND(ED_dist(e)))); |
| 1076 |
if (m0 > USHRT_MAX) |
| 1077 |
m0 = (int) largeMinlen (m0); |
| 1078 |
ED_minlen(e0, MAX(ED_minlen(e0), m0)); |
| 1079 |
ED_weight(e0, MAX(ED_weight(e0), ED_weight(e))); |
| 1080 |
} |
| 1081 |
else if (N(ED_label(e))) { |
| 1082 |
|
| 1083 |
|
| 1084 |
|
| 1085 |
|
| 1086 |
make_aux_edge(t0, h0, m0, ED_weight(e)); |
| 1087 |
} |
| 1088 |
|
| 1089 |
|
| 1090 |
|
| 1091 |
} |
| 1092 |
} |
| 1093 |
} |
| 1094 |
} finally { |
| 1095 |
LEAVING("ah28nr6mxpjeosr85bhmzd3si","make_LR_constraints"); |
| 1096 |
} |
| 1097 |
} |
| 1098 |
|
| 1099 |
|
| 1100 |
|
| 1101 |
|
| 1102 |
|
| 1103 |
|
| 1104 |
public static void make_edge_pairs(ST_Agraph_s g) { |
| 1105 |
ENTERING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs"); |
| 1106 |
try { |
| 1107 |
int i, m0, m1; |
| 1108 |
ST_Agnode_s n, sn; |
| 1109 |
ST_Agedge_s e; |
| 1110 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 1111 |
if (ND_save_out(n).listNotNull()) |
| 1112 |
for (i = 0; (e = (ST_Agedge_s) ND_save_out(n).getFromList(i))!=null; i++) { |
| 1113 |
sn = virtual_node(g); |
| 1114 |
ND_node_type(sn, 2); |
| 1115 |
m0 = (int)(ED_head_port(e).p.x - ED_tail_port(e).p.x); |
| 1116 |
if (m0 > 0) |
| 1117 |
m1 = 0; |
| 1118 |
else { |
| 1119 |
m1 = -m0; |
| 1120 |
m0 = 0; |
| 1121 |
} |
| 1122 |
make_aux_edge(sn, agtail(e), m0 + 1, ED_weight(e)); |
| 1123 |
make_aux_edge(sn, aghead(e), m1 + 1, ED_weight(e)); |
| 1124 |
ND_rank(sn, |
| 1125 |
MIN(ND_rank(agtail(e)) - m0 - 1, |
| 1126 |
ND_rank(aghead(e)) - m1 - 1)); |
| 1127 |
} |
| 1128 |
} |
| 1129 |
} finally { |
| 1130 |
LEAVING("6uruo8mutxgcni9fm8jcrw4cr","make_edge_pairs"); |
| 1131 |
} |
| 1132 |
} |
| 1133 |
|
| 1134 |
|
| 1135 |
|
| 1136 |
|
| 1137 |
|
| 1138 |
|
| 1139 |
public static void contain_clustnodes(ST_Agraph_s g) { |
| 1140 |
ENTERING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes"); |
| 1141 |
try { |
| 1142 |
int c; |
| 1143 |
ST_Agedge_s e; |
| 1144 |
if (NEQ(g, dot_root(g))) { |
| 1145 |
contain_nodes(g); |
| 1146 |
if ((e = find_fast_edge(GD_ln(g),GD_rn(g)))!=null) |
| 1147 |
ED_weight(e, ED_weight(e) + 128); |
| 1148 |
else |
| 1149 |
make_aux_edge(GD_ln(g), GD_rn(g), 1, 128); |
| 1150 |
} |
| 1151 |
for (c = 1; c <= GD_n_cluster(g); c++) |
| 1152 |
contain_clustnodes((ST_Agraph_s) GD_clust(g).get(c).getPtr()); |
| 1153 |
} finally { |
| 1154 |
LEAVING("79v3omwzni0nm3h05l3onjsbz","contain_clustnodes"); |
| 1155 |
} |
| 1156 |
} |
| 1157 |
|
| 1158 |
|
| 1159 |
|
| 1160 |
|
| 1161 |
|
| 1162 |
|
| 1163 |
public static boolean vnode_not_related_to(ST_Agraph_s g, ST_Agnode_s v) { |
| 1164 |
ENTERING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to"); |
| 1165 |
try { |
| 1166 |
ST_Agedge_s e; |
| 1167 |
if (ND_node_type(v) != 1) |
| 1168 |
return false; |
| 1169 |
for (e = (ST_Agedge_s) ND_save_out(v).getFromList(0); ED_to_orig(e)!=null; e = ED_to_orig(e)); |
| 1170 |
if (agcontains(g, agtail(e))) |
| 1171 |
return false; |
| 1172 |
if (agcontains(g, aghead(e))) |
| 1173 |
return false; |
| 1174 |
return NOT(false); |
| 1175 |
} finally { |
| 1176 |
LEAVING("24yfgklubun581fbfyx62lzsm","vnode_not_related_to"); |
| 1177 |
} |
| 1178 |
} |
| 1179 |
|
| 1180 |
|
| 1181 |
|
| 1182 |
|
| 1183 |
|
| 1184 |
|
| 1185 |
public static void keepout_othernodes(ST_Agraph_s g) { |
| 1186 |
ENTERING("73cdgjl47ohty2va766evbo4","keepout_othernodes"); |
| 1187 |
try { |
| 1188 |
int i, c, r, margin; |
| 1189 |
ST_Agnode_s u, v; |
| 1190 |
margin = late_int (g, Z.z().G_margin, 8, 0); |
| 1191 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 1192 |
if (GD_rank(g).get(r).n == 0) |
| 1193 |
continue; |
| 1194 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0); |
| 1195 |
if (v == null) |
| 1196 |
continue; |
| 1197 |
for (i = ND_order(v) - 1; i >= 0; i--) { |
| 1198 |
u = (ST_Agnode_s) GD_rank(dot_root(g)).get(r).v.get(i); |
| 1199 |
|
| 1200 |
if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) { |
| 1201 |
make_aux_edge(u, GD_ln(g), margin + ND_rw(u), 0); |
| 1202 |
break; |
| 1203 |
} |
| 1204 |
} |
| 1205 |
for (i = ND_order(v) + GD_rank(g).get(r).n; i < GD_rank(dot_root(g)).get(r).n; |
| 1206 |
i++) { |
| 1207 |
u = (ST_Agnode_s) GD_rank(dot_root(g)).get(r).v.get(i); |
| 1208 |
if ((ND_node_type(u) == 0) || vnode_not_related_to(g, u)) { |
| 1209 |
make_aux_edge(GD_rn(g), u, margin + ND_lw(u), 0); |
| 1210 |
break; |
| 1211 |
} |
| 1212 |
} |
| 1213 |
} |
| 1214 |
for (c = 1; c <= GD_n_cluster(g); c++) |
| 1215 |
keepout_othernodes((ST_Agraph_s) GD_clust(g).get(c).getPtr()); |
| 1216 |
} finally { |
| 1217 |
LEAVING("73cdgjl47ohty2va766evbo4","keepout_othernodes"); |
| 1218 |
} |
| 1219 |
} |
| 1220 |
|
| 1221 |
|
| 1222 |
|
| 1223 |
|
| 1224 |
|
| 1225 |
|
| 1226 |
public static void contain_subclust(ST_Agraph_s g) { |
| 1227 |
ENTERING("c734mx1638sfqtl7vh7itaxyx","contain_subclust"); |
| 1228 |
try { |
| 1229 |
int margin, c; |
| 1230 |
ST_Agraph_s subg; |
| 1231 |
margin = late_int (g, Z.z().G_margin, 8, 0); |
| 1232 |
make_lrvn(g); |
| 1233 |
for (c = 1; c <= GD_n_cluster(g); c++) { |
| 1234 |
subg = (ST_Agraph_s) GD_clust(g).get(c).getPtr(); |
| 1235 |
make_lrvn(subg); |
| 1236 |
make_aux_edge(GD_ln(g), GD_ln(subg), |
| 1237 |
margin + GD_border(g)[3].x, 0); |
| 1238 |
make_aux_edge(GD_rn(subg), GD_rn(g), |
| 1239 |
margin + GD_border(g)[1].x, 0); |
| 1240 |
contain_subclust(subg); |
| 1241 |
} |
| 1242 |
} finally { |
| 1243 |
LEAVING("c734mx1638sfqtl7vh7itaxyx","contain_subclust"); |
| 1244 |
} |
| 1245 |
} |
| 1246 |
|
| 1247 |
|
| 1248 |
|
| 1249 |
|
| 1250 |
|
| 1251 |
|
| 1252 |
public static void separate_subclust(ST_Agraph_s g) { |
| 1253 |
ENTERING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust"); |
| 1254 |
try { |
| 1255 |
int i, j, margin; |
| 1256 |
ST_Agraph_s low, high; |
| 1257 |
ST_Agraph_s left, right; |
| 1258 |
margin = late_int (g, Z.z().G_margin, 8, 0); |
| 1259 |
for (i = 1; i <= GD_n_cluster(g); i++) |
| 1260 |
make_lrvn((ST_Agraph_s) GD_clust(g).get(i).getPtr()); |
| 1261 |
for (i = 1; i <= GD_n_cluster(g); i++) { |
| 1262 |
for (j = i + 1; j <= GD_n_cluster(g); j++) { |
| 1263 |
low = (ST_Agraph_s) GD_clust(g).get(i).getPtr(); |
| 1264 |
high = (ST_Agraph_s) GD_clust(g).get(j).getPtr(); |
| 1265 |
if (GD_minrank(low) > GD_minrank(high)) { |
| 1266 |
ST_Agraph_s temp = low; |
| 1267 |
low = high; |
| 1268 |
high = temp; |
| 1269 |
} |
| 1270 |
if (GD_maxrank(low) < GD_minrank(high)) |
| 1271 |
continue; |
| 1272 |
if (ND_order(GD_rank(low).get(GD_minrank(high)).v.get(0)) |
| 1273 |
< ND_order(GD_rank(high).get(GD_minrank(high)).v.get(0))) { |
| 1274 |
left = low; |
| 1275 |
right = high; |
| 1276 |
} else { |
| 1277 |
left = high; |
| 1278 |
right = low; |
| 1279 |
} |
| 1280 |
make_aux_edge(GD_rn(left), GD_ln(right), margin, 0); |
| 1281 |
} |
| 1282 |
separate_subclust((ST_Agraph_s) GD_clust(g).get(i).getPtr()); |
| 1283 |
} |
| 1284 |
} finally { |
| 1285 |
LEAVING("6oruu1p1b7kxr5moh3kmcmvr3","separate_subclust"); |
| 1286 |
} |
| 1287 |
} |
| 1288 |
|
| 1289 |
|
| 1290 |
|
| 1291 |
|
| 1292 |
|
| 1293 |
|
| 1294 |
public static void pos_clusters(ST_Agraph_s g) { |
| 1295 |
ENTERING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters"); |
| 1296 |
try { |
| 1297 |
if (GD_n_cluster(g) > 0) { |
| 1298 |
contain_clustnodes(g); |
| 1299 |
keepout_othernodes(g); |
| 1300 |
contain_subclust(g); |
| 1301 |
separate_subclust(g); |
| 1302 |
} |
| 1303 |
} finally { |
| 1304 |
LEAVING("8f8gs2zivo4pnd3hmtb9g23x4","pos_clusters"); |
| 1305 |
} |
| 1306 |
} |
| 1307 |
|
| 1308 |
|
| 1309 |
|
| 1310 |
|
| 1311 |
|
| 1312 |
|
| 1313 |
public static void compress_graph(ST_Agraph_s g) { |
| 1314 |
ENTERING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph"); |
| 1315 |
try { |
| 1316 |
double x; |
| 1317 |
ST_pointf p = new ST_pointf(); |
| 1318 |
if (GD_drawing(g).ratio_kind != enumAsInt(ratio_t.class, "R_COMPRESS")) |
| 1319 |
return; |
| 1320 |
UNSUPPORTED("79oeaf0u32si2chjcpas5whjl"); |
| 1321 |
UNSUPPORTED("6a2ue1i6kvwvpgapb4z8l27jn"); |
| 1322 |
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); |
| 1323 |
UNSUPPORTED("5f3k9yz6btwxc8r5t8exytqqt"); |
| 1324 |
UNSUPPORTED("4mvbrmj6dfhaz3burnpac7zsx"); |
| 1325 |
UNSUPPORTED("dzkztznjq2andjnjzqh8i5tij"); |
| 1326 |
UNSUPPORTED("div10atae09n36x269sl208r1"); |
| 1327 |
UNSUPPORTED("ddzjdkqij3y4gq9i3hikpoqvj"); |
| 1328 |
UNSUPPORTED("e1xij2jh66kyaiikenemo1qza"); |
| 1329 |
UNSUPPORTED("5ilmnsqirjhzn5q6s3f9pkgi3"); |
| 1330 |
UNSUPPORTED("1nhxkt9jijvhw5gsp2pluh8g8"); |
| 1331 |
UNSUPPORTED("795vpnc8yojryr8b46aidsu69"); |
| 1332 |
UNSUPPORTED("dkqac1chvtsaao23vr43xqs5r"); |
| 1333 |
UNSUPPORTED("5es2j3xrdatvha5uea2wlqcxp"); |
| 1334 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1335 |
|
| 1336 |
throw new UnsupportedOperationException(); |
| 1337 |
} finally { |
| 1338 |
LEAVING("fywsxto7yvl5wa2dfu7u7jj1","compress_graph"); |
| 1339 |
} |
| 1340 |
} |
| 1341 |
|
| 1342 |
|
| 1343 |
|
| 1344 |
|
| 1345 |
|
| 1346 |
|
| 1347 |
public static void create_aux_edges(ST_Agraph_s g) { |
| 1348 |
ENTERING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges"); |
| 1349 |
try { |
| 1350 |
allocate_aux_edges(g); |
| 1351 |
make_LR_constraints(g); |
| 1352 |
make_edge_pairs(g); |
| 1353 |
pos_clusters(g); |
| 1354 |
compress_graph(g); |
| 1355 |
} finally { |
| 1356 |
LEAVING("b7y0htx4svbhaqb1a12dihlue","create_aux_edges"); |
| 1357 |
} |
| 1358 |
} |
| 1359 |
|
| 1360 |
|
| 1361 |
|
| 1362 |
|
| 1363 |
|
| 1364 |
|
| 1365 |
public static void remove_aux_edges(ST_Agraph_s g) { |
| 1366 |
ENTERING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges"); |
| 1367 |
try { |
| 1368 |
int i; |
| 1369 |
ST_Agnode_s n, nnext, nprev; |
| 1370 |
ST_Agedge_s e; |
| 1371 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 1372 |
for (i = 0; (e = (ST_Agedge_s) ND_out(n).getFromList(i))!=null; i++) { |
| 1373 |
Memory.free(e.base.data); |
| 1374 |
Memory.free(e); |
| 1375 |
} |
| 1376 |
free_list(ND_out(n)); |
| 1377 |
free_list(ND_in(n)); |
| 1378 |
ND_out(n, ND_save_out(n)); |
| 1379 |
ND_in(n, ND_save_in(n)); |
| 1380 |
} |
| 1381 |
|
| 1382 |
nprev = null; |
| 1383 |
for (n = GD_nlist(g); n!=null; n = nnext) { |
| 1384 |
nnext = ND_next(n); |
| 1385 |
if (ND_node_type(n) == 2) { |
| 1386 |
if (nprev!=null) |
| 1387 |
ND_next(nprev, nnext); |
| 1388 |
else |
| 1389 |
GD_nlist(g, nnext); |
| 1390 |
Memory.free(n.base.data); |
| 1391 |
Memory.free(n); |
| 1392 |
} else |
| 1393 |
nprev = n; |
| 1394 |
} |
| 1395 |
ND_prev(GD_nlist(g), null); |
| 1396 |
} finally { |
| 1397 |
LEAVING("euzeilq92ry8a4tcrij5s52t5","remove_aux_edges"); |
| 1398 |
} |
| 1399 |
} |
| 1400 |
|
| 1401 |
|
| 1402 |
|
| 1403 |
|
| 1404 |
|
| 1405 |
|
| 1406 |
public static void set_xcoords(ST_Agraph_s g) { |
| 1407 |
ENTERING("1oobmglea9t819y95xeel37h8","set_xcoords"); |
| 1408 |
try { |
| 1409 |
int i, j; |
| 1410 |
ST_Agnode_s v; |
| 1411 |
ST_rank_t.Array2 rank = GD_rank(g); |
| 1412 |
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) { |
| 1413 |
for (j = 0; j < rank.get(i).n; j++) { |
| 1414 |
v = (ST_Agnode_s) rank.get(i).v.get(j); |
| 1415 |
ND_coord(v).x = ND_rank(v); |
| 1416 |
ND_rank(v, i); |
| 1417 |
} |
| 1418 |
} |
| 1419 |
} finally { |
| 1420 |
LEAVING("1oobmglea9t819y95xeel37h8","set_xcoords"); |
| 1421 |
} |
| 1422 |
} |
| 1423 |
|
| 1424 |
|
| 1425 |
|
| 1426 |
|
| 1427 |
|
| 1428 |
|
| 1429 |
public static Object adjustSimple(Object... arg) { |
| 1430 |
UNSUPPORTED("6b5zs45snahyh3bzod53vasjx"); |
| 1431 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1432 |
UNSUPPORTED("4dxxcgj8emjoyp2vlrcw5xmwl"); |
| 1433 |
UNSUPPORTED("6i5o0pm41tgebv48wcngsxwqd"); |
| 1434 |
UNSUPPORTED("2clvms28da6dp56nhcz1fw6l8"); |
| 1435 |
UNSUPPORTED("3fkjf35jwcy291suh6fv3lnu"); |
| 1436 |
UNSUPPORTED("be5w8b0upg8swanznmjl6ml56"); |
| 1437 |
UNSUPPORTED("enzyy8zeeg6bsgsuwm86u5bwb"); |
| 1438 |
UNSUPPORTED("9jp6b6z7el15spss761fh4rgx"); |
| 1439 |
UNSUPPORTED("ckra1b9nceo8q21bwo5iu3rap"); |
| 1440 |
UNSUPPORTED("3jotxrk6oermksl3is78mj0e2"); |
| 1441 |
UNSUPPORTED("b905w55w58349wk9aktevaljm"); |
| 1442 |
UNSUPPORTED("bjuzvkc8hhlni54hkaef0j0xa"); |
| 1443 |
UNSUPPORTED("e9yhkch195gia8gdiu6vb4rbn"); |
| 1444 |
UNSUPPORTED("bdmop8bk7tvltc7z16xj07kqn"); |
| 1445 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1446 |
UNSUPPORTED("div10atae09n36x269sl208r1"); |
| 1447 |
UNSUPPORTED("cw3vv20i8np95bafexnuhhpdg"); |
| 1448 |
UNSUPPORTED("49prm57gvpenehfkcxz9xuxu4"); |
| 1449 |
UNSUPPORTED("axexjgvfow9k3x1l6j2my6cd"); |
| 1450 |
UNSUPPORTED("b905w55w58349wk9aktevaljm"); |
| 1451 |
UNSUPPORTED("1nebaz06hwqknqrqcnwf03z2"); |
| 1452 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1453 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1454 |
UNSUPPORTED("7o49wizb9vp55xhz88lycavep"); |
| 1455 |
UNSUPPORTED("4mq1sot7a9bxpobj9602hyyl5"); |
| 1456 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1457 |
|
| 1458 |
throw new UnsupportedOperationException(); |
| 1459 |
} |
| 1460 |
|
| 1461 |
|
| 1462 |
|
| 1463 |
|
| 1464 |
|
| 1465 |
|
| 1466 |
public static Object adjustRanks(Object... arg) { |
| 1467 |
UNSUPPORTED("47ywar141vmwjartmboxs38cz"); |
| 1468 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1469 |
UNSUPPORTED("cbyzaxb8pmtp6lo2y4tajk45s"); |
| 1470 |
UNSUPPORTED("3r7yt838qvvliagprkv30uka1"); |
| 1471 |
UNSUPPORTED("n5e6qzpiyv4zvlemheyvbky7"); |
| 1472 |
UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); |
| 1473 |
UNSUPPORTED("7p11k11wgq46szos3u4lfa5a4"); |
| 1474 |
UNSUPPORTED("39w5issxrjmte1dn2qnt8gpbj"); |
| 1475 |
UNSUPPORTED("aerooskq9gwysw6euktdqjmaq"); |
| 1476 |
UNSUPPORTED("8tm7x791luf0uq7v2q53kfuqk"); |
| 1477 |
UNSUPPORTED("div10atae09n36x269sl208r1"); |
| 1478 |
UNSUPPORTED("182pb9igel0aoytgtoiguek4x"); |
| 1479 |
UNSUPPORTED("8bcey7cvczgf3t3ominh7ye1b"); |
| 1480 |
UNSUPPORTED("1ac5605x86vam4z4spx361rpd"); |
| 1481 |
UNSUPPORTED("99d9j6m0161wdv2tu4wbf3ifi"); |
| 1482 |
UNSUPPORTED("6wacplh886lzcey0jjkfo5jcn"); |
| 1483 |
UNSUPPORTED("6jkyxr322md2frf0pic57ak6e"); |
| 1484 |
UNSUPPORTED("41b09kckthwa070wznf9tneej"); |
| 1485 |
UNSUPPORTED("7gbj2fwymn5k7pywbjc1kbhmb"); |
| 1486 |
UNSUPPORTED("clsf4pg9bdlkzghw3oq7fpo7c"); |
| 1487 |
UNSUPPORTED("9vmpt65t8kavsz1zoorcr5ik"); |
| 1488 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1489 |
UNSUPPORTED("9lx88c3pk4z5zxca5orq7v2yf"); |
| 1490 |
UNSUPPORTED("2p0gs3kpty9mg9ymk70kjekh0"); |
| 1491 |
UNSUPPORTED("34p29mvxtmpuzcgzh4s03lixs"); |
| 1492 |
UNSUPPORTED("ak9x1j2bu2d8zr8tls942u42r"); |
| 1493 |
UNSUPPORTED("ehkev01oc7ynzwkbjbzclaqj6"); |
| 1494 |
UNSUPPORTED("2906nnve3dmqroo2jsq13wfex"); |
| 1495 |
UNSUPPORTED("8s9tksg226ob1ti8o5ljo1gbg"); |
| 1496 |
UNSUPPORTED("b0dxtg7jama7mgqccujsbb97n"); |
| 1497 |
UNSUPPORTED("bfapr2l9berlmq4ubgk0zp7qf"); |
| 1498 |
UNSUPPORTED("3zllny0pp0nf7gzw7829oqexo"); |
| 1499 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1500 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1501 |
UNSUPPORTED("a86aoq62oyhhkqpyzz0um3pvq"); |
| 1502 |
UNSUPPORTED("1pmq9pca155672xcv1ow2cbfy"); |
| 1503 |
UNSUPPORTED("1kgp3b6qifeit9n2i2k8oc8qv"); |
| 1504 |
UNSUPPORTED("8f7gccnlt6m8v3k1ijaznaew3"); |
| 1505 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1506 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1507 |
|
| 1508 |
throw new UnsupportedOperationException(); |
| 1509 |
} |
| 1510 |
|
| 1511 |
|
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
|
| 1516 |
public static int clust_ht(ST_Agraph_s g) { |
| 1517 |
ENTERING("emtrqv582hdma5aajqtjd76m1","clust_ht"); |
| 1518 |
try { |
| 1519 |
int c; |
| 1520 |
double ht1, ht2; |
| 1521 |
ST_Agraph_s subg; |
| 1522 |
ST_rank_t.Array2 rank = GD_rank(dot_root(g)); |
| 1523 |
int margin, haveClustLabel = 0; |
| 1524 |
if (EQ(g, dot_root(g))) |
| 1525 |
margin = 8; |
| 1526 |
else |
| 1527 |
margin = late_int (g, Z.z().G_margin, 8, 0); |
| 1528 |
ht1 = GD_ht1(g); |
| 1529 |
ht2 = GD_ht2(g); |
| 1530 |
|
| 1531 |
for (c = 1; c <= GD_n_cluster(g); c++) { |
| 1532 |
subg = (ST_Agraph_s) GD_clust(g).get(c).getPtr(); |
| 1533 |
haveClustLabel |= clust_ht(subg); |
| 1534 |
if (GD_maxrank(subg) == GD_maxrank(g)) |
| 1535 |
ht1 = MAX(ht1, GD_ht1(subg) + margin); |
| 1536 |
if (GD_minrank(subg) == GD_minrank(g)) |
| 1537 |
ht2 = MAX(ht2, GD_ht2(subg) + margin); |
| 1538 |
} |
| 1539 |
|
| 1540 |
|
| 1541 |
if (NEQ(g, dot_root(g)) && GD_label(g)!=null) { |
| 1542 |
haveClustLabel = 1; |
| 1543 |
if (N(GD_flip(agroot(g)))) { |
| 1544 |
ht1 += GD_border(g)[0].y; |
| 1545 |
ht2 += GD_border(g)[2].y; |
| 1546 |
} |
| 1547 |
} |
| 1548 |
GD_ht1(g, ht1); |
| 1549 |
GD_ht2(g, ht2); |
| 1550 |
|
| 1551 |
if (NEQ(g, dot_root(g))) { |
| 1552 |
rank.plus(GD_minrank(g)).setDouble("ht2", MAX(rank.get(GD_minrank(g)).ht2, ht2)); |
| 1553 |
rank.plus(GD_maxrank(g)).setDouble("ht1", MAX(rank.get(GD_maxrank(g)).ht1, ht1)); |
| 1554 |
} |
| 1555 |
return haveClustLabel; |
| 1556 |
} finally { |
| 1557 |
LEAVING("emtrqv582hdma5aajqtjd76m1","clust_ht"); |
| 1558 |
} |
| 1559 |
} |
| 1560 |
|
| 1561 |
|
| 1562 |
|
| 1563 |
|
| 1564 |
|
| 1565 |
|
| 1566 |
public static void set_ycoords(ST_Agraph_s g) { |
| 1567 |
ENTERING("bp8vmol4ncadervcfossysdtd","set_ycoords"); |
| 1568 |
try { |
| 1569 |
int i, j, r; |
| 1570 |
double ht2, maxht, delta, d0, d1; |
| 1571 |
ST_Agnode_s n; |
| 1572 |
ST_Agedge_s e; |
| 1573 |
ST_rank_t.Array2 rank = GD_rank(g); |
| 1574 |
ST_Agraph_s clust; |
| 1575 |
int lbl; |
| 1576 |
ht2 = maxht = 0; |
| 1577 |
|
| 1578 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 1579 |
for (i = 0; i < rank.get(r).n; i++) { |
| 1580 |
n = (ST_Agnode_s) rank.get(r).v.get(i); |
| 1581 |
|
| 1582 |
ht2 = ND_ht(n) / 2; |
| 1583 |
|
| 1584 |
if (ND_other(n).listNotNull()) |
| 1585 |
for (j = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(j))!=null; j++) { |
| 1586 |
if (EQ(agtail(e), aghead(e))) { |
| 1587 |
if (ED_label(e)!=null) |
| 1588 |
ht2 = MAX(ht2, ED_label(e).dimen.y / 2); |
| 1589 |
} |
| 1590 |
} |
| 1591 |
|
| 1592 |
if (rank.get(r).pht2 < ht2) { |
| 1593 |
rank.plus(r).setDouble("ht2", ht2); |
| 1594 |
rank.plus(r).setDouble("pht2", ht2); |
| 1595 |
} |
| 1596 |
if (rank.get(r).pht1 < ht2) { |
| 1597 |
rank.plus(r).setDouble("ht1", ht2); |
| 1598 |
rank.plus(r).setDouble("pht1", ht2); |
| 1599 |
} |
| 1600 |
|
| 1601 |
if ((clust = ND_clust(n))!=null) { |
| 1602 |
int yoff = (clust == g ? 0 : late_int (clust, Z.z().G_margin, 8, 0)); |
| 1603 |
if (ND_rank(n) == GD_minrank(clust)) |
| 1604 |
GD_ht2(clust, MAX(GD_ht2(clust), ht2 + yoff)); |
| 1605 |
if (ND_rank(n) == GD_maxrank(clust)) |
| 1606 |
GD_ht1(clust, MAX(GD_ht1(clust), ht2 + yoff)); |
| 1607 |
} |
| 1608 |
} |
| 1609 |
} |
| 1610 |
|
| 1611 |
lbl = clust_ht(g); |
| 1612 |
|
| 1613 |
maxht = 0; |
| 1614 |
r = GD_maxrank(g); |
| 1615 |
(ND_coord(rank.get(r).v.get(0))).setDouble("y", rank.get(r).ht1); |
| 1616 |
while (--r >= GD_minrank(g)) { |
| 1617 |
d0 = rank.get(r + 1).pht2 + rank.get(r).pht1 + GD_ranksep(g); |
| 1618 |
d1 = rank.get(r + 1).ht2 + rank.get(r).ht1 + 8; |
| 1619 |
delta = MAX(d0, d1); |
| 1620 |
if (rank.get(r).n > 0) |
| 1621 |
(ND_coord(rank.get(r).v.get(0))).setDouble("y", (ND_coord(rank.plus(r + 1).getPtr().v.get(0))).y + delta); |
| 1622 |
maxht = MAX(maxht, delta); |
| 1623 |
} |
| 1624 |
|
| 1625 |
|
| 1626 |
|
| 1627 |
|
| 1628 |
|
| 1629 |
if (lbl!=0 && GD_flip(g)!=0) { |
| 1630 |
UNSUPPORTED("bxjqk5nu40mwo1156dicr9tur"); |
| 1631 |
UNSUPPORTED("6vy9qfed3u61pmvy12724s9l4"); |
| 1632 |
UNSUPPORTED("74f5n6u4x39ngn0gsan7fgzyr"); |
| 1633 |
UNSUPPORTED("2pd9g1n9b0746fgt892degls3"); |
| 1634 |
UNSUPPORTED("8dils3hlxottsbf2iuapvhqeq"); |
| 1635 |
UNSUPPORTED("cw5accmrcan3lqfc789udgcka"); |
| 1636 |
UNSUPPORTED("6bxo7bknt38qh9t31zr7p6kie"); |
| 1637 |
UNSUPPORTED("b1ta7vjm5i7swyklhfwy27w35"); |
| 1638 |
UNSUPPORTED("65l8hg0imd48bfdu614k2kylt"); |
| 1639 |
UNSUPPORTED("5irf6cp6xdzi2ik033azsbauo"); |
| 1640 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1641 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1642 |
} |
| 1643 |
|
| 1644 |
if (GD_exact_ranksep(g)!=0) { |
| 1645 |
UNSUPPORTED("cyxbyjrdzywkc46nl8lkrngai"); |
| 1646 |
UNSUPPORTED("5sd5ltavyp6llt0t2t0xmqwj5"); |
| 1647 |
UNSUPPORTED("5zoeqpznt31feqxjcx2rg0o1f"); |
| 1648 |
UNSUPPORTED("e6dfx5uesysjaefb0djyfp7f"); |
| 1649 |
} |
| 1650 |
|
| 1651 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) |
| 1652 |
ND_coord(n).y = ND_coord(rank.plus(ND_rank(n)).getPtr().v.get(0)).y; |
| 1653 |
} finally { |
| 1654 |
LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords"); |
| 1655 |
} |
| 1656 |
} |
| 1657 |
|
| 1658 |
|
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
|
| 1663 |
public static void dot_compute_bb(ST_Agraph_s g, ST_Agraph_s root) { |
| 1664 |
ENTERING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb"); |
| 1665 |
try { |
| 1666 |
int r, c; |
| 1667 |
double x, offset; |
| 1668 |
ST_Agnode_s v; |
| 1669 |
final ST_pointf LL = new ST_pointf(); |
| 1670 |
final ST_pointf UR = new ST_pointf(); |
| 1671 |
if (EQ(g, dot_root(g))) { |
| 1672 |
LL.x = INT_MAX; |
| 1673 |
UR.x = -((double)INT_MAX); |
| 1674 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 1675 |
int rnkn = GD_rank(g).get(r).n; |
| 1676 |
if (rnkn == 0) |
| 1677 |
continue; |
| 1678 |
if ((v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0)) == null) |
| 1679 |
continue; |
| 1680 |
for (c = 1; (ND_node_type(v) != 0) && c < rnkn; c++) |
| 1681 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(c); |
| 1682 |
if (ND_node_type(v) == 0) { |
| 1683 |
x = ND_coord(v).x - ND_lw(v); |
| 1684 |
LL.setDouble("x", MIN(LL.x, x)); |
| 1685 |
} |
| 1686 |
else continue; |
| 1687 |
|
| 1688 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.plus(rnkn - 1).getPtr(); |
| 1689 |
for (c = rnkn-2; ND_node_type(v) != 0; c--) |
| 1690 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(c); |
| 1691 |
x = ND_coord(v).x + ND_rw(v); |
| 1692 |
UR.x = MAX(UR.x, x); |
| 1693 |
} |
| 1694 |
offset = 8; |
| 1695 |
for (c = 1; c <= GD_n_cluster(g); c++) { |
| 1696 |
x = (double)(GD_bb(GD_clust(g).plus(c)).LL.x - offset); |
| 1697 |
LL.x = MIN(LL.x, x); |
| 1698 |
x = (double)(GD_bb(GD_clust(g).plus(c)).UR.x + offset); |
| 1699 |
UR.x = MAX(UR.x, x); |
| 1700 |
} |
| 1701 |
} else { |
| 1702 |
LL.x = (double)(ND_rank(GD_ln(g))); |
| 1703 |
UR.x = (double)(ND_rank(GD_rn(g))); |
| 1704 |
} |
| 1705 |
LL.y = ND_coord(GD_rank(root).plus(GD_maxrank(g)).getPtr().v.get(0)).y - GD_ht1(g); |
| 1706 |
UR.y = ND_coord(GD_rank(root).plus(GD_minrank(g)).getPtr().v.get(0)).y + GD_ht2(g); |
| 1707 |
GD_bb(g).setStruct("LL", LL); |
| 1708 |
GD_bb(g).setStruct("UR", UR); |
| 1709 |
} finally { |
| 1710 |
LEAVING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb"); |
| 1711 |
} |
| 1712 |
} |
| 1713 |
|
| 1714 |
|
| 1715 |
|
| 1716 |
|
| 1717 |
|
| 1718 |
|
| 1719 |
|
| 1720 |
public static void rec_bb(ST_Agraph_s g, ST_Agraph_s root) { |
| 1721 |
ENTERING("dlbpiimh9g9ff9w7wjoabf817","rec_bb"); |
| 1722 |
try { |
| 1723 |
int c; |
| 1724 |
for (c = 1; c <= GD_n_cluster(g); c++) |
| 1725 |
rec_bb((ST_Agraph_s) GD_clust(g).get(c).getPtr(), root); |
| 1726 |
dot_compute_bb(g, root); |
| 1727 |
} finally { |
| 1728 |
LEAVING("dlbpiimh9g9ff9w7wjoabf817","rec_bb"); |
| 1729 |
} |
| 1730 |
} |
| 1731 |
|
| 1732 |
|
| 1733 |
|
| 1734 |
|
| 1735 |
|
| 1736 |
|
| 1737 |
public static Object scale_bb(Object... arg) { |
| 1738 |
UNSUPPORTED("9zkkf6x8cj12vuzqrjaoxfn8s"); |
| 1739 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1740 |
UNSUPPORTED("53xzwretgdbd0atozc0w6hagb"); |
| 1741 |
UNSUPPORTED("7z5fb6iyowsosn1hiz7opeoc6"); |
| 1742 |
UNSUPPORTED("7leh3r5v7roon4liia73wue7e"); |
| 1743 |
UNSUPPORTED("duz0iqmos1i372cztpjtsemab"); |
| 1744 |
UNSUPPORTED("ja25041s2x99bhwj5wcliok0"); |
| 1745 |
UNSUPPORTED("7mpnp4j7m1ymn1zdbxzeh5xxd"); |
| 1746 |
UNSUPPORTED("4ahigy1a10wsl6lvc90lpax5e"); |
| 1747 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1748 |
|
| 1749 |
throw new UnsupportedOperationException(); |
| 1750 |
} |
| 1751 |
|
| 1752 |
|
| 1753 |
|
| 1754 |
|
| 1755 |
|
| 1756 |
|
| 1757 |
public static Object adjustAspectRatio(Object... arg) { |
| 1758 |
UNSUPPORTED("ezldb6r0csirv1fmkq5itw1v2"); |
| 1759 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1760 |
UNSUPPORTED("7rtldqefvdgcf4u50kulbxtvn"); |
| 1761 |
UNSUPPORTED("cve2on8gll5i0vomy8lnwhai2"); |
| 1762 |
UNSUPPORTED("6z0q1m3yc6o11ejsa59eghqag"); |
| 1763 |
UNSUPPORTED("2uealcdkjdgg8ne1cijkbagpu"); |
| 1764 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1765 |
UNSUPPORTED("96mqnzcfbfghxkxkn1x8kdh8i"); |
| 1766 |
UNSUPPORTED("6gq7uj15zh138zyae50c8nh2z"); |
| 1767 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1768 |
UNSUPPORTED("e1443w2cx49ogpsf5m59zy4fq"); |
| 1769 |
UNSUPPORTED("5awa0x1pxpta5wou27bzrtvoc"); |
| 1770 |
UNSUPPORTED("5xdo0sx20rmxgmdkrm1giaige"); |
| 1771 |
UNSUPPORTED("du5ztjo6nfo54ailmk1tqs05b"); |
| 1772 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1773 |
UNSUPPORTED("1nyzbeonram6636b1w955bypn"); |
| 1774 |
UNSUPPORTED("757eq4638npmb5w5e39iemxfo"); |
| 1775 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1776 |
UNSUPPORTED("2di5wqm6caczzl6bvqe35ry8y"); |
| 1777 |
UNSUPPORTED("29wdml7g4931q8kgah8hgwjd0"); |
| 1778 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1779 |
|
| 1780 |
throw new UnsupportedOperationException(); |
| 1781 |
} |
| 1782 |
|
| 1783 |
|
| 1784 |
|
| 1785 |
|
| 1786 |
|
| 1787 |
|
| 1788 |
public static void set_aspect(ST_Agraph_s g, ST_aspect_t asp) { |
| 1789 |
ENTERING("7effq6z6ur101wrch6ttozr26","set_aspect"); |
| 1790 |
try { |
| 1791 |
double xf = 0.0, yf = 0.0, actual, desired; |
| 1792 |
ST_Agnode_s n; |
| 1793 |
boolean scale_it, filled; |
| 1794 |
ST_point sz = new ST_point(); |
| 1795 |
rec_bb(g, g); |
| 1796 |
if ((GD_maxrank(g) > 0) && (GD_drawing(g).ratio_kind!=0)) { |
| 1797 |
UNSUPPORTED("5wbmy4x78flo2ztfabki9lyjf"); |
| 1798 |
UNSUPPORTED("catd6eu5oc282ln95k9zz52f3"); |
| 1799 |
UNSUPPORTED("21zvq2qx1j34j1i1879zyhzpj"); |
| 1800 |
UNSUPPORTED("d55uzald1tvs7xodnua67pxv6"); |
| 1801 |
UNSUPPORTED("47s1klx0pfzda4e311w53ou7e"); |
| 1802 |
UNSUPPORTED("3tx1mj7j0rqw33y24a0gu4ali"); |
| 1803 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1804 |
UNSUPPORTED("4ct8ztqxnsskgphsp1v3aw5ec"); |
| 1805 |
UNSUPPORTED("8v772n1u4wqlmskqfswlzcz2o"); |
| 1806 |
UNSUPPORTED("8mtmgag5dxj8ttlcabbpd865p"); |
| 1807 |
UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); |
| 1808 |
UNSUPPORTED("bxtk5e5ls8qsd36eucvhufg9y"); |
| 1809 |
UNSUPPORTED("2atgu691bmn6h9jvk8lve5qzc"); |
| 1810 |
UNSUPPORTED("1zx5etcjofceqjvogfn8urkdj"); |
| 1811 |
UNSUPPORTED("7ezqjon4u21dwg4qvxssrnwfc"); |
| 1812 |
UNSUPPORTED("dao0fnoi65upcdtr9csqhhy41"); |
| 1813 |
UNSUPPORTED("6q044im7742qhglc4553noina"); |
| 1814 |
UNSUPPORTED("6ifkww34s7php908n9wg0oiju"); |
| 1815 |
UNSUPPORTED("6faiikvxwdge2ydblv90976hb"); |
| 1816 |
UNSUPPORTED("5xkzvdrdnfd5afhhxgajbywya"); |
| 1817 |
UNSUPPORTED("cvkvyq93xp1itpomhj1r2xlzy"); |
| 1818 |
UNSUPPORTED("capfpf4tncicsp81elmwvf0l"); |
| 1819 |
UNSUPPORTED("7sdzyzqj65rbq6edfgf5x6xht"); |
| 1820 |
UNSUPPORTED("d86r93g8nz9a1kfzgi7f8j8nh"); |
| 1821 |
UNSUPPORTED("emwaipsi6kyqbpk2y26k3cxfw"); |
| 1822 |
UNSUPPORTED("1s91x56ftedjsc3m32dqgspqn"); |
| 1823 |
UNSUPPORTED("dkxvw03k2gg9anv4dbze06axd"); |
| 1824 |
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); |
| 1825 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1826 |
UNSUPPORTED("c48w89y9jw5baxqqucmiyfha7"); |
| 1827 |
UNSUPPORTED("7ezqjon4u21dwg4qvxssrnwfc"); |
| 1828 |
UNSUPPORTED("dao0fnoi65upcdtr9csqhhy41"); |
| 1829 |
UNSUPPORTED("6q044im7742qhglc4553noina"); |
| 1830 |
UNSUPPORTED("akfs904fsk7cyl8wbv0x7fnvz"); |
| 1831 |
UNSUPPORTED("1ewqbc4kglc2kg1n13euxrxzh"); |
| 1832 |
UNSUPPORTED("6fmkpg9ypaxceugi24gklvdra"); |
| 1833 |
UNSUPPORTED("8mskb0mqou89myfbiihsjpbg6"); |
| 1834 |
UNSUPPORTED("a2jzgqbpoanzqdqc7vjk32vmz"); |
| 1835 |
UNSUPPORTED("6np8qfg5qnlaypikhw0bdx84j"); |
| 1836 |
UNSUPPORTED("272bmuv1row7l9tla5bhot840"); |
| 1837 |
UNSUPPORTED("738mi6h8ef0itznt34ngxe25o"); |
| 1838 |
UNSUPPORTED("b5qs3ho2fcywk3sd5cw3m88kw"); |
| 1839 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1840 |
UNSUPPORTED("d7deewhp6akdb13j7ry364hbd"); |
| 1841 |
UNSUPPORTED("fpejwrlknxizaxxibhuyaxdt"); |
| 1842 |
UNSUPPORTED("douwz2voka0puoeooqjn8kijk"); |
| 1843 |
UNSUPPORTED("7u9yvuqazzo19geppiphd9rfh"); |
| 1844 |
UNSUPPORTED("apqq3m2rezfl96zbvk7lut02"); |
| 1845 |
UNSUPPORTED("8po0oizki4figodjv9xku16gq"); |
| 1846 |
UNSUPPORTED("175pyfe8j8mbhdwvrbx3gmew9"); |
| 1847 |
UNSUPPORTED("84c3pp9xgnii11clyyxblqmy6"); |
| 1848 |
UNSUPPORTED("1tr1b9rp1b00pcafss87kadfe"); |
| 1849 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1850 |
UNSUPPORTED("6to1esmb8qfrhzgtr7jdqleja"); |
| 1851 |
UNSUPPORTED("csvnhx5mo535o6ue1tg3ktjhs"); |
| 1852 |
UNSUPPORTED("bh2d68e9s7cr7k1bl0h9fmr9a"); |
| 1853 |
UNSUPPORTED("b8symsgdtoq84y3j1151pv0g4"); |
| 1854 |
UNSUPPORTED("bi983gfofc0blj8r4yetj14kb"); |
| 1855 |
UNSUPPORTED("69pmocxfvmk0urni4fg0x4na5"); |
| 1856 |
UNSUPPORTED("cyt895z1pa5arxz4d1kv0hqgq"); |
| 1857 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1858 |
UNSUPPORTED("crtcqz91ff5l8ntjbne40b5x4"); |
| 1859 |
UNSUPPORTED("brs6nych5z9m0a75ixbe5l80o"); |
| 1860 |
UNSUPPORTED("cpe0pjsilppgrp2ofysn4y54w"); |
| 1861 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1862 |
UNSUPPORTED("8f0d3etdet1pk8ikvltmz5h2s"); |
| 1863 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1864 |
} |
| 1865 |
if (asp!=null) adjustAspectRatio (g, asp); |
| 1866 |
} finally { |
| 1867 |
LEAVING("7effq6z6ur101wrch6ttozr26","set_aspect"); |
| 1868 |
} |
| 1869 |
} |
| 1870 |
|
| 1871 |
|
| 1872 |
|
| 1873 |
|
| 1874 |
|
| 1875 |
|
| 1876 |
public static Object resize_leaf(Object... arg) { |
| 1877 |
UNSUPPORTED("alcqddrml4aj55twvzwyyvfjh"); |
| 1878 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1879 |
UNSUPPORTED("dnj5vqe4cb2yzzx75ubwrxvav"); |
| 1880 |
UNSUPPORTED("bxig9t3r62l84xejntt3x96kv"); |
| 1881 |
UNSUPPORTED("bx00ps5hied5a63922sqqpvhi"); |
| 1882 |
UNSUPPORTED("euhijhn76fi66yqoh8gxk5nq0"); |
| 1883 |
UNSUPPORTED("1xmj5l8g8znua01mljujyh61i"); |
| 1884 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1885 |
|
| 1886 |
throw new UnsupportedOperationException(); |
| 1887 |
} |
| 1888 |
|
| 1889 |
|
| 1890 |
|
| 1891 |
|
| 1892 |
|
| 1893 |
|
| 1894 |
public static Object place_leaf(Object... arg) { |
| 1895 |
UNSUPPORTED("cetlk9m8mjd69vuru3rjho0lw"); |
| 1896 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1897 |
UNSUPPORTED("b1ht34ftmnpsuxflrqun4ptkr"); |
| 1898 |
UNSUPPORTED("aqfu9qyb55o3lehhaqmxag540"); |
| 1899 |
UNSUPPORTED("1b5u4ut4j70lu60geogmkv572"); |
| 1900 |
UNSUPPORTED("3urvo2e4w7312r8scg44o0hqw"); |
| 1901 |
UNSUPPORTED("azdkjz4shu49j3fzjpazxrpwz"); |
| 1902 |
UNSUPPORTED("95h5y689udztblrtgdwc8y2ei"); |
| 1903 |
UNSUPPORTED("cvsh6pf3vxzxd2zn1u8ykd8hx"); |
| 1904 |
UNSUPPORTED("6k8r94a4chbol18r2rnbi9haj"); |
| 1905 |
UNSUPPORTED("7ku2dbhi28rhi6dtag1v4zung"); |
| 1906 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1907 |
|
| 1908 |
throw new UnsupportedOperationException(); |
| 1909 |
} |
| 1910 |
|
| 1911 |
|
| 1912 |
|
| 1913 |
|
| 1914 |
|
| 1915 |
|
| 1916 |
public static void make_leafslots(ST_Agraph_s g) { |
| 1917 |
ENTERING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots"); |
| 1918 |
try { |
| 1919 |
int i, j, r; |
| 1920 |
ST_Agnode_s v; |
| 1921 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 1922 |
j = 0; |
| 1923 |
for (i = 0; i < GD_rank(g).get(r).n; i++) { |
| 1924 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i); |
| 1925 |
ND_order(v, j); |
| 1926 |
if (ND_ranktype(v) == 6) |
| 1927 |
j = j + ND_UF_size(v); |
| 1928 |
else |
| 1929 |
j++; |
| 1930 |
} |
| 1931 |
if (j <= GD_rank(g).get(r).n) |
| 1932 |
continue; |
| 1933 |
GD_rank(g).plus(r).setPtr("v", ALLOC_allocated_ST_Agnode_s((ST_Agnode_s.ArrayOfStar) GD_rank(g).get(r).v, j + 1)); |
| 1934 |
for (i = GD_rank(g).get(r).n - 1; i >= 0; i--) { |
| 1935 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(i); |
| 1936 |
GD_rank(g).get(r).v.plus(ND_order(v)).setPtr(v); |
| 1937 |
} |
| 1938 |
GD_rank(g).plus(r).setInt("n", j); |
| 1939 |
GD_rank(g).get(r).v.plus(j).setPtr(null); |
| 1940 |
} |
| 1941 |
} finally { |
| 1942 |
LEAVING("1lejhh3evsa10auyj7cgqj8ub","make_leafslots"); |
| 1943 |
} |
| 1944 |
} |
| 1945 |
|
| 1946 |
|
| 1947 |
|
| 1948 |
|
| 1949 |
|
| 1950 |
|
| 1951 |
public static Object do_leaves(Object... arg) { |
| 1952 |
UNSUPPORTED("5nmyuqyhfqfwbmgdj5aot9fp4"); |
| 1953 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 1954 |
UNSUPPORTED("2bs0wcp6367dz1o5x166ec7l8"); |
| 1955 |
UNSUPPORTED("4bxv0pw87c31sbbz6x6s1cq9d"); |
| 1956 |
UNSUPPORTED("cjx5v6hayed3q8eeub1cggqca"); |
| 1957 |
UNSUPPORTED("5gypxs09iuryx5a2eho9lgdcp"); |
| 1958 |
UNSUPPORTED("b9upgllg8zjx49090hr3afv91"); |
| 1959 |
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); |
| 1960 |
UNSUPPORTED("9m0hiwybw3dr0lcxmgq833heo"); |
| 1961 |
UNSUPPORTED("ev0phf24gpqz3xtvtueq72f7g"); |
| 1962 |
UNSUPPORTED("90r9xqe4faj7b1g8907ord1x3"); |
| 1963 |
UNSUPPORTED("66ue8mvk3axhgbkcg3xqo94tb"); |
| 1964 |
UNSUPPORTED("9lq5udq73fgfeqyqsxw6i3pgm"); |
| 1965 |
UNSUPPORTED("4vp9ny4udt1jcmibfgpwgrnqo"); |
| 1966 |
UNSUPPORTED("3ml0tasns5tz6d5xc2xdb6nc"); |
| 1967 |
UNSUPPORTED("e2y71fdc15yxylowp6ohlal9a"); |
| 1968 |
UNSUPPORTED("ew4udmdawt257gbk5kzmi1n1"); |
| 1969 |
UNSUPPORTED("d2r94m7xk4qa9hn6s2td5nb6h"); |
| 1970 |
UNSUPPORTED("5xk9d4ra447xucksge6c9mgos"); |
| 1971 |
UNSUPPORTED("4dqun0n52lcyerkebva2hxh15"); |
| 1972 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1973 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1974 |
UNSUPPORTED("6owoaz61uf3928omhuf3rqjoa"); |
| 1975 |
UNSUPPORTED("4lbkem8hb4jy3gdg6nt3cbtl9"); |
| 1976 |
UNSUPPORTED("4vp9ny4udt1jcmibfgpwgrnqo"); |
| 1977 |
UNSUPPORTED("e20lm4qtccvgsfq5fzjv6sjyl"); |
| 1978 |
UNSUPPORTED("38a98cy0214odvsa98hgyce8q"); |
| 1979 |
UNSUPPORTED("9j9o79r2bdc6npidu38aq0cym"); |
| 1980 |
UNSUPPORTED("6wbwzuqqh5vxume7ga2kuejcf"); |
| 1981 |
UNSUPPORTED("dv9vv9pfcd3cibfjn258toxyv"); |
| 1982 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 1983 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 1984 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 1985 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 1986 |
|
| 1987 |
throw new UnsupportedOperationException(); |
| 1988 |
} |
| 1989 |
|
| 1990 |
|
| 1991 |
|
| 1992 |
|
| 1993 |
|
| 1994 |
|
| 1995 |
public static boolean ports_eq(ST_Agedge_s e, ST_Agedge_s f) { |
| 1996 |
ENTERING("alpljm8o6nsam95ly6leelnbp","ports_eq"); |
| 1997 |
try { |
| 1998 |
return ((ED_head_port(e).defined == ED_head_port(f).defined) |
| 1999 |
&& (((ED_head_port(e).p.x == ED_head_port(f).p.x) && |
| 2000 |
(ED_head_port(e).p.y == ED_head_port(f).p.y)) |
| 2001 |
|| (ED_head_port(e).defined == 0)) |
| 2002 |
&& (((ED_tail_port(e).p.x == ED_tail_port(f).p.x) && |
| 2003 |
(ED_tail_port(e).p.y == ED_tail_port(f).p.y)) |
| 2004 |
|| (ED_tail_port(e).defined == 0)) |
| 2005 |
); |
| 2006 |
} finally { |
| 2007 |
LEAVING("alpljm8o6nsam95ly6leelnbp","ports_eq"); |
| 2008 |
} |
| 2009 |
} |
| 2010 |
|
| 2011 |
|
| 2012 |
|
| 2013 |
|
| 2014 |
|
| 2015 |
|
| 2016 |
public static void expand_leaves(ST_Agraph_s g) { |
| 2017 |
ENTERING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves"); |
| 2018 |
try { |
| 2019 |
int i, d; |
| 2020 |
ST_Agnode_s n; |
| 2021 |
ST_Agedge_s e, f; |
| 2022 |
make_leafslots(g); |
| 2023 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 2024 |
if (ND_inleaf(n)!=null) |
| 2025 |
do_leaves(g, ND_inleaf(n)); |
| 2026 |
if (ND_outleaf(n)!=null) |
| 2027 |
do_leaves(g, ND_outleaf(n)); |
| 2028 |
if (ND_other(n).listNotNull()) |
| 2029 |
for (i = 0; (e = (ST_Agedge_s) ND_other(n).getFromList(i))!=null; i++) { |
| 2030 |
if ((d = ND_rank(aghead(e)) - ND_rank(aghead(e))) == 0) |
| 2031 |
continue; |
| 2032 |
f = ED_to_orig(e); |
| 2033 |
if (ports_eq(e, f) == false) { |
| 2034 |
zapinlist(ND_other(n), e); |
| 2035 |
if (d == 1) |
| 2036 |
fast_edge(e); |
| 2037 |
|
| 2038 |
i--; |
| 2039 |
} |
| 2040 |
} |
| 2041 |
} |
| 2042 |
} finally { |
| 2043 |
LEAVING("cfotmdif5xv7n6oauyvzv0qwa","expand_leaves"); |
| 2044 |
} |
| 2045 |
} |
| 2046 |
|
| 2047 |
|
| 2048 |
|
| 2049 |
|
| 2050 |
|
| 2051 |
|
| 2052 |
public static void make_lrvn(ST_Agraph_s g) { |
| 2053 |
ENTERING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn"); |
| 2054 |
try { |
| 2055 |
ST_Agnode_s ln, rn; |
| 2056 |
if (GD_ln(g)!=null) |
| 2057 |
return; |
| 2058 |
ln = virtual_node(dot_root(g)); |
| 2059 |
ND_node_type(ln, 2); |
| 2060 |
rn = virtual_node(dot_root(g)); |
| 2061 |
ND_node_type(rn, 2); |
| 2062 |
if (GD_label(g)!=null && NEQ(g, dot_root(g)) && N(GD_flip(agroot(g)))) { |
| 2063 |
int w = MAX((int)GD_border(g)[0].x, (int)GD_border(g)[2].x); |
| 2064 |
make_aux_edge(ln, rn, w, 0); |
| 2065 |
} |
| 2066 |
GD_ln(g, ln); |
| 2067 |
GD_rn(g, rn); |
| 2068 |
} finally { |
| 2069 |
LEAVING("d4b57ugpwxy567pfmxn14ed8d","make_lrvn"); |
| 2070 |
} |
| 2071 |
} |
| 2072 |
|
| 2073 |
|
| 2074 |
|
| 2075 |
|
| 2076 |
|
| 2077 |
|
| 2078 |
public static void contain_nodes(ST_Agraph_s g) { |
| 2079 |
ENTERING("daz786541idcxnywckcbncazb","contain_nodes"); |
| 2080 |
try { |
| 2081 |
int margin, r; |
| 2082 |
ST_Agnode_s ln, rn, v; |
| 2083 |
margin = late_int (g, Z.z().G_margin, 8, 0); |
| 2084 |
make_lrvn(g); |
| 2085 |
ln = GD_ln(g); |
| 2086 |
rn = GD_rn(g); |
| 2087 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 2088 |
if (GD_rank(g).get(r).n == 0) |
| 2089 |
continue; |
| 2090 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.get(0); |
| 2091 |
if (v == null) { |
| 2092 |
UNSUPPORTED("1f2esoodtcrdhljk1cq1klyao"); |
| 2093 |
UNSUPPORTED("7w6lv4ywtczwz2y1mg0p3jdav"); |
| 2094 |
UNSUPPORTED("6hqli9m8yickz1ox1qfgtdbnd"); |
| 2095 |
} |
| 2096 |
make_aux_edge(ln, v, |
| 2097 |
ND_lw(v) + margin + GD_border(g)[3].x, 0); |
| 2098 |
v = (ST_Agnode_s) GD_rank(g).get(r).v.plus(GD_rank(g).get(r).n - 1).getPtr(); |
| 2099 |
make_aux_edge(v, rn, |
| 2100 |
ND_rw(v) + margin + GD_border(g)[1].x, 0); |
| 2101 |
} |
| 2102 |
} finally { |
| 2103 |
LEAVING("daz786541idcxnywckcbncazb","contain_nodes"); |
| 2104 |
} |
| 2105 |
} |
| 2106 |
|
| 2107 |
|
| 2108 |
|
| 2109 |
|
| 2110 |
|
| 2111 |
|
| 2112 |
public static Object idealsize(Object... arg) { |
| 2113 |
UNSUPPORTED("74m5dgfkgpr7bq7elj8bk5w6z"); |
| 2114 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 2115 |
UNSUPPORTED("bp9bpmgkh2gsdynqe5wio0i32"); |
| 2116 |
UNSUPPORTED("8404v5b2qtn2x2mlgbyxidbx4"); |
| 2117 |
UNSUPPORTED("a3ke28asz3w87p4n8bgil541i"); |
| 2118 |
UNSUPPORTED("avi96122npbhja9hwa4goidp"); |
| 2119 |
UNSUPPORTED("19uch6jfal0x385xni41gqam6"); |
| 2120 |
UNSUPPORTED("52kuioyxcuboss35kg15wudvt"); |
| 2121 |
UNSUPPORTED("d6i2metpbkzakq2abzgvcdzle"); |
| 2122 |
UNSUPPORTED("asgqm8o7cruxxpfx9lobsif1c"); |
| 2123 |
UNSUPPORTED("asgqm8o7cruxxpfx9lobsif1c"); |
| 2124 |
UNSUPPORTED("aqhjsr7rv4ig7d1vagm74jpmo"); |
| 2125 |
UNSUPPORTED("30xemhqjxz13hiyv2o2r8mol1"); |
| 2126 |
UNSUPPORTED("cv2s8vkuet41gdoms8vue473z"); |
| 2127 |
UNSUPPORTED("rvfej1l4o57i17le73vt80cf"); |
| 2128 |
UNSUPPORTED("4f2ksj9hf0fi9wnzrz20eswmo"); |
| 2129 |
UNSUPPORTED("e64anddwrzfgr4xoopjelwqg1"); |
| 2130 |
UNSUPPORTED("9vakpuy3iri2q9upsuy7lqhln"); |
| 2131 |
UNSUPPORTED("ccu6nxd64lwxm1h8x0sbrkdv7"); |
| 2132 |
UNSUPPORTED("yc64sd7yr28zgjqrr734fc7i"); |
| 2133 |
UNSUPPORTED("aht5rw6872hwmg7vaop0eairh"); |
| 2134 |
UNSUPPORTED("asw2ato73u7m4kb07x2mr2snv"); |
| 2135 |
UNSUPPORTED("76j6b15q20gswxka8cglflbym"); |
| 2136 |
UNSUPPORTED("49gpvau7p2bvvkp6oemyqyjev"); |
| 2137 |
UNSUPPORTED("7gewumkvzgtqon1jqxp8yf0kk"); |
| 2138 |
UNSUPPORTED("8fwlqtemsmckleh6946lyd8mw"); |
| 2139 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 2140 |
|
| 2141 |
throw new UnsupportedOperationException(); |
| 2142 |
} |
| 2143 |
|
| 2144 |
|
| 2145 |
} |