| 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.cgraph; |
| 47 |
import static gen.lib.cdt.dtextract__c.dtextract; |
| 48 |
import static gen.lib.cdt.dtrestore__c.dtrestore; |
| 49 |
import static gen.lib.cgraph.attr__c.AgDataRecName; |
| 50 |
import static gen.lib.cgraph.attr__c.agedgeattr_init; |
| 51 |
import static gen.lib.cgraph.graph__c.agisstrict; |
| 52 |
import static gen.lib.cgraph.graph__c.agisundirected; |
| 53 |
import static gen.lib.cgraph.graph__c.agnextseq; |
| 54 |
import static gen.lib.cgraph.id__c.agmapnametoid; |
| 55 |
import static gen.lib.cgraph.id__c.agregister; |
| 56 |
import static gen.lib.cgraph.mem__c.agalloc; |
| 57 |
import static gen.lib.cgraph.node__c.agsubnode; |
| 58 |
import static gen.lib.cgraph.obj__c.agmethod_init; |
| 59 |
import static gen.lib.cgraph.obj__c.agroot; |
| 60 |
import static gen.lib.cgraph.rec__c.agbindrec; |
| 61 |
import static gen.lib.cgraph.subg__c.agparent; |
| 62 |
import static smetana.core.JUtils.EQ; |
| 63 |
import static smetana.core.JUtils.NEQ; |
| 64 |
import static smetana.core.JUtils.sizeof; |
| 65 |
import static smetana.core.JUtilsDebug.ENTERING; |
| 66 |
import static smetana.core.JUtilsDebug.LEAVING; |
| 67 |
import static smetana.core.Macro.AGEDGE; |
| 68 |
import static smetana.core.Macro.AGHEAD; |
| 69 |
import static smetana.core.Macro.AGID; |
| 70 |
import static smetana.core.Macro.AGINEDGE; |
| 71 |
import static smetana.core.Macro.AGMKIN; |
| 72 |
import static smetana.core.Macro.AGMKOUT; |
| 73 |
import static smetana.core.Macro.AGOPP; |
| 74 |
import static smetana.core.Macro.AGOUTEDGE; |
| 75 |
import static smetana.core.Macro.AGSEQ; |
| 76 |
import static smetana.core.Macro.AGTAG; |
| 77 |
import static smetana.core.Macro.AGTAIL; |
| 78 |
import static smetana.core.Macro.AGTYPE; |
| 79 |
import static smetana.core.Macro.N; |
| 80 |
import static smetana.core.Macro.NOT; |
| 81 |
import static smetana.core.Macro.UNSUPPORTED; |
| 82 |
import h.ST_Agattr_s; |
| 83 |
import h.ST_Agdesc_s; |
| 84 |
import h.ST_Agedge_s; |
| 85 |
import h.ST_Agedgepair_s; |
| 86 |
import h.ST_Agnode_s; |
| 87 |
import h.ST_Agraph_s; |
| 88 |
import h.ST_Agsubnode_s; |
| 89 |
import h.ST_Agtag_s; |
| 90 |
import h.ST_dt_s; |
| 91 |
import h.ST_dtdisc_s; |
| 92 |
import h.ST_dtlink_s; |
| 93 |
import smetana.core.ACCESS; |
| 94 |
import smetana.core.CString; |
| 95 |
import smetana.core.STARSTAR; |
| 96 |
import smetana.core.Z; |
| 97 |
import smetana.core.__ptr__; |
| 98 |
|
| 99 |
public class edge__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 |
public static ST_Agedge_s agfstout(ST_Agraph_s g, ST_Agnode_s n) { |
| 241 |
ENTERING("9vamtktowqtk4955i546z9obw","agfstout"); |
| 242 |
try { |
| 243 |
ST_Agsubnode_s sn; |
| 244 |
ST_Agedge_s e = null; |
| 245 |
sn = agsubrep(g, n); |
| 246 |
if (sn!=null) { |
| 247 |
dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.out_seq); |
| 248 |
e = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,null,0000200); |
| 249 |
sn.out_seq = dtextract((ST_dt_s)g.e_seq); |
| 250 |
} |
| 251 |
return e; |
| 252 |
} finally { |
| 253 |
LEAVING("9vamtktowqtk4955i546z9obw","agfstout"); |
| 254 |
} |
| 255 |
} |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
public static ST_Agedge_s agnxtout(ST_Agraph_s g, ST_Agedge_s e) { |
| 263 |
ENTERING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout"); |
| 264 |
try { |
| 265 |
ST_Agnode_s n; |
| 266 |
ST_Agsubnode_s sn; |
| 267 |
ST_Agedge_s f = null; |
| 268 |
n = AGTAIL(e); |
| 269 |
sn = agsubrep(g, n); |
| 270 |
if (sn!=null) { |
| 271 |
dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.out_seq); |
| 272 |
f = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,e,0000010); |
| 273 |
sn.out_seq = dtextract((ST_dt_s)g.e_seq); |
| 274 |
} |
| 275 |
return f; |
| 276 |
} finally { |
| 277 |
LEAVING("1qh7mgqwomkdqvczauv4ex1lu","agnxtout"); |
| 278 |
} |
| 279 |
} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
public static ST_Agedge_s agfstin(ST_Agraph_s g, ST_Agnode_s n) { |
| 287 |
ENTERING("c60qt3ycq0xweabgtqt16xe93","agfstin"); |
| 288 |
try { |
| 289 |
ST_Agsubnode_s sn; |
| 290 |
ST_Agedge_s e = null; |
| 291 |
sn = agsubrep(g, n); |
| 292 |
if (sn!=null) { |
| 293 |
dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.in_seq); |
| 294 |
e = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,null,0000200); |
| 295 |
sn.setPtr("in_seq", dtextract((ST_dt_s)g.e_seq)); |
| 296 |
} |
| 297 |
return e; |
| 298 |
} finally { |
| 299 |
LEAVING("c60qt3ycq0xweabgtqt16xe93","agfstin"); |
| 300 |
} |
| 301 |
} |
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
|
| 307 |
|
| 308 |
public static ST_Agedge_s agnxtin(ST_Agraph_s g, ST_Agedge_s e) { |
| 309 |
ENTERING("f2af4x97mqn16npd6alsw7avs","agnxtin"); |
| 310 |
try { |
| 311 |
ST_Agnode_s n; |
| 312 |
ST_Agsubnode_s sn; |
| 313 |
ST_Agedge_s f = null; |
| 314 |
n = AGHEAD(e); |
| 315 |
sn = agsubrep(g, n); |
| 316 |
if (sn!=null) { |
| 317 |
dtrestore((ST_dt_s)g.e_seq, (ST_dtlink_s)sn.in_seq); |
| 318 |
f = (ST_Agedge_s) g.e_seq.searchf.exe(g.e_seq,e,0000010); |
| 319 |
sn.setPtr("in_seq", dtextract((ST_dt_s)g.e_seq)); |
| 320 |
} |
| 321 |
return f; |
| 322 |
} finally { |
| 323 |
LEAVING("f2af4x97mqn16npd6alsw7avs","agnxtin"); |
| 324 |
} |
| 325 |
} |
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
public static ST_Agedge_s agfstedge(ST_Agraph_s g, ST_Agnode_s n) { |
| 333 |
ENTERING("6nwyo5bklramr0d093aa1h25o","agfstedge"); |
| 334 |
try { |
| 335 |
ST_Agedge_s rv; |
| 336 |
rv = agfstout(g, n); |
| 337 |
if (rv == null) |
| 338 |
rv = agfstin(g, n); |
| 339 |
return rv; |
| 340 |
} finally { |
| 341 |
LEAVING("6nwyo5bklramr0d093aa1h25o","agfstedge"); |
| 342 |
} |
| 343 |
} |
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
|
| 349 |
|
| 350 |
public static ST_Agedge_s agnxtedge(ST_Agraph_s g, ST_Agedge_s e, ST_Agnode_s n) { |
| 351 |
ENTERING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge"); |
| 352 |
try { |
| 353 |
ST_Agedge_s rv; |
| 354 |
if (AGTYPE(e) == AGOUTEDGE) { |
| 355 |
rv = agnxtout(g, e); |
| 356 |
if (rv == null) { |
| 357 |
do { |
| 358 |
rv = N(rv) ? agfstin(g, n) : agnxtin(g,rv); |
| 359 |
} while (rv!=null && EQ(rv.node, n)); |
| 360 |
} |
| 361 |
} else { |
| 362 |
do { |
| 363 |
rv = agnxtin(g, e); |
| 364 |
e = rv; |
| 365 |
} while (rv!=null && EQ(rv.node, n)); |
| 366 |
} |
| 367 |
return rv; |
| 368 |
} finally { |
| 369 |
LEAVING("8zy2u6gsi2xzv2ffv8o4v4uvf","agnxtedge"); |
| 370 |
} |
| 371 |
} |
| 372 |
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
public static ST_Agedge_s agfindedge_by_key(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, final ST_Agtag_s key) { |
| 379 |
|
| 380 |
return agfindedge_by_key_w_(g, t, h, (ST_Agtag_s) key.copy()); |
| 381 |
} |
| 382 |
private static ST_Agedge_s agfindedge_by_key_w_(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, final ST_Agtag_s key) { |
| 383 |
ENTERING("c175o6j61jqmfnl4o1g1h1mie","agfindedge_by_key"); |
| 384 |
try { |
| 385 |
ST_Agedge_s e; |
| 386 |
final ST_Agedge_s template = new ST_Agedge_s(); |
| 387 |
ST_Agsubnode_s sn; |
| 388 |
if ((t == null) || (h == null)) |
| 389 |
return null; |
| 390 |
template.base.setStruct("tag", key); |
| 391 |
template.setPtr("node", t); |
| 392 |
sn = agsubrep(g, h); |
| 393 |
if (N(sn)) e = null; |
| 394 |
else { |
| 395 |
dtrestore((ST_dt_s)g.e_id, (ST_dtlink_s)sn.in_id); |
| 396 |
e = ((ST_Agedge_s)g.e_id.searchf.exe(g.e_id,template,0000004)); |
| 397 |
sn.setPtr("in_id", dtextract((ST_dt_s)g.e_id)); |
| 398 |
} |
| 399 |
return e; |
| 400 |
} finally { |
| 401 |
LEAVING("c175o6j61jqmfnl4o1g1h1mie","agfindedge_by_key"); |
| 402 |
} |
| 403 |
} |
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
|
| 410 |
public static Object agfindedge_by_id(Object... arg) { |
| 411 |
UNSUPPORTED("ec9zslg8lac601i0b25y7zwto"); |
| 412 |
UNSUPPORTED("3aq1nzyk7buuizn5in1tizrxw"); |
| 413 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 414 |
UNSUPPORTED("e1mtghvcaueacf53mmdm4tfy0"); |
| 415 |
UNSUPPORTED("9sao87j2usq1a87o75iju8s5b"); |
| 416 |
UNSUPPORTED("8ftb0g8ykm4jkjpro0pcai75y"); |
| 417 |
UNSUPPORTED("4dwsgoqnwiy82putqjt97dagp"); |
| 418 |
UNSUPPORTED("57t26f9vd4vltjvoz5m7lo5lf"); |
| 419 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 420 |
|
| 421 |
throw new UnsupportedOperationException(); |
| 422 |
} |
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
public static ST_Agsubnode_s agsubrep(ST_Agraph_s g, ST_Agnode_s n) { |
| 430 |
ENTERING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep"); |
| 431 |
try { |
| 432 |
ST_Agsubnode_s sn; |
| 433 |
final ST_Agsubnode_s template = new ST_Agsubnode_s(); |
| 434 |
if (EQ(g, n.root)) sn = (ST_Agsubnode_s) n.mainsub; |
| 435 |
else { |
| 436 |
template.setPtr("node", n); |
| 437 |
sn = (ST_Agsubnode_s) g.n_id.searchf.exe(g.n_id, template, 0000004); |
| 438 |
} |
| 439 |
return sn; |
| 440 |
} finally { |
| 441 |
LEAVING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep"); |
| 442 |
} |
| 443 |
} |
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
public static void ins(ST_dt_s d, STARSTAR<ST_dtlink_s> set, ST_Agedge_s e) { |
| 451 |
ENTERING("6u0niow33w9gva780waluva4n","ins"); |
| 452 |
try { |
| 453 |
dtrestore(d, set.getMe()); |
| 454 |
d.searchf.exe(d,e,0000001); |
| 455 |
set.setMe(dtextract(d)); |
| 456 |
} finally { |
| 457 |
LEAVING("6u0niow33w9gva780waluva4n","ins"); |
| 458 |
} |
| 459 |
} |
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
public static Object del(Object... arg) { |
| 467 |
UNSUPPORTED("5lvsvkq5t8c8pj03debt0mwal"); |
| 468 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 469 |
UNSUPPORTED("atawgqln44t2lhf2j4q1dsw80"); |
| 470 |
UNSUPPORTED("c1wraxzkcgmquqsiuypvr56tj"); |
| 471 |
UNSUPPORTED("9e6qtst4eze5ps8ukq79d6zf8"); |
| 472 |
UNSUPPORTED("5i0sddp616zsw63jk38od62l4"); |
| 473 |
UNSUPPORTED("dgfo5c0o8ftxxwmcq8kxe7ht8"); |
| 474 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 475 |
|
| 476 |
throw new UnsupportedOperationException(); |
| 477 |
} |
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
public static void installedge(ST_Agraph_s g, ST_Agedge_s e) { |
| 485 |
ENTERING("8kizmg7gziussfgx8zs3qvkfw","installedge"); |
| 486 |
try { |
| 487 |
ST_Agnode_s t, h; |
| 488 |
ST_Agedge_s out, in; |
| 489 |
ST_Agsubnode_s sn; |
| 490 |
out = AGMKOUT(e); |
| 491 |
in = AGMKIN(e); |
| 492 |
t = agtail(e); |
| 493 |
h = aghead(e); |
| 494 |
while (g!=null) { |
| 495 |
if (agfindedge_by_key(g, t, h, AGTAG(e))!=null) break; |
| 496 |
sn = agsubrep(g, t); final ST_Agsubnode_s sn1 = sn; |
| 497 |
ins((ST_dt_s)g.e_seq, |
| 498 |
STARSTAR.amp(new ACCESS<ST_dtlink_s>() { |
| 499 |
public ST_dtlink_s get() { |
| 500 |
return (ST_dtlink_s) sn1.out_seq; |
| 501 |
} |
| 502 |
public void set(ST_dtlink_s obj) { |
| 503 |
sn1.setPtr("out_seq", obj); |
| 504 |
}}) |
| 505 |
, (ST_Agedge_s)out); |
| 506 |
ins((ST_dt_s)g.e_id, |
| 507 |
STARSTAR.amp(new ACCESS<ST_dtlink_s>() { |
| 508 |
public ST_dtlink_s get() { |
| 509 |
return (ST_dtlink_s) sn1.out_id; |
| 510 |
} |
| 511 |
public void set(ST_dtlink_s obj) { |
| 512 |
sn1.setPtr("out_id", obj); |
| 513 |
}}) |
| 514 |
, (ST_Agedge_s)out); |
| 515 |
sn = agsubrep(g, h); final ST_Agsubnode_s sn2 = sn; |
| 516 |
ins((ST_dt_s)g.e_seq, |
| 517 |
STARSTAR.amp(new ACCESS<ST_dtlink_s>() { |
| 518 |
public ST_dtlink_s get() { |
| 519 |
return (ST_dtlink_s) sn2.in_seq; |
| 520 |
} |
| 521 |
public void set(ST_dtlink_s obj) { |
| 522 |
sn2.setPtr("in_seq", obj); |
| 523 |
}}) |
| 524 |
, (ST_Agedge_s)in); |
| 525 |
ins((ST_dt_s)g.e_id, |
| 526 |
STARSTAR.amp(new ACCESS<ST_dtlink_s>() { |
| 527 |
public ST_dtlink_s get() { |
| 528 |
return (ST_dtlink_s) sn2.in_id; |
| 529 |
} |
| 530 |
public void set(ST_dtlink_s obj) { |
| 531 |
sn2.setPtr("in_id", obj); |
| 532 |
}}) |
| 533 |
, (ST_Agedge_s)in); |
| 534 |
g = agparent(g); |
| 535 |
} |
| 536 |
} finally { |
| 537 |
LEAVING("8kizmg7gziussfgx8zs3qvkfw","installedge"); |
| 538 |
} |
| 539 |
} |
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
|
| 546 |
public static Object subedge(Object... arg) { |
| 547 |
UNSUPPORTED("1qslen16fp6w3yse2y311vtsf"); |
| 548 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 549 |
UNSUPPORTED("3rvuc9rdxdwmvq3dtwv2hqwjo"); |
| 550 |
UNSUPPORTED("4d70e4y79ekvafnx88hgwdrna"); |
| 551 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 552 |
|
| 553 |
throw new UnsupportedOperationException(); |
| 554 |
} |
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
|
| 561 |
public static ST_Agedge_s newedge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, int id) { |
| 562 |
ENTERING("4rzjui6oo0k009o64bxwgjmvq","newedge"); |
| 563 |
try { |
| 564 |
ST_Agedgepair_s e2; |
| 565 |
ST_Agedge_s in, out; |
| 566 |
int seq; |
| 567 |
agsubnode(g,t,(N(0))); |
| 568 |
agsubnode(g,h,(N(0))); |
| 569 |
e2 = (ST_Agedgepair_s) agalloc(g, sizeof(ST_Agedgepair_s.class)); |
| 570 |
in = (ST_Agedge_s) e2.in; |
| 571 |
out = (ST_Agedge_s) e2.out; |
| 572 |
seq = agnextseq(g, AGEDGE); |
| 573 |
AGTYPE(in, AGINEDGE); |
| 574 |
AGTYPE(out, AGOUTEDGE); |
| 575 |
AGID(out, id); |
| 576 |
AGID(in, id); |
| 577 |
AGSEQ(in, seq); |
| 578 |
AGSEQ(out, seq); |
| 579 |
in.setPtr("node", t); |
| 580 |
out.setPtr("node", h); |
| 581 |
installedge(g, out); |
| 582 |
if (((ST_Agdesc_s)g.desc).has_attrs!=0) { |
| 583 |
agbindrec(out, AgDataRecName, sizeof(ST_Agattr_s.class), false); |
| 584 |
agedgeattr_init(g, out); |
| 585 |
} |
| 586 |
agmethod_init(g, out); |
| 587 |
return out; |
| 588 |
} finally { |
| 589 |
LEAVING("4rzjui6oo0k009o64bxwgjmvq","newedge"); |
| 590 |
} |
| 591 |
} |
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
public static boolean ok_to_make_edge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h) { |
| 599 |
ENTERING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge"); |
| 600 |
try { |
| 601 |
final ST_Agtag_s key = new ST_Agtag_s(); |
| 602 |
|
| 603 |
if (agisstrict(g)) { |
| 604 |
if (g.desc.no_loop!=0 && (EQ(t, h))) |
| 605 |
return false; |
| 606 |
key.___(Z.z().Tag); |
| 607 |
key.setInt("objtype", 0); |
| 608 |
if (agfindedge_by_key(g, t, h, key)!=null) |
| 609 |
return false; |
| 610 |
} |
| 611 |
return (N(0)); |
| 612 |
} finally { |
| 613 |
LEAVING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge"); |
| 614 |
} |
| 615 |
} |
| 616 |
|
| 617 |
|
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
public static Object agidedge(Object... arg) { |
| 623 |
UNSUPPORTED("5pslnv27wv1h507npa2zxh90y"); |
| 624 |
UNSUPPORTED("e28xnrj58aci1fn3kunzmqxbv"); |
| 625 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 626 |
UNSUPPORTED("2hs0004nnparj6tt7elslt4zj"); |
| 627 |
UNSUPPORTED("36vshotvjkc5iodgg7nq6qa2r"); |
| 628 |
UNSUPPORTED("1v1wyp9m83obk7jvlhzzmbwqb"); |
| 629 |
UNSUPPORTED("1gxwr1hr3zd8rrmnl1zq34xju"); |
| 630 |
UNSUPPORTED("7jnnbxt6l29uby71ap2ioa94q"); |
| 631 |
UNSUPPORTED("2m5yl6487z3nh60gz8x9otg16"); |
| 632 |
UNSUPPORTED("7zol2448bccu90sqoxkvnbuif"); |
| 633 |
UNSUPPORTED("e9viv3tnfxask57of0bhahbev"); |
| 634 |
UNSUPPORTED("7u9o1s6uopqwva82fgnfbgr03"); |
| 635 |
UNSUPPORTED("7yhr8hn3r6wohafwxrt85b2j2"); |
| 636 |
UNSUPPORTED("3nwzv8q6jwjadczk10hhrt14f"); |
| 637 |
UNSUPPORTED("2zklsds1y3vegvq9xgmx9ayyn"); |
| 638 |
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); |
| 639 |
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); |
| 640 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 641 |
UNSUPPORTED("2bswif6w6ot01ynlvkimntfly"); |
| 642 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 643 |
|
| 644 |
throw new UnsupportedOperationException(); |
| 645 |
} |
| 646 |
|
| 647 |
|
| 648 |
|
| 649 |
|
| 650 |
|
| 651 |
|
| 652 |
public static ST_Agedge_s agedge(ST_Agraph_s g, ST_Agnode_s t, ST_Agnode_s h, CString name, boolean cflag) { |
| 653 |
ENTERING("4361pvzr3ozft2ov0fgx6t8bo","agedge"); |
| 654 |
try { |
| 655 |
ST_Agedge_s e; |
| 656 |
int id[] = new int[1]; |
| 657 |
int have_id; |
| 658 |
have_id = agmapnametoid(g, AGEDGE, name, id, false); |
| 659 |
if (have_id!=0 || ((name == null) && ((NOT(cflag)) || agisstrict(g)))) { |
| 660 |
|
| 661 |
final ST_Agtag_s key = new ST_Agtag_s(); |
| 662 |
key.___(Z.z().Tag); |
| 663 |
if (have_id!=0) { |
| 664 |
key.id = id[0]; |
| 665 |
key.objtype = AGEDGE; |
| 666 |
} else { |
| 667 |
key.id = 0; |
| 668 |
key.objtype = 0; |
| 669 |
} |
| 670 |
|
| 671 |
e = agfindedge_by_key(g, t, h, key); |
| 672 |
if ((e == null && agisundirected(g))) |
| 673 |
e = agfindedge_by_key(g, h, t, key); |
| 674 |
if (e!=null) |
| 675 |
return e; |
| 676 |
if (cflag) { |
| 677 |
e = agfindedge_by_key(agroot(g), t, h, key); |
| 678 |
if ((e == null) && agisundirected(g)) |
| 679 |
e = agfindedge_by_key(agroot(g), h, t, key); |
| 680 |
if (e!=null) { |
| 681 |
subedge(g,e); |
| 682 |
return e; |
| 683 |
} |
| 684 |
} |
| 685 |
} |
| 686 |
if (cflag && ok_to_make_edge(g, t, h) |
| 687 |
&& (agmapnametoid(g, AGEDGE, name, id, (N(0))))!=0) { |
| 688 |
e = newedge(g, t, h, id[0]); |
| 689 |
agregister(g, AGEDGE, e); |
| 690 |
} |
| 691 |
else |
| 692 |
e = null; |
| 693 |
return e; |
| 694 |
} finally { |
| 695 |
LEAVING("4361pvzr3ozft2ov0fgx6t8bo","agedge"); |
| 696 |
} |
| 697 |
} |
| 698 |
|
| 699 |
|
| 700 |
|
| 701 |
|
| 702 |
|
| 703 |
|
| 704 |
public static Object agdeledgeimage(Object... arg) { |
| 705 |
UNSUPPORTED("7gzvhvwj0z152fzg3h94s4wa3"); |
| 706 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 707 |
UNSUPPORTED("50fokbemxzgivcd3b6k3miqqn"); |
| 708 |
UNSUPPORTED("4ybt6tm56tubmbuve8lp6rxhh"); |
| 709 |
UNSUPPORTED("2llbfi4jrmre7cyhu90pgcm72"); |
| 710 |
UNSUPPORTED("4pgl4pn1cad2whf242bntmjre"); |
| 711 |
UNSUPPORTED("65tqa3if9hwq2yshaaiw31i7p"); |
| 712 |
UNSUPPORTED("7awcpvsw7kw84dndmnqoe7jml"); |
| 713 |
UNSUPPORTED("d4vc8t57wygctu4vl9tau8a6a"); |
| 714 |
UNSUPPORTED("c07up7zvrnu2vhzy6d7zcu94g"); |
| 715 |
UNSUPPORTED("54k8hnomk4mrwatjixro9a1yr"); |
| 716 |
UNSUPPORTED("7qnm0e5czl4a8gcj7f5vo98h"); |
| 717 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 718 |
UNSUPPORTED("uc5fexr8h438pt7usvlh0ul3"); |
| 719 |
UNSUPPORTED("9a1uo5zmwfnuphv9st2w2b7hh"); |
| 720 |
UNSUPPORTED("dpshsqc8cs6ucoq4t0hnuxws6"); |
| 721 |
UNSUPPORTED("a1kpx292l61dmu7eqdcm7fd51"); |
| 722 |
UNSUPPORTED("3xx2m5a0qzz8zcz61qn8mw44q"); |
| 723 |
UNSUPPORTED("e1vy7p3xj8dfi23jli55il082"); |
| 724 |
UNSUPPORTED("dtt5k4axitnc0rvaop78flltt"); |
| 725 |
UNSUPPORTED("3w1dtrerdp5ojxgix55ysgcd3"); |
| 726 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 727 |
|
| 728 |
throw new UnsupportedOperationException(); |
| 729 |
} |
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
|
| 734 |
|
| 735 |
|
| 736 |
public static Object agdeledge(Object... arg) { |
| 737 |
UNSUPPORTED("a87xum130tyatez3ic2nbxnna"); |
| 738 |
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); |
| 739 |
UNSUPPORTED("9tj8yk1m099w6420vq9obwqv6"); |
| 740 |
UNSUPPORTED("58hfnwh2g7pubdk6wexuvksuo"); |
| 741 |
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); |
| 742 |
UNSUPPORTED("ackx3cor82a94trjk4owh3083"); |
| 743 |
UNSUPPORTED("5247bml3o0pwzg9fc9q1xhhnc"); |
| 744 |
UNSUPPORTED("4lf7sorcdbqef4eadxah45x08"); |
| 745 |
UNSUPPORTED("dpp3uqwrwe9geok1zmxonosd3"); |
| 746 |
UNSUPPORTED("6kvbonl2aylsja52uh6deu14c"); |
| 747 |
UNSUPPORTED("dnmywe26u2d1rmgozlfonjw94"); |
| 748 |
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); |
| 749 |
UNSUPPORTED("6ox33bv05arfuz70cp795jqlg"); |
| 750 |
UNSUPPORTED("6tlwlx478gb1clm2fykihi2zk"); |
| 751 |
UNSUPPORTED("ebin71xd0muor7ysk74hizhw3"); |
| 752 |
UNSUPPORTED("c9ckhc8veujmwcw0ar3u3zld4"); |
| 753 |
UNSUPPORTED("2lkbqgh2h6urnppaik3zo7ywi"); |
| 754 |
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); |
| 755 |
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); |
| 756 |
|
| 757 |
throw new UnsupportedOperationException(); |
| 758 |
} |
| 759 |
|
| 760 |
|
| 761 |
|
| 762 |
|
| 763 |
|
| 764 |
|
| 765 |
public static ST_Agedge_s agsubedge(ST_Agraph_s g, ST_Agedge_s e, boolean cflag) { |
| 766 |
ENTERING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge"); |
| 767 |
try { |
| 768 |
ST_Agnode_s t, h; |
| 769 |
ST_Agedge_s rv; |
| 770 |
rv = null; |
| 771 |
t = agsubnode(g, AGTAIL(e), cflag); |
| 772 |
h = agsubnode(g, AGHEAD(e), cflag); |
| 773 |
if (t!=null && h!=null) { |
| 774 |
rv = agfindedge_by_key(g, t, h, AGTAG(e)); |
| 775 |
if (cflag && (rv == null)) { |
| 776 |
installedge(g, e); |
| 777 |
rv = e; |
| 778 |
} |
| 779 |
if (rv!=null && (AGTYPE(rv) != AGTYPE(e))) |
| 780 |
rv = AGOPP(rv); |
| 781 |
} |
| 782 |
return rv; |
| 783 |
} finally { |
| 784 |
LEAVING("30v8z3tlda81fbqbkzx6m9fkn","agsubedge"); |
| 785 |
} |
| 786 |
} |
| 787 |
|
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
public static int agedgeidcmpf(ST_dt_s d, ST_Agedge_s arg_e0, ST_Agedge_s arg_e1, ST_dtdisc_s disc) { |
| 794 |
ENTERING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf"); |
| 795 |
try { |
| 796 |
int v; |
| 797 |
ST_Agedge_s e0, e1; |
| 798 |
e0 = (ST_Agedge_s) arg_e0; |
| 799 |
e1 = (ST_Agedge_s) arg_e1; |
| 800 |
v = AGID(e0.node) - AGID(e1.node); |
| 801 |
if (v == 0) { |
| 802 |
if ((AGTYPE(e0) == 0) || (AGTYPE(e1) == 0)) |
| 803 |
v = 0; |
| 804 |
else |
| 805 |
v = AGID(e0) - AGID(e1); |
| 806 |
} |
| 807 |
return ((v==0)?0:(v<0?-1:1)); |
| 808 |
} finally { |
| 809 |
LEAVING("avk47eh26r45qk2dtoipwiqvz","agedgeidcmpf"); |
| 810 |
} |
| 811 |
} |
| 812 |
|
| 813 |
|
| 814 |
|
| 815 |
|
| 816 |
|
| 817 |
|
| 818 |
public static int agedgeseqcmpf(ST_dt_s d, ST_Agedge_s arg_e0, ST_Agedge_s arg_e1, ST_dtdisc_s disc) { |
| 819 |
ENTERING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf"); |
| 820 |
try { |
| 821 |
int v; |
| 822 |
ST_Agedge_s e0, e1; |
| 823 |
e0 = (ST_Agedge_s) arg_e0; |
| 824 |
e1 = (ST_Agedge_s) arg_e1; |
| 825 |
if (NEQ(e0.node, e1.node)) v = AGSEQ(e0.node) - AGSEQ(e1.node); |
| 826 |
else v = (AGSEQ(e0) - AGSEQ(e1)); |
| 827 |
return ((v==0)?0:(v<0?-1:1)); |
| 828 |
} finally { |
| 829 |
LEAVING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf"); |
| 830 |
} |
| 831 |
} |
| 832 |
|
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
|
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
|
| 845 |
|
| 846 |
|
| 847 |
|
| 848 |
|
| 849 |
|
| 850 |
|
| 851 |
|
| 852 |
|
| 853 |
|
| 854 |
|
| 855 |
|
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
|
| 861 |
|
| 862 |
|
| 863 |
|
| 864 |
|
| 865 |
|
| 866 |
|
| 867 |
|
| 868 |
|
| 869 |
|
| 870 |
|
| 871 |
|
| 872 |
|
| 873 |
|
| 874 |
|
| 875 |
|
| 876 |
|
| 877 |
|
| 878 |
|
| 879 |
|
| 880 |
|
| 881 |
|
| 882 |
|
| 883 |
|
| 884 |
|
| 885 |
|
| 886 |
|
| 887 |
|
| 888 |
|
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
|
| 893 |
|
| 894 |
|
| 895 |
|
| 896 |
|
| 897 |
|
| 898 |
|
| 899 |
public static ST_Agnode_s agtail(ST_Agedge_s e) { |
| 900 |
ENTERING("ceexs6t1q4jxwz6h0g8fszxp4","agtail"); |
| 901 |
try { |
| 902 |
return AGTAIL(e); |
| 903 |
} finally { |
| 904 |
LEAVING("ceexs6t1q4jxwz6h0g8fszxp4","agtail"); |
| 905 |
} |
| 906 |
} |
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
|
| 911 |
|
| 912 |
|
| 913 |
public static ST_Agnode_s aghead(__ptr__ e) { |
| 914 |
ENTERING("3tj9gj3dvrpox6grrdd3rftd8","aghead"); |
| 915 |
try { |
| 916 |
return AGHEAD((ST_Agedge_s) e); |
| 917 |
} finally { |
| 918 |
LEAVING("3tj9gj3dvrpox6grrdd3rftd8","aghead"); |
| 919 |
} |
| 920 |
} |
| 921 |
|
| 922 |
|
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
public static ST_Agedge_s agopp(__ptr__ e) { |
| 928 |
ENTERING("15e6s5bh5hey2u79yoebir59w","agopp"); |
| 929 |
try { |
| 930 |
return AGOPP((ST_Agedge_s) e); |
| 931 |
} finally { |
| 932 |
LEAVING("15e6s5bh5hey2u79yoebir59w","agopp"); |
| 933 |
} |
| 934 |
} |
| 935 |
|
| 936 |
|
| 937 |
} |