| 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.edge__c.aghead; |
| 48 |
import static gen.lib.cgraph.edge__c.agtail; |
| 49 |
import static gen.lib.dotgen.dotinit__c.dot_root; |
| 50 |
import static gen.lib.dotgen.fastgr__c.virtual_edge; |
| 51 |
import static gen.lib.dotgen.fastgr__c.virtual_node; |
| 52 |
import static gen.lib.dotgen.mincross__c.rec_reset_vlists; |
| 53 |
import static gen.lib.dotgen.mincross__c.rec_save_vlists; |
| 54 |
import static smetana.core.JUtils.EQ; |
| 55 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 56 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 57 |
import static smetana.core.Macro.ALLOC_Agnode_s; |
| 58 |
import static smetana.core.Macro.ALLOC_ST_rank_t; |
| 59 |
import static smetana.core.Macro.ED_adjacent; |
| 60 |
import static smetana.core.Macro.ED_dist; |
| 61 |
import static smetana.core.Macro.ED_edge_type; |
| 62 |
import static smetana.core.Macro.ED_head_port; |
| 63 |
import static smetana.core.Macro.ED_label; |
| 64 |
import static smetana.core.Macro.ED_tail_port; |
| 65 |
import static smetana.core.Macro.ED_to_virt; |
| 66 |
import static smetana.core.Macro.GD_flip; |
| 67 |
import static smetana.core.Macro.GD_maxrank; |
| 68 |
import static smetana.core.Macro.GD_minrank; |
| 69 |
import static smetana.core.Macro.GD_n_cluster; |
| 70 |
import static smetana.core.Macro.GD_nlist; |
| 71 |
import static smetana.core.Macro.GD_rank; |
| 72 |
import static smetana.core.Macro.GD_ranksep; |
| 73 |
import static smetana.core.Macro.MAX; |
| 74 |
import static smetana.core.Macro.N; |
| 75 |
import static smetana.core.Macro.ND_alg; |
| 76 |
import static smetana.core.Macro.ND_coord; |
| 77 |
import static smetana.core.Macro.ND_flat_in; |
| 78 |
import static smetana.core.Macro.ND_flat_out; |
| 79 |
import static smetana.core.Macro.ND_ht; |
| 80 |
import static smetana.core.Macro.ND_in; |
| 81 |
import static smetana.core.Macro.ND_label; |
| 82 |
import static smetana.core.Macro.ND_lw; |
| 83 |
import static smetana.core.Macro.ND_next; |
| 84 |
import static smetana.core.Macro.ND_node_type; |
| 85 |
import static smetana.core.Macro.ND_order; |
| 86 |
import static smetana.core.Macro.ND_other; |
| 87 |
import static smetana.core.Macro.ND_out; |
| 88 |
import static smetana.core.Macro.ND_rank; |
| 89 |
import static smetana.core.Macro.ND_rw; |
| 90 |
import static smetana.core.Macro.NOT; |
| 91 |
import static smetana.core.Macro.UNSUPPORTED; |
| 92 |
import h.ST_Agedge_s; |
| 93 |
import h.ST_Agnode_s; |
| 94 |
import h.ST_Agraph_s; |
| 95 |
import h.ST_pointf; |
| 96 |
import h.ST_rank_t; |
| 97 |
import smetana.core.__ptr__; |
| 98 |
|
| 99 |
public class flat__c { |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 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 |
public static Object pointof(Object... arg) { |
| 341 |
UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); |
| 342 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 343 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 344 |
UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); |
| 345 |
UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); |
| 346 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 347 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 348 |
|
| 349 |
throw new UnsupportedOperationException(); |
| 350 |
} |
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
public static ST_pointf pointfof(double x, double y) { |
| 358 |
|
| 359 |
return pointfof_w_(x, y).copy(); |
| 360 |
} |
| 361 |
private static ST_pointf pointfof_w_(double x, double y) { |
| 362 |
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 363 |
try { |
| 364 |
final ST_pointf r = new ST_pointf(); |
| 365 |
r.setDouble("x", x); |
| 366 |
r.setDouble("y", y); |
| 367 |
return r; |
| 368 |
} finally { |
| 369 |
LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 370 |
} |
| 371 |
} |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
public static Object boxof(Object... arg) { |
| 379 |
UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); |
| 380 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 381 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 382 |
UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); |
| 383 |
UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); |
| 384 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 385 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 386 |
|
| 387 |
throw new UnsupportedOperationException(); |
| 388 |
} |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
public static Object add_point(Object... arg) { |
| 398 |
UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); |
| 399 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 400 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 401 |
UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); |
| 402 |
UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); |
| 403 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 404 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 405 |
|
| 406 |
throw new UnsupportedOperationException(); |
| 407 |
} |
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) { |
| 415 |
|
| 416 |
return add_pointf_w_(p.copy(), q.copy()).copy(); |
| 417 |
} |
| 418 |
private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) { |
| 419 |
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 420 |
try { |
| 421 |
final ST_pointf r = new ST_pointf(); |
| 422 |
r.setDouble("x", p.x + q.x); |
| 423 |
r.setDouble("y", p.y + q.y); |
| 424 |
return r; |
| 425 |
} finally { |
| 426 |
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 427 |
} |
| 428 |
} |
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
public static Object sub_point(Object... arg) { |
| 436 |
UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); |
| 437 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 438 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 439 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 440 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 441 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 442 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 443 |
|
| 444 |
throw new UnsupportedOperationException(); |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
public static Object sub_pointf(Object... arg) { |
| 453 |
UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); |
| 454 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 455 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 456 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 457 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 458 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 459 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 460 |
|
| 461 |
throw new UnsupportedOperationException(); |
| 462 |
} |
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
public static Object mid_point(Object... arg) { |
| 470 |
UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); |
| 471 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 472 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 473 |
UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); |
| 474 |
UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); |
| 475 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 476 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 477 |
|
| 478 |
throw new UnsupportedOperationException(); |
| 479 |
} |
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
public static Object mid_pointf(Object... arg) { |
| 487 |
UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); |
| 488 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 489 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 490 |
UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); |
| 491 |
UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); |
| 492 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 493 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 494 |
|
| 495 |
throw new UnsupportedOperationException(); |
| 496 |
} |
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
public static Object interpolate_pointf(Object... arg) { |
| 504 |
UNSUPPORTED("894yimn33kmtm454llwdaotu8"); |
| 505 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 506 |
UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); |
| 507 |
UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); |
| 508 |
UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); |
| 509 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 510 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 511 |
|
| 512 |
throw new UnsupportedOperationException(); |
| 513 |
} |
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
public static Object exch_xy(Object... arg) { |
| 521 |
UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); |
| 522 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 523 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 524 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 525 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 526 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 527 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 528 |
|
| 529 |
throw new UnsupportedOperationException(); |
| 530 |
} |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
public static Object exch_xyf(Object... arg) { |
| 538 |
UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); |
| 539 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 540 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 541 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 542 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 543 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 544 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 545 |
|
| 546 |
throw new UnsupportedOperationException(); |
| 547 |
} |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
public static Object box_bb(Object... arg) { |
| 555 |
UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); |
| 556 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 557 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 558 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 559 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 560 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 561 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 562 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 563 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 564 |
|
| 565 |
throw new UnsupportedOperationException(); |
| 566 |
} |
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
public static Object boxf_bb(Object... arg) { |
| 574 |
UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); |
| 575 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 576 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 577 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 578 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 579 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 580 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 581 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 582 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 583 |
|
| 584 |
throw new UnsupportedOperationException(); |
| 585 |
} |
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
public static Object box_intersect(Object... arg) { |
| 593 |
UNSUPPORTED("34gv28cldst09bl71itjgviue"); |
| 594 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 595 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 596 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 597 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 598 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 599 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 600 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 601 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 602 |
|
| 603 |
throw new UnsupportedOperationException(); |
| 604 |
} |
| 605 |
|
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
public static Object boxf_intersect(Object... arg) { |
| 612 |
UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); |
| 613 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 614 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 615 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 616 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 617 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 618 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 619 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 620 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 621 |
|
| 622 |
throw new UnsupportedOperationException(); |
| 623 |
} |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
public static Object box_overlap(Object... arg) { |
| 631 |
UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); |
| 632 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 633 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 634 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 635 |
|
| 636 |
throw new UnsupportedOperationException(); |
| 637 |
} |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
public static Object boxf_overlap(Object... arg) { |
| 645 |
UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); |
| 646 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 647 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 648 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 649 |
|
| 650 |
throw new UnsupportedOperationException(); |
| 651 |
} |
| 652 |
|
| 653 |
|
| 654 |
|
| 655 |
|
| 656 |
|
| 657 |
|
| 658 |
public static Object box_contains(Object... arg) { |
| 659 |
UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); |
| 660 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 661 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 662 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 663 |
|
| 664 |
throw new UnsupportedOperationException(); |
| 665 |
} |
| 666 |
|
| 667 |
|
| 668 |
|
| 669 |
|
| 670 |
|
| 671 |
|
| 672 |
public static Object boxf_contains(Object... arg) { |
| 673 |
UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); |
| 674 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 675 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 676 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 677 |
|
| 678 |
throw new UnsupportedOperationException(); |
| 679 |
} |
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
|
| 685 |
|
| 686 |
public static Object perp(Object... arg) { |
| 687 |
UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); |
| 688 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 689 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 690 |
UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); |
| 691 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 692 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 693 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 694 |
|
| 695 |
throw new UnsupportedOperationException(); |
| 696 |
} |
| 697 |
|
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
public static Object scale(Object... arg) { |
| 704 |
UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); |
| 705 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 706 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 707 |
UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); |
| 708 |
UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); |
| 709 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 710 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 711 |
|
| 712 |
throw new UnsupportedOperationException(); |
| 713 |
} |
| 714 |
|
| 715 |
|
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
public static ST_Agnode_s make_vn_slot(ST_Agraph_s g, int r, int pos) { |
| 721 |
ENTERING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot"); |
| 722 |
try { |
| 723 |
int i; |
| 724 |
ST_Agnode_s.ArrayOfStar v; |
| 725 |
ST_Agnode_s n; |
| 726 |
v = ALLOC_Agnode_s(GD_rank(g).get(r).n + 2, (ST_Agnode_s.ArrayOfStar) GD_rank(g).get(r).v); |
| 727 |
GD_rank(g).plus(r).setPtr("v", v); |
| 728 |
for (i = GD_rank(g).get(r).n; i > pos; i--) { |
| 729 |
v.plus(i).setPtr(v.plus(i - 1).getPtr()); |
| 730 |
ND_order(v.get(i), ND_order(v.get(i))+1); |
| 731 |
} |
| 732 |
n = virtual_node(g); |
| 733 |
v.plus(pos).setPtr(n); |
| 734 |
ND_order(n, pos); |
| 735 |
ND_rank(n, r); |
| 736 |
GD_rank(g).plus(r).setInt("n", GD_rank(g).get(r).n+1); |
| 737 |
v.plus(GD_rank(g).get(r).n).setPtr(null); |
| 738 |
return (ST_Agnode_s) v.get(pos); |
| 739 |
} finally { |
| 740 |
LEAVING("e0gtvsxlvztmwu8yy44wfvf97","make_vn_slot"); |
| 741 |
} |
| 742 |
} |
| 743 |
|
| 744 |
|
| 745 |
|
| 746 |
|
| 747 |
|
| 748 |
|
| 749 |
public static void findlr(ST_Agnode_s u, ST_Agnode_s v, int lp[], int rp[]) { |
| 750 |
ENTERING("d64wt9oqphauv3hp4axbg2ep3","findlr"); |
| 751 |
try { |
| 752 |
int l, r; |
| 753 |
l = ND_order(u); |
| 754 |
r = ND_order(v); |
| 755 |
if (l > r) { |
| 756 |
int t = l; |
| 757 |
l = r; |
| 758 |
r = t; |
| 759 |
} |
| 760 |
lp[0] = l; |
| 761 |
rp[0] = r; |
| 762 |
} finally { |
| 763 |
LEAVING("d64wt9oqphauv3hp4axbg2ep3","findlr"); |
| 764 |
} |
| 765 |
} |
| 766 |
|
| 767 |
|
| 768 |
|
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
public static void setbounds(ST_Agnode_s v, int bounds[], int lpos[], int rpos[]) { |
| 773 |
ENTERING("bwjjmaydx5a2fnpeoligkha0r","setbounds"); |
| 774 |
try { |
| 775 |
int i, ord; |
| 776 |
int[] l = new int[1], r = new int[1]; |
| 777 |
ST_Agedge_s f; |
| 778 |
if (ND_node_type(v) == 1) { |
| 779 |
ord = ND_order(v); |
| 780 |
if (ND_in(v).size == 0) { |
| 781 |
assert(ND_out(v).size == 2); |
| 782 |
findlr((ST_Agnode_s) aghead(ND_out(v).getFromList(0)), (ST_Agnode_s) aghead(ND_out(v).getFromList(1)), l, |
| 783 |
r); |
| 784 |
|
| 785 |
if (r[0] <= lpos[0]) |
| 786 |
bounds[2] = bounds[0] = ord; |
| 787 |
else if (l[0] >= rpos[0]) |
| 788 |
bounds[3] = bounds[1] = ord; |
| 789 |
|
| 790 |
else if ((l[0] < lpos[0]) && (r[0] > rpos[0])); |
| 791 |
|
| 792 |
else { |
| 793 |
if ((l[0] < lpos[0]) || ((l[0] == lpos[0]) && (r[0] < rpos[0]))) |
| 794 |
bounds[2] = ord; |
| 795 |
if ((r[0] > rpos[0]) || ((r[0] == rpos[0]) && (l[0] > lpos[0]))) |
| 796 |
bounds[3] = ord; |
| 797 |
} |
| 798 |
} else { |
| 799 |
boolean onleft, onright; |
| 800 |
onleft = onright = false; |
| 801 |
for (i = 0; (f = (ST_Agedge_s) ND_out(v).getFromList(i))!=null; i++) { |
| 802 |
if (ND_order(aghead(f)) <= lpos[0]) { |
| 803 |
onleft = NOT(false); |
| 804 |
continue; |
| 805 |
} |
| 806 |
if (ND_order(aghead(f)) >= rpos[0]) { |
| 807 |
onright = NOT(false); |
| 808 |
continue; |
| 809 |
} |
| 810 |
} |
| 811 |
if (onleft && (onright == false)) |
| 812 |
bounds[0] = ord + 1; |
| 813 |
if (onright && (onleft == false)) |
| 814 |
bounds[1] = ord - 1; |
| 815 |
} |
| 816 |
} |
| 817 |
} finally { |
| 818 |
LEAVING("bwjjmaydx5a2fnpeoligkha0r","setbounds"); |
| 819 |
} |
| 820 |
} |
| 821 |
|
| 822 |
|
| 823 |
|
| 824 |
|
| 825 |
|
| 826 |
|
| 827 |
public static int flat_limits(ST_Agraph_s g, ST_Agedge_s e) { |
| 828 |
ENTERING("3bc4otcsxj1dujj49ydbb19oa","flat_limits"); |
| 829 |
try { |
| 830 |
int lnode, rnode, r, pos; |
| 831 |
int[] lpos = new int[1], rpos = new int[1]; |
| 832 |
int bounds[] = new int[4]; |
| 833 |
ST_Agnode_s.ArrayOfStar rank; |
| 834 |
r = ND_rank(agtail(e)) - 1; |
| 835 |
rank = GD_rank(g).get(r).v; |
| 836 |
lnode = 0; |
| 837 |
rnode = GD_rank(g).get(r).n - 1; |
| 838 |
bounds[0] = bounds[2] = lnode - 1; |
| 839 |
bounds[1] = bounds[3] = rnode + 1; |
| 840 |
findlr(agtail(e), aghead(e), lpos, rpos); |
| 841 |
while (lnode <= rnode) { |
| 842 |
setbounds((ST_Agnode_s)rank.get(lnode), bounds, lpos, rpos); |
| 843 |
if (lnode != rnode) |
| 844 |
setbounds((ST_Agnode_s)rank.get(rnode), bounds, lpos, rpos); |
| 845 |
lnode++; |
| 846 |
rnode--; |
| 847 |
if (bounds[1] - bounds[0] <= 1) |
| 848 |
break; |
| 849 |
} |
| 850 |
if (bounds[0] <= bounds[1]) |
| 851 |
pos = (bounds[0] + bounds[1] + 1) / 2; |
| 852 |
else |
| 853 |
pos = (bounds[2] + bounds[3] + 1) / 2; |
| 854 |
return pos; |
| 855 |
} finally { |
| 856 |
LEAVING("3bc4otcsxj1dujj49ydbb19oa","flat_limits"); |
| 857 |
} |
| 858 |
} |
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
public static void flat_node(ST_Agedge_s e) { |
| 866 |
ENTERING("4cw9yo9ap8ze1r873v6jat4yc","flat_node"); |
| 867 |
try { |
| 868 |
int r, place, ypos, h2; |
| 869 |
ST_Agraph_s g; |
| 870 |
ST_Agnode_s n, vn; |
| 871 |
ST_Agedge_s ve; |
| 872 |
final ST_pointf dimen = new ST_pointf(); |
| 873 |
if (ED_label(e) == null) |
| 874 |
return; |
| 875 |
g = dot_root(agtail(e)); |
| 876 |
r = ND_rank(agtail(e)); |
| 877 |
place = flat_limits(g, e); |
| 878 |
|
| 879 |
if ((n = (ST_Agnode_s) GD_rank(g).get(r - 1).v.get(0))!=null) |
| 880 |
ypos = (int)(ND_coord(n).y - GD_rank(g).get(r - 1).ht1); |
| 881 |
else { |
| 882 |
n = (ST_Agnode_s) GD_rank(g).get(r).v.get(0); |
| 883 |
ypos = (int)(ND_coord(n).y + GD_rank(g).get(r).ht2 + GD_ranksep(g)); |
| 884 |
} |
| 885 |
vn = make_vn_slot(g, r - 1, place); |
| 886 |
dimen.___(ED_label(e).dimen); |
| 887 |
if (GD_flip(g)!=0) { |
| 888 |
double f = dimen.x; |
| 889 |
dimen.setDouble("x", dimen.y); |
| 890 |
dimen.setDouble("y", f); |
| 891 |
} |
| 892 |
ND_ht(vn, dimen.y); |
| 893 |
h2 = (int)(ND_ht(vn) / 2); |
| 894 |
ND_rw(vn, dimen.x / 2); |
| 895 |
ND_lw(vn, ND_rw(vn)); |
| 896 |
ND_label(vn, ED_label(e)); |
| 897 |
ND_coord(vn).setDouble("y", ypos + h2); |
| 898 |
ve = virtual_edge(vn, agtail(e), e); |
| 899 |
ED_tail_port(ve).p.setDouble("x", -ND_lw(vn)); |
| 900 |
ED_head_port(ve).p.setDouble("x", ND_rw(agtail(e))); |
| 901 |
ED_edge_type(ve, 4); |
| 902 |
ve = virtual_edge(vn, aghead(e), e); |
| 903 |
ED_tail_port(ve).p.setDouble("x", ND_rw(vn)); |
| 904 |
ED_head_port(ve).p.setDouble("x", ND_lw(aghead(e))); |
| 905 |
ED_edge_type(ve, 4); |
| 906 |
|
| 907 |
if (GD_rank(g).get(r - 1).ht1 < h2) |
| 908 |
GD_rank(g).plus(r - 1).setDouble("ht1", h2); |
| 909 |
if (GD_rank(g).get(r - 1).ht2 < h2) |
| 910 |
GD_rank(g).plus(r - 1).setDouble("ht2", h2); |
| 911 |
ND_alg(vn, e); |
| 912 |
} finally { |
| 913 |
LEAVING("4cw9yo9ap8ze1r873v6jat4yc","flat_node"); |
| 914 |
} |
| 915 |
} |
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
public static void abomination(ST_Agraph_s g) { |
| 923 |
ENTERING("1lopavodoru6ee52snd5l6swd","abomination"); |
| 924 |
try { |
| 925 |
int r; |
| 926 |
ST_rank_t.Array2 rptr; |
| 927 |
assert(GD_minrank(g) == 0); |
| 928 |
|
| 929 |
r = GD_maxrank(g) + 3; |
| 930 |
rptr = ALLOC_ST_rank_t(r, (ST_rank_t.Array2) GD_rank(g)); |
| 931 |
GD_rank(g, rptr.plus(1)); |
| 932 |
for (r = GD_maxrank(g); r >= 0; r--) |
| 933 |
GD_rank(g).get(r).setStruct(GD_rank(g).get(r - 1).getStruct()); |
| 934 |
GD_rank(g).plus(r).setInt("n", 0); |
| 935 |
GD_rank(g).plus(r).setInt("an", 0); |
| 936 |
GD_rank(g).plus(r).setPtr("v", new ST_Agnode_s.ArrayOfStar(2)); |
| 937 |
GD_rank(g).plus(r).setPtr("av", GD_rank(g).get(r).v); |
| 938 |
GD_rank(g).plus(r).setPtr("flat", null); |
| 939 |
GD_rank(g).plus(r).setDouble("ht1", 1); |
| 940 |
GD_rank(g).plus(r).setDouble("ht2", 1); |
| 941 |
GD_rank(g).plus(r).setDouble("pht1", 1); |
| 942 |
GD_rank(g).plus(r).setDouble("pht2", 1); |
| 943 |
GD_minrank(g, GD_minrank(g)-1); |
| 944 |
} finally { |
| 945 |
LEAVING("1lopavodoru6ee52snd5l6swd","abomination"); |
| 946 |
} |
| 947 |
} |
| 948 |
|
| 949 |
|
| 950 |
|
| 951 |
|
| 952 |
|
| 953 |
|
| 954 |
public static void checkFlatAdjacent(ST_Agedge_s e) { |
| 955 |
ENTERING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent"); |
| 956 |
try { |
| 957 |
ST_Agnode_s tn = agtail(e); |
| 958 |
ST_Agnode_s hn = aghead(e); |
| 959 |
int i, lo, hi; |
| 960 |
ST_Agnode_s n; |
| 961 |
ST_rank_t.Array2 rank; |
| 962 |
if (ND_order(tn) < ND_order(hn)) { |
| 963 |
lo = ND_order(tn); |
| 964 |
hi = ND_order(hn); |
| 965 |
} |
| 966 |
else { |
| 967 |
lo = ND_order(hn); |
| 968 |
hi = ND_order(tn); |
| 969 |
} |
| 970 |
rank = GD_rank(dot_root(tn)).plus(ND_rank(tn)); |
| 971 |
for (i = lo + 1; i < hi; i++) { |
| 972 |
n = (ST_Agnode_s) rank.getPtr().v.get(i); |
| 973 |
if ((ND_node_type(n) == 1 && ND_label(n)!=null) || |
| 974 |
ND_node_type(n) == 0) |
| 975 |
break; |
| 976 |
} |
| 977 |
if (i == hi) { |
| 978 |
do { |
| 979 |
ED_adjacent(e, 1); |
| 980 |
e = ED_to_virt(e); |
| 981 |
} while (e!=null); |
| 982 |
} |
| 983 |
} finally { |
| 984 |
LEAVING("ctujx6e8k3rzv08h6gswdcaqs","checkFlatAdjacent"); |
| 985 |
} |
| 986 |
} |
| 987 |
|
| 988 |
|
| 989 |
|
| 990 |
|
| 991 |
|
| 992 |
|
| 993 |
public static int flat_edges(ST_Agraph_s g) { |
| 994 |
ENTERING("bjwwj6ftkm0gv04cf1edqeaw6","flat_edges"); |
| 995 |
try { |
| 996 |
int i, j, reset = 0; |
| 997 |
ST_Agnode_s n; |
| 998 |
ST_Agedge_s e; |
| 999 |
int found = 0; |
| 1000 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 1001 |
if (ND_flat_out(n).listNotNull()) { |
| 1002 |
for (j = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(j))!=null; j++) { |
| 1003 |
checkFlatAdjacent (e); |
| 1004 |
} |
| 1005 |
} |
| 1006 |
for (j = 0; j < ND_other(n).size; j++) { |
| 1007 |
e = (ST_Agedge_s) ND_other(n).getFromList(j); |
| 1008 |
if (ND_rank(aghead(e)) == ND_rank(agtail(e))) |
| 1009 |
checkFlatAdjacent (e); |
| 1010 |
} |
| 1011 |
} |
| 1012 |
if ((GD_rank(g).get(0).flat!=null) || (GD_n_cluster(g) > 0)) { |
| 1013 |
for (i = 0; (n = (ST_Agnode_s) GD_rank(g).get(0).v.get(i))!=null; i++) { |
| 1014 |
for (j = 0; (e = (ST_Agedge_s) ND_flat_in(n).getFromList(j))!=null; j++) { |
| 1015 |
if ((ED_label(e)!=null) && N(ED_adjacent(e))) { |
| 1016 |
abomination(g); |
| 1017 |
found = 1; |
| 1018 |
break; |
| 1019 |
} |
| 1020 |
} |
| 1021 |
if (found!=0) |
| 1022 |
break; |
| 1023 |
} |
| 1024 |
} |
| 1025 |
rec_save_vlists(g); |
| 1026 |
for (n = GD_nlist(g); n!=null; n = ND_next(n)) { |
| 1027 |
|
| 1028 |
if (ND_flat_out(n).listNotNull()) { |
| 1029 |
for (i = 0; (e = (ST_Agedge_s) ND_flat_out(n).getFromList(i))!=null; i++) { |
| 1030 |
if (ED_label(e)!=null) { |
| 1031 |
if (ED_adjacent(e)!=0) { |
| 1032 |
if (GD_flip(g)!=0) ED_dist(e, ED_label(e).dimen.y); |
| 1033 |
else ED_dist(e, ED_label(e).dimen.x); |
| 1034 |
} |
| 1035 |
else { |
| 1036 |
reset = 1; |
| 1037 |
flat_node(e); |
| 1038 |
} |
| 1039 |
} |
| 1040 |
} |
| 1041 |
|
| 1042 |
for (j = 0; j < ND_other(n).size; j++) { |
| 1043 |
ST_Agedge_s le; |
| 1044 |
e = (ST_Agedge_s) ND_other(n).getFromList(j); |
| 1045 |
if (ND_rank(agtail(e)) != ND_rank(aghead(e))) continue; |
| 1046 |
if (EQ(agtail(e), aghead(e))) continue; |
| 1047 |
le = e; |
| 1048 |
while (ED_to_virt(le)!=null) le = ED_to_virt(le); |
| 1049 |
ED_adjacent(e, ED_adjacent(le)); |
| 1050 |
if (ED_label(e)!=null) { |
| 1051 |
if (ED_adjacent(e)!=0) { |
| 1052 |
double lw; |
| 1053 |
if (GD_flip(g)!=0) lw = ED_label(e).dimen.y; |
| 1054 |
else lw = ED_label(e).dimen.x; |
| 1055 |
ED_dist(le, MAX(lw,ED_dist(le))); |
| 1056 |
} |
| 1057 |
else { |
| 1058 |
reset = 1; |
| 1059 |
flat_node(e); |
| 1060 |
} |
| 1061 |
} |
| 1062 |
} |
| 1063 |
} |
| 1064 |
} |
| 1065 |
if (reset!=0) |
| 1066 |
rec_reset_vlists(g); |
| 1067 |
return reset; |
| 1068 |
} finally { |
| 1069 |
LEAVING("bjwwj6ftkm0gv04cf1edqeaw6","flat_edges"); |
| 1070 |
} |
| 1071 |
} |
| 1072 |
|
| 1073 |
|
| 1074 |
} |