| 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.agfstedge; |
| 48 |
import static gen.lib.cgraph.edge__c.agfstout; |
| 49 |
import static gen.lib.cgraph.edge__c.aghead; |
| 50 |
import static gen.lib.cgraph.edge__c.agnxtedge; |
| 51 |
import static gen.lib.cgraph.edge__c.agnxtout; |
| 52 |
import static gen.lib.cgraph.edge__c.agtail; |
| 53 |
import static gen.lib.cgraph.node__c.agfstnode; |
| 54 |
import static gen.lib.cgraph.node__c.agnxtnode; |
| 55 |
import static gen.lib.cgraph.obj__c.agcontains; |
| 56 |
import static gen.lib.cgraph.obj__c.agroot; |
| 57 |
import static gen.lib.common.utils__c.UF_setname; |
| 58 |
import static gen.lib.common.utils__c.UF_singleton; |
| 59 |
import static gen.lib.dotgen.class2__c.class2; |
| 60 |
import static gen.lib.dotgen.class2__c.merge_chain; |
| 61 |
import static gen.lib.dotgen.class2__c.mergeable; |
| 62 |
import static gen.lib.dotgen.dotinit__c.dot_root; |
| 63 |
import static gen.lib.dotgen.fastgr__c.delete_fast_edge; |
| 64 |
import static gen.lib.dotgen.fastgr__c.delete_fast_node; |
| 65 |
import static gen.lib.dotgen.fastgr__c.fast_node; |
| 66 |
import static gen.lib.dotgen.fastgr__c.find_fast_edge; |
| 67 |
import static gen.lib.dotgen.fastgr__c.find_flat_edge; |
| 68 |
import static gen.lib.dotgen.fastgr__c.flat_edge; |
| 69 |
import static gen.lib.dotgen.fastgr__c.merge_oneway; |
| 70 |
import static gen.lib.dotgen.fastgr__c.other_edge; |
| 71 |
import static gen.lib.dotgen.fastgr__c.safe_other_edge; |
| 72 |
import static gen.lib.dotgen.fastgr__c.virtual_edge; |
| 73 |
import static gen.lib.dotgen.fastgr__c.virtual_node; |
| 74 |
import static gen.lib.dotgen.mincross__c.allocate_ranks; |
| 75 |
import static gen.lib.dotgen.mincross__c.build_ranks; |
| 76 |
import static gen.lib.dotgen.mincross__c.enqueue_neighbors; |
| 77 |
import static gen.lib.dotgen.mincross__c.install_in_rank; |
| 78 |
import static gen.lib.dotgen.position__c.ports_eq; |
| 79 |
import static smetana.core.JUtils.EQ; |
| 80 |
import static smetana.core.JUtils.NEQ; |
| 81 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 82 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 83 |
import static smetana.core.Macro.AGMKOUT; |
| 84 |
import static smetana.core.Macro.ED_count; |
| 85 |
import static smetana.core.Macro.ED_edge_type; |
| 86 |
import static smetana.core.Macro.ED_to_virt; |
| 87 |
import static smetana.core.Macro.ED_xpenalty; |
| 88 |
import static smetana.core.Macro.GD_clust; |
| 89 |
import static smetana.core.Macro.GD_comp; |
| 90 |
import static smetana.core.Macro.GD_expanded; |
| 91 |
import static smetana.core.Macro.GD_installed; |
| 92 |
import static smetana.core.Macro.GD_leader; |
| 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_n_nodes; |
| 97 |
import static smetana.core.Macro.GD_nlist; |
| 98 |
import static smetana.core.Macro.GD_rank; |
| 99 |
import static smetana.core.Macro.GD_rankleader; |
| 100 |
import static smetana.core.Macro.ND_UF_size; |
| 101 |
import static smetana.core.Macro.ND_clust; |
| 102 |
import static smetana.core.Macro.ND_in; |
| 103 |
import static smetana.core.Macro.ND_lw; |
| 104 |
import static smetana.core.Macro.ND_node_type; |
| 105 |
import static smetana.core.Macro.ND_order; |
| 106 |
import static smetana.core.Macro.ND_out; |
| 107 |
import static smetana.core.Macro.ND_rank; |
| 108 |
import static smetana.core.Macro.ND_ranktype; |
| 109 |
import static smetana.core.Macro.ND_rw; |
| 110 |
import static smetana.core.Macro.NOT; |
| 111 |
import static smetana.core.Macro.UNSUPPORTED; |
| 112 |
import h.ST_Agedge_s; |
| 113 |
import h.ST_Agnode_s; |
| 114 |
import h.ST_Agraph_s; |
| 115 |
import h.ST_nodequeue; |
| 116 |
import h.ST_pointf; |
| 117 |
|
| 118 |
public class cluster__c { |
| 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 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
public static Object pointof(Object... arg) { |
| 360 |
UNSUPPORTED("8e4tj258yvfq5uhsdpk37n5eq"); |
| 361 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 362 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 363 |
UNSUPPORTED("12jimkrzqxavaie0cpapbx18c"); |
| 364 |
UNSUPPORTED("7ivmviysahgsc5nn9gtp7q2if"); |
| 365 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 366 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 367 |
|
| 368 |
throw new UnsupportedOperationException(); |
| 369 |
} |
| 370 |
|
| 371 |
|
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
public static ST_pointf pointfof(double x, double y) { |
| 377 |
|
| 378 |
return pointfof_w_(x, y).copy(); |
| 379 |
} |
| 380 |
private static ST_pointf pointfof_w_(double x, double y) { |
| 381 |
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 382 |
try { |
| 383 |
final ST_pointf r = new ST_pointf(); |
| 384 |
r.setDouble("x", x); |
| 385 |
r.setDouble("y", y); |
| 386 |
return r; |
| 387 |
} finally { |
| 388 |
LEAVING("c1s4k85p1cdfn176o3uryeros","pointfof"); |
| 389 |
} |
| 390 |
} |
| 391 |
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
public static Object boxof(Object... arg) { |
| 398 |
UNSUPPORTED("3lzesfdd337h31jrlib1czocm"); |
| 399 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 400 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 401 |
UNSUPPORTED("cylhjlutoc0sc0uy7g98m9fb8"); |
| 402 |
UNSUPPORTED("242of6revxzx8hpe7yerrchz6"); |
| 403 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 404 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 405 |
|
| 406 |
throw new UnsupportedOperationException(); |
| 407 |
} |
| 408 |
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 |
|
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
public static Object add_point(Object... arg) { |
| 418 |
UNSUPPORTED("6iamka1fx8fk1rohzzse8phte"); |
| 419 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 420 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 421 |
UNSUPPORTED("3n2sizjd0civbzm6iq7su1s2p"); |
| 422 |
UNSUPPORTED("65ygdo31w09i5i6bd2f7azcd3"); |
| 423 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 424 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 425 |
|
| 426 |
throw new UnsupportedOperationException(); |
| 427 |
} |
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
public static ST_pointf add_pointf(final ST_pointf p, final ST_pointf q) { |
| 435 |
|
| 436 |
return add_pointf_w_(p.copy(), q.copy()).copy(); |
| 437 |
} |
| 438 |
private static ST_pointf add_pointf_w_(final ST_pointf p, final ST_pointf q) { |
| 439 |
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 440 |
try { |
| 441 |
final ST_pointf r = new ST_pointf(); |
| 442 |
r.setDouble("x", p.x + q.x); |
| 443 |
r.setDouble("y", p.y + q.y); |
| 444 |
return r; |
| 445 |
} finally { |
| 446 |
LEAVING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf"); |
| 447 |
} |
| 448 |
} |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
public static Object sub_point(Object... arg) { |
| 456 |
UNSUPPORTED("cd602849h0bce8lu9xegka0ia"); |
| 457 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 458 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 459 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 460 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 461 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 462 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 463 |
|
| 464 |
throw new UnsupportedOperationException(); |
| 465 |
} |
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
public static Object sub_pointf(Object... arg) { |
| 473 |
UNSUPPORTED("dmufj44lddsnj0wjyxsg2fcso"); |
| 474 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 475 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 476 |
UNSUPPORTED("4q4q9dveah93si8ajfv59gz27"); |
| 477 |
UNSUPPORTED("9f90ik0o2yqhanzntpy3d2ydy"); |
| 478 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 479 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 480 |
|
| 481 |
throw new UnsupportedOperationException(); |
| 482 |
} |
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
public static Object mid_point(Object... arg) { |
| 490 |
UNSUPPORTED("evy44tdsmu3erff9dp2x835u2"); |
| 491 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 492 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 493 |
UNSUPPORTED("1a6p6fm57o0wt5ze2btsx06c7"); |
| 494 |
UNSUPPORTED("1kbj5tgdmfi6kf4jgg6skhr6e"); |
| 495 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 496 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 497 |
|
| 498 |
throw new UnsupportedOperationException(); |
| 499 |
} |
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
public static Object mid_pointf(Object... arg) { |
| 507 |
UNSUPPORTED("381o63o9kb04d7gzg65v0r3q"); |
| 508 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 509 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 510 |
UNSUPPORTED("c5vboetlr3mf43wns7iik6m1w"); |
| 511 |
UNSUPPORTED("bcdf562ldr3bjn78hcay5xd63"); |
| 512 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 513 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 514 |
|
| 515 |
throw new UnsupportedOperationException(); |
| 516 |
} |
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
public static Object interpolate_pointf(Object... arg) { |
| 524 |
UNSUPPORTED("894yimn33kmtm454llwdaotu8"); |
| 525 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 526 |
UNSUPPORTED("ef2acl8wa2ooqcb5vz3098maz"); |
| 527 |
UNSUPPORTED("5tpwuyf5iidesy80v8o4nwkmk"); |
| 528 |
UNSUPPORTED("ewnrc5uloj3w5jbmsjcn3wja0"); |
| 529 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 530 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 531 |
|
| 532 |
throw new UnsupportedOperationException(); |
| 533 |
} |
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
public static Object exch_xy(Object... arg) { |
| 541 |
UNSUPPORTED("2vxya0v2fzlv5e0vjaa8d414"); |
| 542 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 543 |
UNSUPPORTED("c0j3k9xv06332q98k2pgpacto"); |
| 544 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 545 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 546 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 547 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 548 |
|
| 549 |
throw new UnsupportedOperationException(); |
| 550 |
} |
| 551 |
|
| 552 |
|
| 553 |
|
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
public static Object exch_xyf(Object... arg) { |
| 558 |
UNSUPPORTED("8qamrobrqi8jsvvfrxkimrsnw"); |
| 559 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 560 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 561 |
UNSUPPORTED("60cojdwc2h7f0m51s9jdwvup7"); |
| 562 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 563 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 564 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 565 |
|
| 566 |
throw new UnsupportedOperationException(); |
| 567 |
} |
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
|
| 574 |
public static Object box_bb(Object... arg) { |
| 575 |
UNSUPPORTED("36et5gmnjrby6o7bq9sgh1hx6"); |
| 576 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 577 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 578 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 579 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 580 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 581 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 582 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 583 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 584 |
|
| 585 |
throw new UnsupportedOperationException(); |
| 586 |
} |
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
public static Object boxf_bb(Object... arg) { |
| 594 |
UNSUPPORTED("dyrqu4ww9osr9c86gqgmifcp6"); |
| 595 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 596 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 597 |
UNSUPPORTED("8mr2c9xitsqi8z1plbp7ox1hu"); |
| 598 |
UNSUPPORTED("2egu55ef4u1i03nwz01k7kcrl"); |
| 599 |
UNSUPPORTED("9n6ei3odbgefwfxvql9whcpe"); |
| 600 |
UNSUPPORTED("19ocysbuh4pxyft2bqhyhigr1"); |
| 601 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 602 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 603 |
|
| 604 |
throw new UnsupportedOperationException(); |
| 605 |
} |
| 606 |
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
public static Object box_intersect(Object... arg) { |
| 613 |
UNSUPPORTED("34gv28cldst09bl71itjgviue"); |
| 614 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 615 |
UNSUPPORTED("52u27kayecy1i1e8bbo8f7s9r"); |
| 616 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 617 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 618 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 619 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 620 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 621 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 622 |
|
| 623 |
throw new UnsupportedOperationException(); |
| 624 |
} |
| 625 |
|
| 626 |
|
| 627 |
|
| 628 |
|
| 629 |
|
| 630 |
|
| 631 |
public static Object boxf_intersect(Object... arg) { |
| 632 |
UNSUPPORTED("ape22b8z6jfg17gvo42hok9eb"); |
| 633 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 634 |
UNSUPPORTED("c57pq0f87j6dnbcvygu7v6k84"); |
| 635 |
UNSUPPORTED("9slu7bixuymxttjic76ha2nl2"); |
| 636 |
UNSUPPORTED("3uv943c2f82yuif249pf5azob"); |
| 637 |
UNSUPPORTED("74tf5h16bc9zabq3s3dyny543"); |
| 638 |
UNSUPPORTED("d99gcv3i7xes7y7rqf8ii20ux"); |
| 639 |
UNSUPPORTED("2vmm1j57brhn455f8f3iyw6mo"); |
| 640 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 641 |
|
| 642 |
throw new UnsupportedOperationException(); |
| 643 |
} |
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
public static Object box_overlap(Object... arg) { |
| 651 |
UNSUPPORTED("1e9k599x7ygct7r4cfdxlk9u9"); |
| 652 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 653 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 654 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 655 |
|
| 656 |
throw new UnsupportedOperationException(); |
| 657 |
} |
| 658 |
|
| 659 |
|
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
public static Object boxf_overlap(Object... arg) { |
| 665 |
UNSUPPORTED("905nejsewihwhhc3bhnrz9nwo"); |
| 666 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 667 |
UNSUPPORTED("7a9wwpu7dhdphd08y1ecw54w5"); |
| 668 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 669 |
|
| 670 |
throw new UnsupportedOperationException(); |
| 671 |
} |
| 672 |
|
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
|
| 677 |
|
| 678 |
public static Object box_contains(Object... arg) { |
| 679 |
UNSUPPORTED("aputfc30fjkvy6jx4otljaczq"); |
| 680 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 681 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 682 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 683 |
|
| 684 |
throw new UnsupportedOperationException(); |
| 685 |
} |
| 686 |
|
| 687 |
|
| 688 |
|
| 689 |
|
| 690 |
|
| 691 |
|
| 692 |
public static Object boxf_contains(Object... arg) { |
| 693 |
UNSUPPORTED("7ccnttkiwt834yfyw0evcm18v"); |
| 694 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 695 |
UNSUPPORTED("87ap80vrh2a4gpprbxr33lrg3"); |
| 696 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 697 |
|
| 698 |
throw new UnsupportedOperationException(); |
| 699 |
} |
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
|
| 705 |
|
| 706 |
public static Object perp(Object... arg) { |
| 707 |
UNSUPPORTED("567wpqlg9rv63ynyvxd9sgkww"); |
| 708 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 709 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 710 |
UNSUPPORTED("2fyydy6t6yifjsczccsb9szeg"); |
| 711 |
UNSUPPORTED("evp2x66oa4s1tlnc0ytxq2qbq"); |
| 712 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 713 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 714 |
|
| 715 |
throw new UnsupportedOperationException(); |
| 716 |
} |
| 717 |
|
| 718 |
|
| 719 |
|
| 720 |
|
| 721 |
|
| 722 |
|
| 723 |
public static Object scale(Object... arg) { |
| 724 |
UNSUPPORTED("c1ngytew34bmkdb7vps5h3dh8"); |
| 725 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 726 |
UNSUPPORTED("cvexv13y9fq49v0j4d5t4cm9f"); |
| 727 |
UNSUPPORTED("dznf7nac14snww4usquyd6r3r"); |
| 728 |
UNSUPPORTED("33kk73m8vjcux5tnjl8co2pe6"); |
| 729 |
UNSUPPORTED("a2hk6w52njqjx48nq3nnn2e5i"); |
| 730 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 731 |
|
| 732 |
throw new UnsupportedOperationException(); |
| 733 |
} |
| 734 |
|
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
|
| 740 |
public static ST_Agnode_s map_interclust_node(ST_Agnode_s n) { |
| 741 |
ENTERING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node"); |
| 742 |
try { |
| 743 |
ST_Agnode_s rv; |
| 744 |
if ((ND_clust(n) == null) || ( GD_expanded(ND_clust(n))) ) |
| 745 |
rv = n; |
| 746 |
else |
| 747 |
rv = (ST_Agnode_s) GD_rankleader(ND_clust(n)).plus(ND_rank(n)).getPtr(); |
| 748 |
return rv; |
| 749 |
} finally { |
| 750 |
LEAVING("8bd317q0mykfu6wpr3e4cxmh2","map_interclust_node"); |
| 751 |
} |
| 752 |
} |
| 753 |
|
| 754 |
|
| 755 |
|
| 756 |
|
| 757 |
|
| 758 |
|
| 759 |
public static void make_slots(ST_Agraph_s root, int r, int pos, int d) { |
| 760 |
ENTERING("5ib4nnt2ah5fdd22zs0xds29r","make_slots"); |
| 761 |
try { |
| 762 |
int i; |
| 763 |
ST_Agnode_s v; |
| 764 |
ST_Agnode_s.ArrayOfStar vlist; |
| 765 |
vlist = GD_rank(root).get(r).v; |
| 766 |
if (d <= 0) { |
| 767 |
for (i = pos - d + 1; i < GD_rank(root).get(r).n; i++) { |
| 768 |
v = (ST_Agnode_s) vlist.get(i); |
| 769 |
ND_order(v, i + d - 1); |
| 770 |
vlist.plus(ND_order(v)).setPtr(v); |
| 771 |
} |
| 772 |
for (i = GD_rank(root).get(r).n + d - 1; i < GD_rank(root).get(r).n; i++) |
| 773 |
vlist.plus(i).setPtr(null); |
| 774 |
} else { |
| 775 |
|
| 776 |
for (i = GD_rank(root).get(r).n - 1; i > pos; i--) { |
| 777 |
v = (ST_Agnode_s) vlist.get(i); |
| 778 |
ND_order(v, i + d - 1); |
| 779 |
vlist.plus(ND_order(v)).setPtr(v); |
| 780 |
} |
| 781 |
for (i = pos + 1; i < pos + d; i++) |
| 782 |
vlist.plus(i).setPtr(null); |
| 783 |
} |
| 784 |
GD_rank(root).get(r).setInt("n", GD_rank(root).get(r).n + d - 1); |
| 785 |
} finally { |
| 786 |
LEAVING("5ib4nnt2ah5fdd22zs0xds29r","make_slots"); |
| 787 |
} |
| 788 |
} |
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
public static ST_Agnode_s clone_vn(ST_Agraph_s g, ST_Agnode_s vn) { |
| 796 |
ENTERING("d4mwxesl56uh9dyttg9cjlq70","clone_vn"); |
| 797 |
try { |
| 798 |
ST_Agnode_s rv; |
| 799 |
int r; |
| 800 |
r = ND_rank(vn); |
| 801 |
make_slots(g, r, ND_order(vn), 2); |
| 802 |
rv = virtual_node(g); |
| 803 |
ND_lw(rv, ND_lw(vn)); |
| 804 |
ND_rw(rv, ND_rw(vn)); |
| 805 |
ND_rank(rv, ND_rank(vn)); |
| 806 |
UNSUPPORTED("adc0qfdhup29vh8qu1cwl5jgj"); |
| 807 |
UNSUPPORTED("v7vqc9l7ge2bfdwnw11z7rzi"); |
| 808 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 809 |
|
| 810 |
throw new UnsupportedOperationException(); |
| 811 |
} finally { |
| 812 |
LEAVING("d4mwxesl56uh9dyttg9cjlq70","clone_vn"); |
| 813 |
} |
| 814 |
} |
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
|
| 819 |
|
| 820 |
|
| 821 |
public static void map_path(ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig, ST_Agedge_s ve, int type) { |
| 822 |
ENTERING("6o86r59v2ujlxqcw7761y6o5b","map_path"); |
| 823 |
try { |
| 824 |
int r; |
| 825 |
ST_Agnode_s u, v; |
| 826 |
ST_Agedge_s e; |
| 827 |
assert(ND_rank(from) < ND_rank(to)); |
| 828 |
if (EQ(agtail(ve), from) && EQ(aghead(ve), to)) |
| 829 |
return; |
| 830 |
if (ED_count(ve) > 1) { |
| 831 |
ED_to_virt(orig, null); |
| 832 |
if (ND_rank(to) - ND_rank(from) == 1) { |
| 833 |
if ((e = find_fast_edge(from, to))!=null && (ports_eq(orig, e))) { |
| 834 |
merge_oneway(orig, e); |
| 835 |
if ((ND_node_type(from) == 0) |
| 836 |
&& (ND_node_type(to) == 0)) |
| 837 |
other_edge(orig); |
| 838 |
return; |
| 839 |
} |
| 840 |
} |
| 841 |
u = from; |
| 842 |
for (r = ND_rank(from); r < ND_rank(to); r++) { |
| 843 |
if (r < ND_rank(to) - 1) |
| 844 |
v = clone_vn(dot_root(from), aghead(ve)); |
| 845 |
else |
| 846 |
v = to; |
| 847 |
e = virtual_edge(u, v, orig); |
| 848 |
ED_edge_type(e, type); |
| 849 |
u = v; |
| 850 |
ED_count(ve, ED_count(ve) - 1); |
| 851 |
ve = (ST_Agedge_s) ND_out(aghead(ve)).getFromList(0); |
| 852 |
} |
| 853 |
} else { |
| 854 |
if (ND_rank(to) - ND_rank(from) == 1) { |
| 855 |
if ((ve = find_fast_edge(from, to))!=null && (ports_eq(orig, ve))) { |
| 856 |
|
| 857 |
ED_to_virt(orig, ve); |
| 858 |
ED_edge_type(ve, type); |
| 859 |
ED_count(ve, ED_count(ve)+1); |
| 860 |
if ((ND_node_type(from) == 0) |
| 861 |
&& (ND_node_type(to) == 0)) |
| 862 |
other_edge(orig); |
| 863 |
} else { |
| 864 |
ED_to_virt(orig, null); |
| 865 |
ve = virtual_edge(from, to, orig); |
| 866 |
ED_edge_type(ve, type); |
| 867 |
} |
| 868 |
} |
| 869 |
if (ND_rank(to) - ND_rank(from) > 1) { |
| 870 |
e = ve; |
| 871 |
if (NEQ(agtail(ve), from)) { |
| 872 |
ED_to_virt(orig, null); |
| 873 |
e = virtual_edge(from, aghead(ve), orig); |
| 874 |
ED_to_virt(orig, e); |
| 875 |
delete_fast_edge(ve); |
| 876 |
} else |
| 877 |
e = ve; |
| 878 |
while (ND_rank(aghead(e)) != ND_rank(to)) |
| 879 |
e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0); |
| 880 |
if (NEQ(aghead(e), to)) { |
| 881 |
ve = e; |
| 882 |
e = virtual_edge(agtail(e), to, orig); |
| 883 |
ED_edge_type(e, type); |
| 884 |
delete_fast_edge(ve); |
| 885 |
} |
| 886 |
} |
| 887 |
} |
| 888 |
} finally { |
| 889 |
LEAVING("6o86r59v2ujlxqcw7761y6o5b","map_path"); |
| 890 |
} |
| 891 |
} |
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
public static void make_interclust_chain(ST_Agraph_s g, ST_Agnode_s from, ST_Agnode_s to, ST_Agedge_s orig) { |
| 899 |
ENTERING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain"); |
| 900 |
try { |
| 901 |
int newtype; |
| 902 |
ST_Agnode_s u, v; |
| 903 |
u = map_interclust_node(from); |
| 904 |
v = map_interclust_node(to); |
| 905 |
if (EQ(u, from) && EQ(v, to)) |
| 906 |
newtype = 1; |
| 907 |
else |
| 908 |
newtype = 5; |
| 909 |
map_path(u, v, orig, ED_to_virt(orig), newtype); |
| 910 |
} finally { |
| 911 |
LEAVING("69xbflgja0gvrsl5xcv7o7dia","make_interclust_chain"); |
| 912 |
} |
| 913 |
} |
| 914 |
|
| 915 |
|
| 916 |
|
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
public static void interclexp(ST_Agraph_s subg) { |
| 921 |
ENTERING("6g2m2y44x66lajznvnon2gubv","interclexp"); |
| 922 |
try { |
| 923 |
ST_Agraph_s g; |
| 924 |
ST_Agnode_s n; |
| 925 |
ST_Agedge_s e, prev, next; |
| 926 |
g = dot_root(subg); |
| 927 |
for (n = agfstnode(subg); n!=null; n = agnxtnode(subg, n)) { |
| 928 |
|
| 929 |
prev = null; |
| 930 |
for (e = agfstedge(g, n); e!=null; e = next) { |
| 931 |
next = agnxtedge(g, e, n); |
| 932 |
if (agcontains(subg, e)) |
| 933 |
continue; |
| 934 |
|
| 935 |
e = AGMKOUT(e); |
| 936 |
|
| 937 |
if (mergeable(prev, e)) { |
| 938 |
if (ND_rank(agtail(e)) == ND_rank(aghead(e))) |
| 939 |
ED_to_virt(e, prev); |
| 940 |
else |
| 941 |
ED_to_virt(e, null); |
| 942 |
if (ED_to_virt(prev) == null) |
| 943 |
continue; |
| 944 |
merge_chain(subg, e, ED_to_virt(prev), false); |
| 945 |
safe_other_edge(e); |
| 946 |
continue; |
| 947 |
} |
| 948 |
|
| 949 |
if (ND_rank(agtail(e)) == ND_rank(aghead(e))) { |
| 950 |
ST_Agedge_s fe; |
| 951 |
if ((fe = find_flat_edge(agtail(e), aghead(e))) == null) { |
| 952 |
flat_edge(g, e); |
| 953 |
prev = e; |
| 954 |
} else if (NEQ(e, fe)) { |
| 955 |
UNSUPPORTED("ckfinb4h4twp1ry02y9peyhz"); |
| 956 |
UNSUPPORTED("dg3e0udctqa7xtfynplc7wdpj"); |
| 957 |
} |
| 958 |
continue; |
| 959 |
} |
| 960 |
|
| 961 |
if (ND_rank(aghead(e)) > ND_rank(agtail(e))) { |
| 962 |
make_interclust_chain(g, agtail(e), aghead(e), e); |
| 963 |
prev = e; |
| 964 |
continue; |
| 965 |
} |
| 966 |
|
| 967 |
else { |
| 968 |
|
| 969 |
|
| 970 |
|
| 971 |
|
| 972 |
|
| 973 |
make_interclust_chain(g, aghead(e), agtail(e), e); |
| 974 |
prev = e; |
| 975 |
} |
| 976 |
} |
| 977 |
} |
| 978 |
} finally { |
| 979 |
LEAVING("6g2m2y44x66lajznvnon2gubv","interclexp"); |
| 980 |
} |
| 981 |
} |
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
|
| 988 |
public static void merge_ranks(ST_Agraph_s subg) { |
| 989 |
ENTERING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks"); |
| 990 |
try { |
| 991 |
int i, d, r, pos, ipos; |
| 992 |
ST_Agnode_s v; |
| 993 |
ST_Agraph_s root; |
| 994 |
root = dot_root(subg); |
| 995 |
if (GD_minrank(subg) > 0) |
| 996 |
GD_rank(root).plus(GD_minrank(subg) - 1).getPtr().setInt("valid", 0); |
| 997 |
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { |
| 998 |
d = GD_rank(subg).get(r).n; |
| 999 |
ipos = pos = ND_order(GD_rankleader(subg).get(r)); |
| 1000 |
make_slots(root, r, pos, d); |
| 1001 |
for (i = 0; i < GD_rank(subg).get(r).n; i++) { |
| 1002 |
v = (ST_Agnode_s) GD_rank(subg).get(r).v.get(i); |
| 1003 |
GD_rank(root).get(r).v.plus(pos).setPtr(v); |
| 1004 |
ND_order(v, pos++); |
| 1005 |
|
| 1006 |
if (ND_node_type(v) == 1) |
| 1007 |
v.setPtr("root", agroot(root)); |
| 1008 |
delete_fast_node(subg, v); |
| 1009 |
fast_node(root, v); |
| 1010 |
GD_n_nodes(root, GD_n_nodes(root)+1); |
| 1011 |
} |
| 1012 |
GD_rank(subg).get(r).setPtr("v", GD_rank(root).get(r).v.plus(ipos)); |
| 1013 |
GD_rank(root).get(r).setInt("valid", 0); |
| 1014 |
} |
| 1015 |
if (r < GD_maxrank(root)) |
| 1016 |
GD_rank(root).get(r).setInt("valid", 0); |
| 1017 |
GD_expanded(subg, NOT(false)); |
| 1018 |
} finally { |
| 1019 |
LEAVING("85nhs7tnmwunw0fsjj1kxao7l","merge_ranks"); |
| 1020 |
} |
| 1021 |
} |
| 1022 |
|
| 1023 |
|
| 1024 |
|
| 1025 |
|
| 1026 |
|
| 1027 |
|
| 1028 |
public static void remove_rankleaders(ST_Agraph_s g) { |
| 1029 |
ENTERING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders"); |
| 1030 |
try { |
| 1031 |
int r; |
| 1032 |
ST_Agnode_s v; |
| 1033 |
ST_Agedge_s e; |
| 1034 |
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) { |
| 1035 |
v = (ST_Agnode_s) GD_rankleader(g).get(r); |
| 1036 |
|
| 1037 |
while ((e = (ST_Agedge_s) ND_out(v).getFromList(0))!=null) |
| 1038 |
delete_fast_edge(e); |
| 1039 |
while ((e = (ST_Agedge_s) ND_in(v).getFromList(0))!=null) |
| 1040 |
delete_fast_edge(e); |
| 1041 |
delete_fast_node(dot_root(g), v); |
| 1042 |
GD_rankleader(g).plus(r).setPtr(null); |
| 1043 |
} |
| 1044 |
} finally { |
| 1045 |
LEAVING("c9p7dm16i13qktnh95os0sv58","remove_rankleaders"); |
| 1046 |
} |
| 1047 |
} |
| 1048 |
|
| 1049 |
|
| 1050 |
|
| 1051 |
|
| 1052 |
|
| 1053 |
|
| 1054 |
public static void expand_cluster(ST_Agraph_s subg) { |
| 1055 |
ENTERING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster"); |
| 1056 |
try { |
| 1057 |
|
| 1058 |
class2(subg); |
| 1059 |
GD_comp(subg).size = 1; |
| 1060 |
|
| 1061 |
GD_comp(subg).setInList(0, GD_nlist(subg)); |
| 1062 |
allocate_ranks(subg); |
| 1063 |
build_ranks(subg, 0); |
| 1064 |
merge_ranks(subg); |
| 1065 |
|
| 1066 |
interclexp(subg); |
| 1067 |
remove_rankleaders(subg); |
| 1068 |
} finally { |
| 1069 |
LEAVING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster"); |
| 1070 |
} |
| 1071 |
} |
| 1072 |
|
| 1073 |
|
| 1074 |
|
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 |
public static void mark_clusters(ST_Agraph_s g) { |
| 1079 |
ENTERING("cxuirggihlap2iv2khmb1w5l5","mark_clusters"); |
| 1080 |
try { |
| 1081 |
int c; |
| 1082 |
ST_Agnode_s n, nn=null, vn; |
| 1083 |
ST_Agedge_s orig, e; |
| 1084 |
ST_Agraph_s clust; |
| 1085 |
|
| 1086 |
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { |
| 1087 |
if (ND_ranktype(n) == 7) |
| 1088 |
UF_singleton(n); |
| 1089 |
ND_clust(n, null); |
| 1090 |
} |
| 1091 |
for (c = 1; c <= GD_n_cluster(g); c++) { |
| 1092 |
clust = (ST_Agraph_s) GD_clust(g).get(c).getPtr(); |
| 1093 |
for (n = agfstnode(clust); n!=null; n = nn) { |
| 1094 |
nn = agnxtnode(clust,n); |
| 1095 |
if (ND_ranktype(n) != 0) { |
| 1096 |
UNSUPPORTED("5l8jenkv77ax02t47zzxyv1k0"); |
| 1097 |
UNSUPPORTED("2ipl4umxgijawr7756ysp9hhd"); |
| 1098 |
UNSUPPORTED("7r0ulsiau9cygesawzzjnpt5j"); |
| 1099 |
UNSUPPORTED("4zqc8357rwnd9xe7zaoqooqv3"); |
| 1100 |
UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); |
| 1101 |
} |
| 1102 |
UF_setname(n, GD_leader(clust)); |
| 1103 |
ND_clust(n, clust); |
| 1104 |
ND_ranktype(n, 7); |
| 1105 |
|
| 1106 |
for (orig = agfstout(clust, n); orig!=null; |
| 1107 |
orig = agnxtout(clust, orig)) { |
| 1108 |
if ((e = ED_to_virt(orig))!=null) { |
| 1109 |
while (e!=null && ND_node_type(vn =aghead(e)) == 1) { |
| 1110 |
ND_clust(vn, clust); |
| 1111 |
e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0); |
| 1112 |
|
| 1113 |
} |
| 1114 |
} |
| 1115 |
} |
| 1116 |
} |
| 1117 |
} |
| 1118 |
} finally { |
| 1119 |
LEAVING("cxuirggihlap2iv2khmb1w5l5","mark_clusters"); |
| 1120 |
} |
| 1121 |
} |
| 1122 |
|
| 1123 |
|
| 1124 |
|
| 1125 |
|
| 1126 |
|
| 1127 |
|
| 1128 |
public static void build_skeleton(ST_Agraph_s g, ST_Agraph_s subg) { |
| 1129 |
ENTERING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton"); |
| 1130 |
try { |
| 1131 |
int r; |
| 1132 |
ST_Agnode_s v, prev, rl; |
| 1133 |
ST_Agedge_s e; |
| 1134 |
prev = null; |
| 1135 |
|
| 1136 |
GD_rankleader(subg, new ST_Agnode_s.Array(GD_maxrank(subg) + 2)); |
| 1137 |
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { |
| 1138 |
v = virtual_node(g); |
| 1139 |
GD_rankleader(subg).plus(r).setPtr(v); |
| 1140 |
ND_rank(v, r); |
| 1141 |
ND_ranktype(v, 7); |
| 1142 |
ND_clust(v, subg); |
| 1143 |
if (prev!=null) { |
| 1144 |
e = virtual_edge(prev, v, null); |
| 1145 |
ED_xpenalty(e, ED_xpenalty(e) * 1000); |
| 1146 |
} |
| 1147 |
prev = v; |
| 1148 |
} |
| 1149 |
|
| 1150 |
for (v = agfstnode(subg); v!=null; v = agnxtnode(subg, v)) { |
| 1151 |
rl = (ST_Agnode_s) GD_rankleader(subg).plus(ND_rank(v)).getPtr(); |
| 1152 |
ND_UF_size(rl, ND_UF_size(rl)+1); |
| 1153 |
for (e = agfstout(subg, v); e!=null; e = agnxtout(subg, e)) { |
| 1154 |
for (r = ND_rank(agtail(e)); r < ND_rank(aghead(e)); r++) { |
| 1155 |
ED_count(ND_out(rl).getFromList(0), ED_count(ND_out(rl).getFromList(0))+1); |
| 1156 |
} |
| 1157 |
} |
| 1158 |
} |
| 1159 |
for (r = GD_minrank(subg); r <= GD_maxrank(subg); r++) { |
| 1160 |
rl = (ST_Agnode_s) GD_rankleader(subg).get(r); |
| 1161 |
if (ND_UF_size(rl) > 1) |
| 1162 |
ND_UF_size(rl, ND_UF_size(rl)-1); |
| 1163 |
} |
| 1164 |
} finally { |
| 1165 |
LEAVING("bwrw5u0gi2rgah1cn9h0glpse","build_skeleton"); |
| 1166 |
} |
| 1167 |
} |
| 1168 |
|
| 1169 |
|
| 1170 |
|
| 1171 |
|
| 1172 |
|
| 1173 |
|
| 1174 |
public static void install_cluster(ST_Agraph_s g, ST_Agnode_s n, int pass, ST_nodequeue q) { |
| 1175 |
ENTERING("75yt3xwcwnxipi827t1r8zcmn","install_cluster"); |
| 1176 |
try { |
| 1177 |
int r; |
| 1178 |
ST_Agraph_s clust; |
| 1179 |
clust = ND_clust(n); |
| 1180 |
if (GD_installed(clust) != pass + 1) { |
| 1181 |
for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++) |
| 1182 |
install_in_rank(g, (ST_Agnode_s) GD_rankleader(clust).get(r)); |
| 1183 |
for (r = GD_minrank(clust); r <= GD_maxrank(clust); r++) |
| 1184 |
enqueue_neighbors(q, (ST_Agnode_s) GD_rankleader(clust).get(r), pass); |
| 1185 |
GD_installed(clust, pass + 1); |
| 1186 |
} |
| 1187 |
} finally { |
| 1188 |
LEAVING("75yt3xwcwnxipi827t1r8zcmn","install_cluster"); |
| 1189 |
} |
| 1190 |
} |
| 1191 |
|
| 1192 |
|
| 1193 |
|
| 1194 |
|
| 1195 |
|
| 1196 |
|
| 1197 |
public static void mark_lowclusters(ST_Agraph_s root) { |
| 1198 |
ENTERING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters"); |
| 1199 |
try { |
| 1200 |
ST_Agnode_s n, vn; |
| 1201 |
ST_Agedge_s orig, e; |
| 1202 |
|
| 1203 |
for (n = agfstnode(root); n!=null; n = agnxtnode(root, n)) { |
| 1204 |
ND_clust(n, null); |
| 1205 |
for (orig = agfstout(root, n); orig!=null; orig = agnxtout(root, orig)) { |
| 1206 |
if ((e = ED_to_virt(orig))!=null) { |
| 1207 |
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) { |
| 1208 |
ND_clust(vn, null); |
| 1209 |
e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0); |
| 1210 |
} |
| 1211 |
} |
| 1212 |
} |
| 1213 |
} |
| 1214 |
|
| 1215 |
mark_lowcluster_basic(root); |
| 1216 |
} finally { |
| 1217 |
LEAVING("4muksvb3ec03mt6cvaqpb5c7a","mark_lowclusters"); |
| 1218 |
} |
| 1219 |
} |
| 1220 |
|
| 1221 |
|
| 1222 |
|
| 1223 |
|
| 1224 |
|
| 1225 |
|
| 1226 |
public static void mark_lowcluster_basic(ST_Agraph_s g) { |
| 1227 |
ENTERING("48j6fdymvkcgeh4wde060ctac","mark_lowcluster_basic"); |
| 1228 |
try { |
| 1229 |
ST_Agraph_s clust; |
| 1230 |
ST_Agnode_s n, vn; |
| 1231 |
ST_Agedge_s orig, e; |
| 1232 |
int c; |
| 1233 |
for (c = 1; c <= GD_n_cluster(g); c++) { |
| 1234 |
clust = (ST_Agraph_s) GD_clust(g).get(c).getPtr(); |
| 1235 |
mark_lowcluster_basic(clust); |
| 1236 |
} |
| 1237 |
|
| 1238 |
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) { |
| 1239 |
if (ND_clust(n) == null) |
| 1240 |
ND_clust(n, g); |
| 1241 |
for (orig = agfstout(g, n); orig!=null; orig = agnxtout(g, orig)) { |
| 1242 |
if ((e = ED_to_virt(orig))!=null) { |
| 1243 |
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) { |
| 1244 |
if (ND_clust(vn) == null) |
| 1245 |
ND_clust(vn, g); |
| 1246 |
e = (ST_Agedge_s) ND_out(aghead(e)).getFromList(0); |
| 1247 |
} |
| 1248 |
} |
| 1249 |
} |
| 1250 |
} |
| 1251 |
} finally { |
| 1252 |
LEAVING("48j6fdymvkcgeh4wde060ctac","mark_lowcluster_basic"); |
| 1253 |
} |
| 1254 |
} |
| 1255 |
|
| 1256 |
|
| 1257 |
} |