mirror of
https://github.com/octoleo/plantuml.git
synced 2025-02-08 15:08:27 +00:00
version 1.2017.15
This commit is contained in:
parent
f9bf7c08e5
commit
1a5ca5cf48
@ -60,6 +60,7 @@ import h._dthold_s;
|
||||
import h._dtlink_s;
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -144,7 +145,7 @@ try {
|
||||
_dtlink_s root, t;
|
||||
int cmp, lk, sz, ky;
|
||||
_dtlink_s l, r, me=null;
|
||||
final __struct__<_dtlink_s> link = __struct__.from(_dtlink_s.class);
|
||||
final __struct__<_dtlink_s> link = JUtils.from(_dtlink_s.class);
|
||||
Object o, k, key = null;
|
||||
int n, minp; //, turn[(sizeof(size_t)*8 - 2)];
|
||||
Dtcompar_f cmpf;
|
||||
@ -556,7 +557,7 @@ LEAVING("abqfzg1d1vkzk51225tcdlik5","dttree");
|
||||
|
||||
//1 5kf1n1yhdy9ojgc0mc3pyowaz
|
||||
// Dtmethod_t _Dttree =
|
||||
/*public static final __struct__<_dtmethod_s> _Dttree = __struct__.from(_dtmethod_s.class);
|
||||
/*public static final __struct__<_dtmethod_s> _Dttree = JUtils.from(_dtmethod_s.class);
|
||||
static {
|
||||
_Dttree.setPtr("searchf", function(dttree__c.class, "dttree"));
|
||||
_Dttree.setInt("type", 0000004);
|
||||
|
@ -83,6 +83,8 @@ import h.Agobj_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agrec_s;
|
||||
import h.Agsym_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h.ST_Agtag_s;
|
||||
import h._dt_s;
|
||||
import h._dtdisc_s;
|
||||
import smetana.core.CString;
|
||||
@ -225,7 +227,7 @@ public class attr__c {
|
||||
|
||||
//1 cwbgwzo8cprw4eobs3iji59dp
|
||||
// Dtdisc_t AgDataDictDisc =
|
||||
/*static public final __struct__<_dtdisc_s> AgDataDictDisc = __struct__.from(_dtdisc_s.class);
|
||||
/*static public final __struct__<_dtdisc_s> AgDataDictDisc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
AgDataDictDisc.setInt("key", OFFSET.create(Agsym_s.class, "name").toInt());
|
||||
AgDataDictDisc.setInt("size", -1);
|
||||
@ -241,7 +243,7 @@ static {
|
||||
public final static CString DataDictName = new CString("_AG_datadict");
|
||||
//1 1qn6s7dwoq08ugdjnmsvdgj6u
|
||||
// static Agdesc_t ProtoDesc =
|
||||
/*static final public __struct__<Agdesc_s> ProtoDesc = __struct__.from(Agdesc_s.class);
|
||||
/*static final public __struct__<Agdesc_s> ProtoDesc = JUtils.from(Agdesc_s.class);
|
||||
static {
|
||||
ProtoDesc.setInt("directed", 1);
|
||||
ProtoDesc.setInt("strict", 0);
|
||||
@ -720,7 +722,7 @@ try {
|
||||
/* Agdatadict_t *dd; */
|
||||
/* Agrec_t *attr; */
|
||||
Agraph_s context;
|
||||
g.getStruct("desc").setInt("has_attrs", 1);
|
||||
((ST_Agdesc_s)g.getStruct("desc")).has_attrs = 1;
|
||||
/* dd = */ agmakedatadict(g);
|
||||
if (N(context = agparent(g)))
|
||||
context = g;
|
||||
@ -909,7 +911,7 @@ try {
|
||||
|
||||
agstrfree(g, data.getArrayOfCString("str").plus(sym.getInt("id")).getCString());
|
||||
data.getArrayOfCString("str").plus(sym.getInt("id")).setCString(agstrdup(g, value));
|
||||
if (hdr.getStruct("tag").getInt("objtype") == AGRAPH) {
|
||||
if (((ST_Agtag_s)hdr.getStruct("tag")).objtype == AGRAPH) {
|
||||
/* also update dict default */
|
||||
_dt_s dict;
|
||||
dict = (_dt_s) agdatadict(g, false).getPtr("dict.g");
|
||||
|
@ -86,11 +86,14 @@ import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agsubnode_s;
|
||||
import h.Agtag_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h.ST_Agtag_s;
|
||||
import h._dt_s;
|
||||
import h._dtdisc_s;
|
||||
import h._dtlink_s;
|
||||
import smetana.core.ACCESS;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.STARSTAR;
|
||||
import smetana.core.Z;
|
||||
@ -232,7 +235,7 @@ public class edge__c {
|
||||
|
||||
//1 cee3kc2m61ml4f8le5ueoyrjb
|
||||
// static Agtag_t Tag
|
||||
//private final static __struct__<Agtag_s> Tag = __struct__.from(Agtag_s.class);
|
||||
//private final static __struct__<Agtag_s> Tag = JUtils.from(Agtag_s.class);
|
||||
|
||||
|
||||
|
||||
@ -431,7 +434,7 @@ public static Agsubnode_s agsubrep(Agraph_s g, Agnode_s n) {
|
||||
ENTERING("b32ssm6ex1pdz1b3nt4fwlhul","agsubrep");
|
||||
try {
|
||||
Agsubnode_s sn;
|
||||
final __struct__<Agsubnode_s> template = __struct__.from(Agsubnode_s.class);
|
||||
final __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
|
||||
if (EQ(g, n.getPtr("root"))) sn = (Agsubnode_s) n.getStruct("mainsub").amp();
|
||||
else {
|
||||
template.setPtr("node", n);
|
||||
@ -580,7 +583,7 @@ try {
|
||||
in.setPtr("node", t);
|
||||
out.setPtr("node", h);
|
||||
installedge(g, out);
|
||||
if (g.getStruct("desc").getBoolean("has_attrs")) {
|
||||
if (((ST_Agdesc_s)g.getStruct("desc")).has_attrs!=0) {
|
||||
agbindrec(out, AgDataRecName, sizeof(Agattr_s.class), false);
|
||||
agedgeattr_init(g, out);
|
||||
}
|
||||
@ -599,12 +602,12 @@ LEAVING("4rzjui6oo0k009o64bxwgjmvq","newedge");
|
||||
public static boolean ok_to_make_edge(Agraph_s g, Agnode_s t, Agnode_s h) {
|
||||
ENTERING("1ufxhg5xnmll1pe5339477823","ok_to_make_edge");
|
||||
try {
|
||||
final __struct__<Agtag_s> key = __struct__.from(Agtag_s.class);
|
||||
final __struct__<Agtag_s> key = JUtils.from(Agtag_s.class);
|
||||
/* protect against self, multi-edges in strict graphs */
|
||||
if (agisstrict(g)) {
|
||||
if (g.getPtr("desc").getBoolean("no_loop") && (EQ(t, h))) /* simple graphs */
|
||||
return false;
|
||||
key.____(Z.z().Tag);
|
||||
key.___(Z.z().Tag);
|
||||
key.setInt("objtype", 0); /* wild card */
|
||||
if (agfindedge_by_key(g, t, h, key)!=null)
|
||||
return false;
|
||||
@ -659,14 +662,14 @@ try {
|
||||
have_id = agmapnametoid(g, AGEDGE, name, id, false);
|
||||
if (have_id!=0 || ((name == null) && ((NOT(cflag)) || agisstrict(g)))) {
|
||||
/* probe for pre-existing edge */
|
||||
final __struct__<Agtag_s> key = __struct__.from(Agtag_s.class);
|
||||
key.____(Z.z().Tag);
|
||||
final ST_Agtag_s key = new ST_Agtag_s();
|
||||
key.___(Z.z().Tag);
|
||||
if (have_id!=0) {
|
||||
key.setInt("id", id[0]);
|
||||
key.setInt("objtype", AGEDGE);
|
||||
key.id = id[0];
|
||||
key.objtype = AGEDGE;
|
||||
} else {
|
||||
key.setInt("id", 0);
|
||||
key.setInt("objtype", 0);
|
||||
key.id = 0;
|
||||
key.objtype = 0;
|
||||
}
|
||||
/* might already exist locally */
|
||||
e = agfindedge_by_key(g, t, h, key);
|
||||
@ -834,7 +837,7 @@ LEAVING("b6jhzc16xvrknu4e7jp6zx0ue","agedgeseqcmpf");
|
||||
|
||||
//1 d058zqckpiqls71p4vkuxe87o
|
||||
// Dtdisc_t Ag_mainedge_seq_disc =
|
||||
/*static final public __struct__<_dtdisc_s> Ag_mainedge_seq_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*static final public __struct__<_dtdisc_s> Ag_mainedge_seq_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_mainedge_seq_disc.setInt("key", 0);
|
||||
Ag_mainedge_seq_disc.setInt("size", 0);
|
||||
@ -849,7 +852,7 @@ static {
|
||||
|
||||
//1 7n5e8w5zjp9b4oeecyvyl96il
|
||||
// Dtdisc_t Ag_subedge_seq_disc =
|
||||
/*static public final __struct__<_dtdisc_s> Ag_subedge_seq_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*static public final __struct__<_dtdisc_s> Ag_subedge_seq_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_subedge_seq_disc.setInt("key", 0);
|
||||
Ag_subedge_seq_disc.setInt("size", 0);
|
||||
@ -865,7 +868,7 @@ static {
|
||||
|
||||
//1 7grv8f2wvpg0db2pn1g7r5abv
|
||||
// Dtdisc_t Ag_mainedge_id_disc =
|
||||
/*static final public __struct__<_dtdisc_s> Ag_mainedge_id_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*static final public __struct__<_dtdisc_s> Ag_mainedge_id_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_mainedge_id_disc.setInt("key", 0);
|
||||
Ag_mainedge_id_disc.setInt("size", 0);
|
||||
@ -880,7 +883,7 @@ static {
|
||||
|
||||
//1 9u0ic8u2hrwlmlqalv37s053f
|
||||
// Dtdisc_t Ag_subedge_id_disc =
|
||||
/*static public final __struct__<_dtdisc_s> Ag_subedge_id_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*static public final __struct__<_dtdisc_s> Ag_subedge_id_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_subedge_id_disc.setInt("key", 0);
|
||||
Ag_subedge_id_disc.setInt("size", 0);
|
||||
|
@ -76,6 +76,7 @@ import h.Agmemdisc_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agsubnode_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h._dt_s;
|
||||
import h._dtdisc_s;
|
||||
import h._dtlink_s;
|
||||
@ -268,7 +269,7 @@ try {
|
||||
AGTYPE(g, AGRAPH);
|
||||
g.setPtr("clos", clos);
|
||||
g.setStruct("desc", desc);
|
||||
g.getStruct("desc").setInt("maingraph", ASINT((N(0))));
|
||||
((ST_Agdesc_s)g.getStruct("desc")).maingraph = ASINT((N(0)));
|
||||
g.setPtr("root", g);
|
||||
g.getPtr("clos").getStruct("state").setPtr("id", (__ptr__) g.getPtr("clos").getStruct("disc").getPtr("id").call("open", g, arg_disc));
|
||||
if (agmapnametoid(g, AGRAPH, name, gid, (N(0)))!=0)
|
||||
@ -301,7 +302,7 @@ try {
|
||||
AGSEQ(g, agnextseq(par, AGRAPH));
|
||||
par.getPtr("g_dict").call("searchf", par.getPtr("g_dict"),g,0000001);
|
||||
} /* else AGSEQ=0 */
|
||||
if (N(par) || par.getStruct("desc").getBoolean("has_attrs"))
|
||||
if (N(par) || ((ST_Agdesc_s)par.getStruct("desc")).has_attrs!=0)
|
||||
agraphattr_init(g);
|
||||
agmethod_init(g, g);
|
||||
return g;
|
||||
@ -445,7 +446,7 @@ throw new UnsupportedOperationException();
|
||||
public static boolean agisdirected(Agraph_s g) {
|
||||
ENTERING("blvn1w3v0icnucu5m5xvbrba1","agisdirected");
|
||||
try {
|
||||
return g.getStruct("desc").getBoolean("directed");
|
||||
return ((ST_Agdesc_s)g.getStruct("desc")).directed!=0;
|
||||
} finally {
|
||||
LEAVING("blvn1w3v0icnucu5m5xvbrba1","agisdirected");
|
||||
}
|
||||
@ -473,7 +474,7 @@ LEAVING("8thgds4eioot64flko26m8ns0","agisundirected");
|
||||
public static boolean agisstrict(Agraph_s g) {
|
||||
ENTERING("9qgdebmdfrcfjm394bg59a7y5","agisstrict");
|
||||
try {
|
||||
return g.getStruct("desc").getBoolean("strict");
|
||||
return ((ST_Agdesc_s)g.getStruct("desc")).strict!=0;
|
||||
} finally {
|
||||
LEAVING("9qgdebmdfrcfjm394bg59a7y5","agisstrict");
|
||||
}
|
||||
@ -616,7 +617,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//1 cqgilvgau98cgaulohsii8vx4
|
||||
// Dtdisc_t Ag_subgraph_id_disc =
|
||||
/*static final public __struct__<_dtdisc_s> Ag_subgraph_id_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*static final public __struct__<_dtdisc_s> Ag_subgraph_id_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_subgraph_id_disc.setInt("key", 0);
|
||||
Ag_subgraph_id_disc.setInt("size", 0);
|
||||
@ -631,7 +632,7 @@ static {
|
||||
|
||||
//1 98aldesvg4i0qxoidbuanebv7
|
||||
// Agdesc_t Agdirected =
|
||||
/*static final public __struct__<Agdesc_s> Agdirected = __struct__.from(Agdesc_s.class);
|
||||
/*static final public __struct__<Agdesc_s> Agdirected = JUtils.from(Agdesc_s.class);
|
||||
static {
|
||||
Agdirected.setInt("directed", 1);
|
||||
Agdirected.setInt("strict", 0);
|
||||
|
@ -321,7 +321,7 @@ LEAVING("5bjqo0ihl0x25vaspoiehmwzk","idregister");
|
||||
|
||||
//1 cxrk51474ugltvklkcvp3v2ly
|
||||
// Agiddisc_t AgIdDisc =
|
||||
/*public final static __struct__<Agiddisc_s> AgIdDisc = __struct__.from(Agiddisc_s.class);
|
||||
/*public final static __struct__<Agiddisc_s> AgIdDisc = JUtils.from(Agiddisc_s.class);
|
||||
static {
|
||||
AgIdDisc.setPtr("open", function(id__c.class, "idopen"));
|
||||
AgIdDisc.setPtr("map", function(id__c.class, "idmap"));
|
||||
|
@ -252,7 +252,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//1 1cni5q244gsprpvtjsq7gs17m
|
||||
// Agmemdisc_t AgMemDisc =
|
||||
/*public static final __struct__<Agmemdisc_s> AgMemDisc = __struct__.from(Agmemdisc_s.class);
|
||||
/*public static final __struct__<Agmemdisc_s> AgMemDisc = JUtils.from(Agmemdisc_s.class);
|
||||
static {
|
||||
AgMemDisc.setPtr("open", function(mem__c.class, "memopen"));
|
||||
AgMemDisc.setPtr("alloc", function(mem__c.class, "memalloc"));
|
||||
|
@ -72,6 +72,8 @@ import h.Agattr_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agsubnode_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h.ST_Agtag_s;
|
||||
import h._dt_s;
|
||||
import h._dtdisc_s;
|
||||
import smetana.core.CString;
|
||||
@ -215,13 +217,13 @@ public class node__c {
|
||||
|
||||
//3 4w89du6uel405pm3vxsr3ayxt
|
||||
// Agnode_t *agfindnode_by_id(Agraph_t * g, unsigned long id)
|
||||
//private static __struct__<Agsubnode_s> template = __struct__.from(Agsubnode_s.class);
|
||||
//private static __struct__<Agnode_s> dummy = __struct__.from(Agnode_s.class);
|
||||
//private static __struct__<Agsubnode_s> template = JUtils.from(Agsubnode_s.class);
|
||||
//private static __struct__<Agnode_s> dummy = JUtils.from(Agnode_s.class);
|
||||
public static Agnode_s agfindnode_by_id(Agraph_s g, int id) {
|
||||
ENTERING("4w89du6uel405pm3vxsr3ayxt","agfindnode_by_id");
|
||||
try {
|
||||
Agsubnode_s sn;
|
||||
Z.z().dummy.getStruct("base").getStruct("tag").setInt("id", id);
|
||||
((ST_Agtag_s)Z.z().dummy.getStruct("base").getStruct("tag")).id = id;
|
||||
Z.z().template.setPtr("node", Z.z().dummy.amp());
|
||||
sn = (Agsubnode_s) (g.getPtr("n_id").call("searchf", g.getPtr("n_id"), Z.z().template.amp(),0000004));
|
||||
return (Agnode_s) (sn!=null ? sn.getPtr("node") : null);
|
||||
@ -339,7 +341,7 @@ try {
|
||||
AGID(n, id);
|
||||
AGSEQ(n, seq);
|
||||
n.setPtr("root", agroot(g));
|
||||
if (agroot(g).getStruct("desc").getInt("has_attrs")!=0)
|
||||
if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0)
|
||||
agbindrec(n, AgDataRecName, sizeof(Agattr_s.class), false);
|
||||
/* nodeattr_init and method_init will be called later, from the
|
||||
* subgraph where the node was actually created, but first it has
|
||||
@ -396,7 +398,7 @@ LEAVING("3mfxjcaeepn8nitirs3yoqaed","installnodetoroot");
|
||||
public static void initnode(Agraph_s g, Agnode_s n) {
|
||||
ENTERING("85bb9mezhsgtzar3kqz95mq1","initnode");
|
||||
try {
|
||||
if (agroot(g).getStruct("desc").getInt("has_attrs")!=0)
|
||||
if (((ST_Agdesc_s)agroot(g).getStruct("desc")).has_attrs!=0)
|
||||
agnodeattr_init(g,n);
|
||||
agmethod_init(g, n);
|
||||
} finally {
|
||||
@ -666,7 +668,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//1 us7d1n3fefkf0qyr6thv1sai
|
||||
// Dtdisc_t Ag_subnode_id_disc =
|
||||
/*public static final __struct__<_dtdisc_s> Ag_subnode_id_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*public static final __struct__<_dtdisc_s> Ag_subnode_id_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_subnode_id_disc.setInt("key", 0);
|
||||
Ag_subnode_id_disc.setInt("size", 0);
|
||||
@ -681,7 +683,7 @@ static {
|
||||
|
||||
//1 3gqjvodjfsv6wz1tk75zy19p9
|
||||
// Dtdisc_t Ag_subnode_seq_disc =
|
||||
/*public static final __struct__<_dtdisc_s> Ag_subnode_seq_disc = __struct__.from(_dtdisc_s.class);
|
||||
/*public static final __struct__<_dtdisc_s> Ag_subnode_seq_disc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Ag_subnode_seq_disc.setInt("key", 0);
|
||||
Ag_subnode_seq_disc.setInt("size", 0);
|
||||
|
@ -67,6 +67,8 @@ import h.Agedge_s;
|
||||
import h.Agobj_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agrec_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h.ST_Agtag_s;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.size_t;
|
||||
@ -213,11 +215,11 @@ ENTERING("62z9z5vraa2as0c9t108j9xaf","set_data");
|
||||
try {
|
||||
Agedge_s e;
|
||||
obj.setPtr("data", data);
|
||||
obj.getStruct("tag").setInt("mtflock", mtflock);
|
||||
((ST_Agtag_s)obj.getStruct("tag")).mtflock = mtflock;
|
||||
if ((AGTYPE(obj) == AGINEDGE) || (AGTYPE(obj) == AGOUTEDGE)) {
|
||||
e = (Agedge_s) agopp(obj.castTo(Agedge_s.class));
|
||||
AGDATA(e, data);
|
||||
e.getStruct("base").getStruct("tag").setInt("mtflock", mtflock);
|
||||
((ST_Agtag_s)e.getStruct("base").getStruct("tag")).mtflock = mtflock;
|
||||
}
|
||||
} finally {
|
||||
LEAVING("62z9z5vraa2as0c9t108j9xaf","set_data");
|
||||
@ -246,11 +248,11 @@ try {
|
||||
}
|
||||
}
|
||||
if (d!=null) {
|
||||
if (hdr.getStruct("tag").getBoolean("mtflock")) {
|
||||
if (((ST_Agtag_s)hdr.getStruct("tag")).mtflock!=0) {
|
||||
if (mtf && NEQ(hdr.getPtr("data"), d))
|
||||
System.err.println("move to front lock inconsistency");
|
||||
} else {
|
||||
if (NEQ(d, first) || (mtf != hdr.getStruct("tag").getBoolean("mtflock")))
|
||||
if (NEQ(d, first) || (mtf != ((((ST_Agtag_s)hdr.getStruct("tag")).mtflock)!=0)))
|
||||
set_data(hdr, d, ASINT(mtf)); /* Always optimize */
|
||||
}
|
||||
}
|
||||
@ -282,7 +284,7 @@ try {
|
||||
firstrec.setPtr("next", newrec);
|
||||
}
|
||||
}
|
||||
if (NOT(obj.getStruct("tag").getInt("mtflock")))
|
||||
if (NOT(((ST_Agtag_s)obj.getStruct("tag")).mtflock))
|
||||
set_data(obj, newrec, (0));
|
||||
} finally {
|
||||
LEAVING("7sk4k5ipm2jnd244556g1kr6","objputrec");
|
||||
@ -307,7 +309,7 @@ try {
|
||||
rec = (Agrec_s) ((__ptr__)agalloc(g, recsize)).castTo(Agrec_s.class);
|
||||
// rec = (Agrec_s) Memory.malloc(Agrec_s.class);
|
||||
rec.setPtr("name", agstrdup(g, recname));
|
||||
switch (obj.getStruct("tag").getInt("objtype")) {
|
||||
switch (((ST_Agtag_s)obj.getStruct("tag")).objtype) {
|
||||
case AGRAPH:
|
||||
objputrec(g, obj, rec);
|
||||
break;
|
||||
|
@ -57,6 +57,7 @@ import h._dt_s;
|
||||
import h.refstr_t;
|
||||
import smetana.core.ACCESS;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.OFFSET;
|
||||
import smetana.core.STARSTAR;
|
||||
import smetana.core.Z;
|
||||
@ -206,7 +207,7 @@ public class refstr__c {
|
||||
|
||||
//1 boyxdmkhstn4i64pqf6sv1mi7
|
||||
// static Dtdisc_t Refstrdisc =
|
||||
/*static public final __struct__<_dtdisc_s> Refstrdisc = __struct__.from(_dtdisc_s.class);
|
||||
/*static public final __struct__<_dtdisc_s> Refstrdisc = JUtils.from(_dtdisc_s.class);
|
||||
static {
|
||||
Refstrdisc.setInt("key", OFFSET.create(refstr_t.class, "s").toInt()); // *s is the third field in refstr_t
|
||||
Refstrdisc.setInt("size", -1);
|
||||
@ -282,7 +283,7 @@ throw new UnsupportedOperationException();
|
||||
public static refstr_t refsymbind(_dt_s strdict, CString s) {
|
||||
ENTERING("9ts4wqhw2xafdv3tlcilneewq","refsymbind");
|
||||
try {
|
||||
final __struct__<refstr_t> key = __struct__.from(refstr_t.class);
|
||||
final __struct__<refstr_t> key = JUtils.from(refstr_t.class);
|
||||
refstr_t r;
|
||||
// key.setPtr("s", s.duplicate());
|
||||
key.setPtr("s", s);
|
||||
|
@ -57,8 +57,10 @@ import static smetana.core.Macro.AGRAPH;
|
||||
import static smetana.core.Macro.N;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.Agraph_s;
|
||||
import h.ST_Agdesc_s;
|
||||
import h._dt_s;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
@ -203,7 +205,7 @@ public class subg__c {
|
||||
public static Agraph_s agfindsubg_by_id(Agraph_s g, int id) {
|
||||
ENTERING("11ezyrsjsotjz9b3cyvb4ie8p","agfindsubg_by_id");
|
||||
try {
|
||||
final __struct__<Agraph_s> template = __struct__.from(Agraph_s.class);
|
||||
final __struct__<Agraph_s> template = JUtils.from(Agraph_s.class);
|
||||
agdtdisc(g, (_dt_s) g.getPtr("g_dict"), Z.z().Ag_subgraph_id_disc.amp());
|
||||
AGID(template.amp(), id);
|
||||
return (Agraph_s) g.getPtr("g_dict").castTo(_dt_s.class).call("searchf", g.getPtr("g_dict"), template.amp(), 0000004);
|
||||
@ -227,7 +229,7 @@ try {
|
||||
subg = (Agraph_s) agalloc(g, sizeof(Agraph_s.class));
|
||||
subg.setPtr("clos", g.getPtr("clos"));
|
||||
subg.setStruct("desc", g.getStruct("desc"));
|
||||
subg.getStruct("desc").setBoolean("maingraph", false);
|
||||
((ST_Agdesc_s)subg.getStruct("desc")).maingraph = 0;
|
||||
subg.setPtr("parent", g);
|
||||
subg.setPtr("root", g.getPtr("root"));
|
||||
AGID(subg, id);
|
||||
|
@ -61,6 +61,7 @@ import h._dtmethod_s;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.size_t;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class utils__c {
|
||||
//1 9k44uhd5foylaeoekf3llonjq
|
||||
@ -251,7 +252,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//3 48ox0bg1qmasrer8np51uwsyk
|
||||
// Dict_t *agdtopen(Agraph_t * g, Dtdisc_t * disc, Dtmethod_t * method)
|
||||
public static _dt_s agdtopen(Agraph_s g, _dtdisc_s disc, _dtmethod_s method) {
|
||||
public static _dt_s agdtopen(Agraph_s g, StarStruct disc, _dtmethod_s method) {
|
||||
ENTERING("48ox0bg1qmasrer8np51uwsyk","agdtopen");
|
||||
try {
|
||||
Dtmemory_f memf;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class block__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class blockpath__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class blocktree__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class circpos__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class circular__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class circularinit__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class deglist__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class edgelist__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class nodelist__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class nodeset__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class args__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -64,6 +64,7 @@ import h.boxf;
|
||||
import h.inside_t;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.MutableDouble;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
@ -335,7 +336,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -373,7 +374,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -413,7 +414,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -735,7 +736,7 @@ static {
|
||||
Arrownames.plus(2).setStruct(create_arrowname_t(null, 0));
|
||||
}
|
||||
private final static __struct__ create_arrowname_t(String name, int type) {
|
||||
final __struct__<arrowname_t> result = __struct__.from(arrowname_t.class);
|
||||
final __struct__<arrowname_t> result = JUtils.from(arrowname_t.class);
|
||||
result.setCString("name", name==null?null:new CString(name));
|
||||
result.setInt("type", type);
|
||||
return result;
|
||||
@ -755,7 +756,7 @@ static {
|
||||
Arrowtypes.plus(8).setStruct(createArrowtypes(0, 0.0, null));
|
||||
}
|
||||
private final static __struct__ createArrowtypes(int type, double lenfact, CFunction function) {
|
||||
final __struct__<arrowtype_t> result = __struct__.from(arrowtype_t.class);
|
||||
final __struct__<arrowtype_t> result = JUtils.from(arrowtype_t.class);
|
||||
result.setInt("type", type);
|
||||
result.setDouble("lenfact", lenfact);
|
||||
result.setPtr("gen", function);
|
||||
@ -932,7 +933,7 @@ LEAVING("7ymcsnwqkr1crisrga0kezh1f","inside");
|
||||
public static int arrowEndClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int eflag) {
|
||||
ENTERING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip");
|
||||
try {
|
||||
final __struct__<inside_t> inside_context = __struct__.from(inside_t.class);
|
||||
final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
|
||||
final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4);
|
||||
double elen;
|
||||
MutableDouble elen2 = new MutableDouble(0);
|
||||
@ -966,34 +967,36 @@ LEAVING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip");
|
||||
|
||||
//3 q7y4oxn0paexbgynmtg2zmiv
|
||||
// int arrowStartClip(edge_t* e, pointf * ps, int startp, int endp, bezier * spl, int sflag)
|
||||
public static Object arrowStartClip(Object... arg) {
|
||||
UNSUPPORTED("7yvz6xdsdp7elmx244pl0gazz"); // int arrowStartClip(edge_t* e, pointf * ps, int startp,
|
||||
UNSUPPORTED("8k5ruwl8qgfm72sur688h274s"); // int endp, bezier * spl, int sflag)
|
||||
UNSUPPORTED("erg9i1970wdri39osu8hx2a6e"); // {
|
||||
UNSUPPORTED("114lbsab8twbq15luo36j31q2"); // inside_t inside_context;
|
||||
UNSUPPORTED("96gdnugus7n28odgvctx3xuls"); // pointf sp[4];
|
||||
UNSUPPORTED("7igs7akkknm38zfqq5ws6i8e1"); // double slen, slen2;
|
||||
UNSUPPORTED("hda5ej3tl5f5yl2yv519fh9g"); // slen = arrow_length(e, sflag);
|
||||
UNSUPPORTED("cn1u0njiskbqzm1ytxc60hvhn"); // slen2 = slen * slen;
|
||||
UNSUPPORTED("4wg1jjuy1tzmozuyrpld67lyo"); // spl->sflag = sflag, spl->sp = ps[startp];
|
||||
UNSUPPORTED("3kwfclot4ahgcgki9f7gyz7hp"); // if (endp > startp && DIST2(ps[startp], ps[startp + 3]) < slen2) {
|
||||
UNSUPPORTED("ee4c7giu5c5wj9p89yhrftlm4"); // startp += 3;
|
||||
UNSUPPORTED("dvgyxsnyeqqnyzq696k3vskib"); // }
|
||||
UNSUPPORTED("58e2ypxz9985jahejomcb3q9c"); // sp[0] = ps[startp + 3];
|
||||
UNSUPPORTED("q6t1k12ql53bpk2kf68hsi5y"); // sp[1] = ps[startp + 2];
|
||||
UNSUPPORTED("76tg0a3uda3p8svf251tnr0yi"); // sp[2] = ps[startp + 1];
|
||||
UNSUPPORTED("agxcxgo6w8v0tipza7n9c05xt"); // sp[3] = spl->sp; /* ensure endpoint starts inside */
|
||||
UNSUPPORTED("58ncmwp330cx9zr4kpm4xoidb"); // inside_context.a.p = &sp[3];
|
||||
UNSUPPORTED("80bq4dpb1ulq3sd3d5z3lpmub"); // inside_context.a.r = &slen2;
|
||||
UNSUPPORTED("90ahfjp59dwgkcrmlb5p9li27"); // bezier_clip(&inside_context, inside, sp, 0);
|
||||
UNSUPPORTED("7wfhuqxd87aw2hxd3hl4izmjh"); // ps[startp] = sp[3];
|
||||
UNSUPPORTED("3olq3bup4vl7pzvxu3imphze9"); // ps[startp + 1] = sp[2];
|
||||
UNSUPPORTED("dm3yq6cmfbrst02xdf1yqfx3j"); // ps[startp + 2] = sp[1];
|
||||
UNSUPPORTED("49s7487urjz20iy0mbbgjvrjh"); // ps[startp + 3] = sp[0];
|
||||
UNSUPPORTED("4acg3jbqtner5sse4kbl0829m"); // return startp;
|
||||
UNSUPPORTED("c24nfmv9i7o5eoqaymbibp7m7"); // }
|
||||
|
||||
throw new UnsupportedOperationException();
|
||||
public static int arrowStartClip(Agedge_s e, __ptr__ ps, int startp, int endp, bezier spl, int sflag) {
|
||||
ENTERING("q7y4oxn0paexbgynmtg2zmiv","arrowStartClip");
|
||||
try {
|
||||
final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
|
||||
final __array_of_struct__ sp = __array_of_struct__.malloc(pointf.class, 4);
|
||||
double slen;
|
||||
MutableDouble slen2 = new MutableDouble(0);
|
||||
slen = arrow_length(e, sflag);
|
||||
slen2.setValue(slen * slen);
|
||||
spl.setInt("sflag", sflag);
|
||||
spl.setStruct("sp", ps.plus(startp).getStruct());
|
||||
if (endp > startp && DIST2(ps.plus(startp).getPtr(), ps.plus(startp + 3).getPtr()) < slen2.getValue()) {
|
||||
startp += 3;
|
||||
}
|
||||
sp.plus(0).setStruct(ps.plus(startp+3).getStruct());
|
||||
sp.plus(1).setStruct(ps.plus(startp+2).getStruct());
|
||||
sp.plus(2).setStruct(ps.plus(startp+1).getStruct());
|
||||
sp.plus(3).setStruct(spl.getStruct("sp"));
|
||||
/* ensure endpoint starts inside */
|
||||
inside_context.setPtr("a.p", sp.plus(3).asPtr());
|
||||
inside_context.setPtr("a.r", slen2.amp());
|
||||
bezier_clip(inside_context.amp(), function(arrows__c.class, "inside"), sp, false);
|
||||
ps.plus(startp).setStruct(sp.plus(3).getStruct());
|
||||
ps.plus(startp+1).setStruct(sp.plus(2).getStruct());
|
||||
ps.plus(startp+2).setStruct(sp.plus(1).getStruct());
|
||||
ps.plus(startp+3).setStruct(sp.plus(0).getStruct());
|
||||
return startp;
|
||||
} finally {
|
||||
LEAVING("9eellwhg4gsa2pdszpeqihs2d","arrowEndClip");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class ellipse__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -56,6 +56,7 @@ import h.boxf;
|
||||
import h.pointf;
|
||||
import h.xdot;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__array_of_struct__;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
@ -325,7 +326,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -363,7 +364,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -403,7 +404,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class geom__c {
|
||||
@ -80,7 +81,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -118,7 +119,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -158,7 +159,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class globals__c {
|
||||
@ -344,7 +345,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -382,7 +383,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -422,7 +423,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class htmllex__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class htmlparse__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -50,6 +50,7 @@ import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import h.textlabel_t;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -318,7 +319,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -356,7 +357,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -396,7 +397,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -93,6 +93,7 @@ import h.fontname_kind;
|
||||
import h.layout_t;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -361,7 +362,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -399,7 +400,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -439,7 +440,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -1562,7 +1563,7 @@ try {
|
||||
/* it would be nice to allow multiple graph labels in the future */
|
||||
if ((str = agget(sg, new CString("label")))!=null && (str.charAt(0) != '\0')) {
|
||||
char pos_flag=0;
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class);
|
||||
GD_has_labels(sg.getPtr("root"), GD_has_labels(sg.getPtr("root")) | (1 << 3));
|
||||
GD_label(sg, make_label(sg, str, (aghtmlstr(str)!=0 ? (1 << 1) : (0 << 1)),
|
||||
late_double(sg, (agattr(sg,AGRAPH,new CString("fontsize"),null)),
|
||||
@ -1596,7 +1597,7 @@ UNSUPPORTED("evu9w6pw3kkh7z8w7t4rx4qxc"); // pos_flag |= 4;
|
||||
return;
|
||||
/* Set border information for cluster labels to allow space
|
||||
*/
|
||||
dimen.____(GD_label(sg).getStruct("dimen"));
|
||||
dimen.___(GD_label(sg).getStruct("dimen"));
|
||||
dimen.setDouble("x", dimen.getDouble("x") + 4*4);
|
||||
dimen.setDouble("y", dimen.getDouble("y") + 2*4);
|
||||
if (N(GD_flip(agroot(sg)))) {
|
||||
|
@ -77,12 +77,14 @@ import h.Agobj_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agraphinfo_t;
|
||||
import h.GVC_s;
|
||||
import h.ST_pointf;
|
||||
import h.ST_port;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import h.port;
|
||||
import h.textlabel_t;
|
||||
import h.textspan_t;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__ptr__;
|
||||
@ -353,7 +355,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -391,7 +393,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -431,7 +433,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -730,11 +732,11 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//3 4wkeqik2dt7ecr64ej6ltbnvb
|
||||
// static void storeline(GVC_t *gvc, textlabel_t *lp, char *line, char terminator)
|
||||
//private static __struct__<textfont_t> tf = __struct__.from(textfont_t.class);
|
||||
//private static __struct__<textfont_t> tf = JUtils.from(textfont_t.class);
|
||||
public static void storeline(GVC_s gvc, textlabel_t lp, CString line, char terminator) {
|
||||
ENTERING("4wkeqik2dt7ecr64ej6ltbnvb","storeline");
|
||||
try {
|
||||
final __struct__<pointf> size = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> size = JUtils.from(pointf.class);
|
||||
__ptr__ span = null;
|
||||
int oldsz = lp.getInt("u.txt.nspans") + 1;
|
||||
lp.setPtr("u.txt.span", ZALLOC(oldsz + 1, lp.getPtr("u.txt.span"), textspan_t.class, oldsz));
|
||||
@ -745,22 +747,22 @@ try {
|
||||
Z.z().tf.setPtr("name", lp.getPtr("fontname"));
|
||||
Z.z().tf.setDouble("size", lp.getDouble("fontsize"));
|
||||
// WE CHEAT
|
||||
size.setDouble("x", 0.0);
|
||||
size.setDouble("y", (int)(lp.getDouble("fontsize") * 1.20));
|
||||
((ST_pointf) size).x = 0.0;
|
||||
((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20);
|
||||
hackInitDimensionFromLabel(size, line.getContent());
|
||||
span.getStruct("size").setDouble("y", (int)size.getDouble("y"));
|
||||
((ST_pointf) span.getStruct("size")).y = (int)size.getDouble("y");
|
||||
}
|
||||
else {
|
||||
System.err.println("YOU SHOULD NOT SEE THAT");
|
||||
size.setDouble("x", 0.0);
|
||||
size.setDouble("y", (int)(lp.getDouble("fontsize") * 1.20));
|
||||
((ST_pointf) size).x = 0.0;
|
||||
((ST_pointf) size).y = (int)(lp.getDouble("fontsize") * 1.20);
|
||||
span.getStruct("size").setDouble("y", (int)(lp.getDouble("fontsize") * 1.20));
|
||||
}
|
||||
lp.setInt("u.txt.nspans", lp.getInt("u.txt.nspans") + 1);
|
||||
/* width = max line width */
|
||||
lp.getStruct("dimen").setDouble("x", MAX(lp.getStruct("dimen").getDouble("x"), size.getDouble("x")));
|
||||
((ST_pointf) lp.getStruct("dimen")).x = MAX(lp.getStruct("dimen").getDouble("x"), size.getDouble("x"));
|
||||
/* accumulate height */
|
||||
lp.getStruct("dimen").setDouble("y", lp.getStruct("dimen").getDouble("y") + size.getDouble("y"));
|
||||
((ST_pointf) lp.getStruct("dimen")).y = lp.getStruct("dimen").getDouble("y") + size.getDouble("y");
|
||||
} finally {
|
||||
LEAVING("4wkeqik2dt7ecr64ej6ltbnvb","storeline");
|
||||
}
|
||||
@ -777,8 +779,8 @@ try {
|
||||
char c;
|
||||
CString p, line, lineptr, str = lp.getCString("text");
|
||||
char bytee = 0x00;
|
||||
lp.getStruct("dimen").setDouble("x", 0.0);
|
||||
lp.getStruct("dimen").setDouble("y", 0.0);
|
||||
((ST_pointf) lp.getStruct("dimen")).x = 0.0;
|
||||
((ST_pointf) lp.getStruct("dimen")).y = 0.0;
|
||||
if (str.charAt(0) == '\0')
|
||||
return;
|
||||
line = lineptr = null;
|
||||
@ -1043,7 +1045,7 @@ try {
|
||||
int newlen = 0;
|
||||
int isEdge = 0;
|
||||
textlabel_t tl;
|
||||
final __struct__<port> pt = __struct__.from(port.class);
|
||||
final ST_port pt = new ST_port();
|
||||
/* prepare substitution strings */
|
||||
switch (agobjkind(obj)) {
|
||||
case AGRAPH:
|
||||
@ -1072,13 +1074,13 @@ try {
|
||||
g_len = strlen(g_str);
|
||||
t_str = agnameof(agtail((obj.castTo(Agedge_s.class))));
|
||||
t_len = strlen(t_str);
|
||||
pt.____(ED_tail_port(obj.castTo(Agedge_s.class)));
|
||||
if ((tp_str = pt.getCString("name"))!=null)
|
||||
pt.___(ED_tail_port(obj.castTo(Agedge_s.class)));
|
||||
if ((tp_str = pt.name)!=null)
|
||||
tp_len = strlen(tp_str);
|
||||
h_str = agnameof(aghead((obj.castTo(Agedge_s.class))));
|
||||
h_len = strlen(h_str);
|
||||
pt.____(ED_head_port(obj.castTo(Agedge_s.class)));
|
||||
if ((hp_str = pt.getCString("name"))!=null)
|
||||
pt.___(ED_head_port(obj.castTo(Agedge_s.class)));
|
||||
if ((hp_str = pt.name)!=null)
|
||||
hp_len = strlen(hp_str);
|
||||
h_len = strlen(h_str);
|
||||
tl = ED_label(obj.castTo(Agedge_s.class));
|
||||
|
@ -95,6 +95,7 @@ import h.boxf;
|
||||
import h.nodequeue;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__ptr__;
|
||||
@ -366,7 +367,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -404,7 +405,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -444,7 +445,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -764,11 +765,11 @@ private static jmp_buf jbuf = new jmp_buf();
|
||||
|
||||
//1 3t9aql1n1eclyvy7p2nwyacor
|
||||
// static nlist_t Tree_node
|
||||
//private static final __struct__<nlist_t> Tree_node = __struct__.from(nlist_t.class);
|
||||
//private static final __struct__<nlist_t> Tree_node = JUtils.from(nlist_t.class);
|
||||
|
||||
//1 11b7xeg0x1f09v305mxwvgbhs
|
||||
// static elist Tree_edge
|
||||
//private static final __struct__<elist> Tree_edge = __struct__.from(elist.class);
|
||||
//private static final __struct__<elist> Tree_edge = JUtils.from(elist.class);
|
||||
|
||||
|
||||
|
||||
@ -782,39 +783,39 @@ try {
|
||||
UNSUPPORTED("cq4nqjjxvb0dtdfy4c7pwpqai"); // agerr(AGERR, "add_tree_edge: missing tree edge\n");
|
||||
UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1);
|
||||
}
|
||||
ED_tree_index(e, Z.z().Tree_edge.getInt("size"));
|
||||
ED_tree_index(e, Z.z().Tree_edge.size);
|
||||
|
||||
Z.z().Tree_edge.getArrayOfPtr("list").plus(Z.z().Tree_edge.getInt("size")).setPtr(e);
|
||||
Z.z().Tree_edge.setInt("size", 1+ Z.z().Tree_edge.getInt("size"));
|
||||
Z.z().Tree_edge.setInList(Z.z().Tree_edge.size, e);
|
||||
Z.z().Tree_edge.size = 1+ Z.z().Tree_edge.size;
|
||||
|
||||
if (ND_mark(agtail(e)) == 0) {
|
||||
Z.z().Tree_node.getArrayOfPtr("list").plus(Z.z().Tree_node.getInt("size")).setPtr(agtail(e));
|
||||
Z.z().Tree_node.setInt("size", 1+ Z.z().Tree_node.getInt("size"));
|
||||
Z.z().Tree_node.setInList(Z.z().Tree_node.size, agtail(e));
|
||||
Z.z().Tree_node.size = 1+ Z.z().Tree_node.size;
|
||||
}
|
||||
|
||||
if (ND_mark(aghead(e)) == 0) {
|
||||
Z.z().Tree_node.getArrayOfPtr("list").plus(Z.z().Tree_node.getInt("size")).setPtr(aghead(e));
|
||||
Z.z().Tree_node.setInt("size", 1+ Z.z().Tree_node.getInt("size"));
|
||||
Z.z().Tree_node.setInList(Z.z().Tree_node.size, aghead(e));
|
||||
Z.z().Tree_node.size = 1+ Z.z().Tree_node.size;
|
||||
}
|
||||
n = agtail(e);
|
||||
ND_mark(n, 1);
|
||||
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(ND_tree_out(n).getInt("size")).setPtr(e);
|
||||
ND_tree_out(n).setInt("size", 1+ND_tree_out(n).getInt("size"));
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(ND_tree_out(n).getInt("size")).setPtr(null);
|
||||
ND_tree_out(n).setInList(ND_tree_out(n).size, e);
|
||||
ND_tree_out(n).size = 1+ND_tree_out(n).size;
|
||||
ND_tree_out(n).setInList(ND_tree_out(n).size, null);
|
||||
|
||||
if (ND_out(n).getArrayOfPtr("list").plus(ND_tree_out(n).getInt("size") - 1).getPtr() == null) {
|
||||
if (ND_out(n).getFromList(ND_tree_out(n).size - 1) == null) {
|
||||
UNSUPPORTED("9src34zgmgy8yvdzfs1ozlh0w"); // agerr(AGERR, "add_tree_edge: empty outedge list\n");
|
||||
UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1);
|
||||
}
|
||||
n = aghead(e);
|
||||
ND_mark(n, 1);
|
||||
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(ND_tree_in(n).getInt("size")).setPtr(e);
|
||||
ND_tree_in(n).setInt("size", 1+ND_tree_in(n).getInt("size"));
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(ND_tree_in(n).getInt("size")).setPtr(null);
|
||||
ND_tree_in(n).setInList(ND_tree_in(n).size, e);
|
||||
ND_tree_in(n).size = 1+ND_tree_in(n).size;
|
||||
ND_tree_in(n).setInList(ND_tree_in(n).size, null);
|
||||
|
||||
if (ND_in(n).getArrayOfPtr("list").plus(ND_tree_in(n).getInt("size") - 1).getPtr() == null) {
|
||||
if (ND_in(n).getFromList(ND_tree_in(n).size - 1) == null) {
|
||||
UNSUPPORTED("f0uri98pv606g2qjpy9k385cy"); // agerr(AGERR, "add_tree_edge: empty inedge list\n");
|
||||
UNSUPPORTED("6fzmgjpkhmnx0a2cnt0q0rceg"); // longjmp (jbuf, 1);
|
||||
}
|
||||
@ -834,32 +835,32 @@ try {
|
||||
int i, j;
|
||||
Agnode_s n;
|
||||
ED_tree_index(f, ED_tree_index(e));
|
||||
Z.z().Tree_edge.getArrayOfPtr("list").plus(ED_tree_index(e)).setPtr(f);
|
||||
Z.z().Tree_edge.setInList(ED_tree_index(e), f);
|
||||
ED_tree_index(e, -1);
|
||||
n = agtail(e);
|
||||
ND_tree_out(n).setInt("size", ND_tree_out(n).getInt("size") -1);
|
||||
i = ND_tree_out(n).getInt("size");
|
||||
ND_tree_out(n).size = ND_tree_out(n).size -1;
|
||||
i = ND_tree_out(n).size;
|
||||
for (j = 0; j <= i; j++)
|
||||
if (EQ(ND_tree_out(n).getArrayOfPtr("list").plus(j).getPtr(), e))
|
||||
if (EQ(ND_tree_out(n).getFromList(j), e))
|
||||
break;
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(j).setPtr(ND_tree_out(n).getArrayOfPtr("list").plus(i).getPtr());
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(i).setPtr(null);
|
||||
ND_tree_out(n).setInList(j, ND_tree_out(n).getFromList(i));
|
||||
ND_tree_out(n).setInList(i, null);
|
||||
n = aghead(e);
|
||||
ND_tree_in(n).setInt("size", ND_tree_in(n).getInt("size") -1);
|
||||
i = ND_tree_in(n).getInt("size");
|
||||
ND_tree_in(n).size = ND_tree_in(n).size -1;
|
||||
i = ND_tree_in(n).size;
|
||||
for (j = 0; j <= i; j++)
|
||||
if (EQ(ND_tree_in(n).getArrayOfPtr("list").plus(j).getPtr(), e))
|
||||
if (EQ(ND_tree_in(n).getFromList(j), e))
|
||||
break;
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(j).setPtr(ND_tree_in(n).getArrayOfPtr("list").plus(i).getPtr());
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(i).setPtr(null);
|
||||
ND_tree_in(n).setInList(j, ND_tree_in(n).getFromList(i));
|
||||
ND_tree_in(n).setInList(i, null);
|
||||
n = agtail(f);
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(ND_tree_out(n).getInt("size")).setPtr(f);
|
||||
ND_tree_out(n).setInt("size", ND_tree_out(n).getInt("size") +1);
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(ND_tree_out(n).getInt("size")).setPtr(null);
|
||||
ND_tree_out(n).setInList(ND_tree_out(n).size, f);
|
||||
ND_tree_out(n).size = ND_tree_out(n).size +1;
|
||||
ND_tree_out(n).setInList(ND_tree_out(n).size, null);
|
||||
n = aghead(f);
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(ND_tree_in(n).getInt("size")).setPtr(f);
|
||||
ND_tree_in(n).setInt("size", ND_tree_in(n).getInt("size") +1);
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(ND_tree_in(n).getInt("size")).setPtr(null);
|
||||
ND_tree_in(n).setInList(ND_tree_in(n).size, f);
|
||||
ND_tree_in(n).size = ND_tree_in(n).size +1;
|
||||
ND_tree_in(n).setInList(ND_tree_in(n).size, null);
|
||||
} finally {
|
||||
LEAVING("9b7b78pmafynmvffztrqnlxtn","exchange_tree_edges");
|
||||
}
|
||||
@ -886,9 +887,9 @@ try {
|
||||
while ((v = dequeue(Q))!=null) {
|
||||
ND_rank(v, 0);
|
||||
ctr++;
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++)
|
||||
ND_rank(v, MAX(ND_rank(v), ND_rank(agtail(e)) + ED_minlen(e)));
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
|
||||
ND_priority(aghead(e), ND_priority(aghead(e)) -1 );
|
||||
if ((ND_priority(aghead(e))) <= 0)
|
||||
enqueue(Q, aghead(e));
|
||||
@ -938,13 +939,13 @@ try {
|
||||
Agedge_s f, rv = null;
|
||||
int j, cnt = 0;
|
||||
j = Z.z().S_i;
|
||||
while (Z.z().S_i < Z.z().Tree_edge.getInt("size")) {
|
||||
if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getArrayOfPtr("list").plus(Z.z().S_i).getPtr()) < 0) {
|
||||
while (Z.z().S_i < Z.z().Tree_edge.size) {
|
||||
if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
|
||||
if (rv!=null) {
|
||||
if (ED_cutvalue(rv) > ED_cutvalue(f))
|
||||
rv = f;
|
||||
} else
|
||||
rv = (Agedge_s) Z.z().Tree_edge.getArrayOfPtr("list").plus(Z.z().S_i).getPtr();
|
||||
rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
|
||||
if (++cnt >= Z.z().Search_size)
|
||||
return rv;
|
||||
}
|
||||
@ -953,12 +954,12 @@ try {
|
||||
if (j > 0) {
|
||||
Z.z().S_i = 0;
|
||||
while (Z.z().S_i < j) {
|
||||
if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getArrayOfPtr("list").plus(Z.z().S_i).getPtr()) < 0) {
|
||||
if (ED_cutvalue(f = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i)) < 0) {
|
||||
if (rv!=null) {
|
||||
if (ED_cutvalue(rv) > ED_cutvalue(f))
|
||||
rv = f;
|
||||
} else
|
||||
rv = (Agedge_s) Z.z().Tree_edge.getArrayOfPtr("list").plus(Z.z().S_i).getPtr();
|
||||
rv = (Agedge_s) Z.z().Tree_edge.getFromList(Z.z().S_i);
|
||||
if (++cnt >= Z.z().Search_size)
|
||||
return rv;
|
||||
}
|
||||
@ -989,7 +990,7 @@ ENTERING("10lkpr4y40luvy2idlozfiva3","dfs_enter_outedge");
|
||||
try {
|
||||
int i, slack;
|
||||
Agedge_s e;
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
|
||||
if (TREE_EDGE(e) == false) {
|
||||
if (N(SEQ(Z.z().Low, ND_lim(aghead(e)), Z.z().Lim))) {
|
||||
slack = SLACK(e);
|
||||
@ -1001,7 +1002,7 @@ try {
|
||||
} else if (ND_lim(aghead(e)) < ND_lim(v))
|
||||
dfs_enter_outedge(aghead(e));
|
||||
}
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null && (Z.z().Slack > 0); i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
|
||||
if (ND_lim(agtail(e)) < ND_lim(v))
|
||||
dfs_enter_outedge(agtail(e));
|
||||
} finally {
|
||||
@ -1019,7 +1020,7 @@ ENTERING("2z9nii6380p8qlql8nznzgvof","dfs_enter_inedge");
|
||||
try {
|
||||
int i, slack;
|
||||
Agedge_s e;
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
|
||||
if (TREE_EDGE(e) == false) {
|
||||
if (N(SEQ(Z.z().Low, ND_lim(agtail(e)), Z.z().Lim))) {
|
||||
slack = SLACK(e);
|
||||
@ -1031,7 +1032,7 @@ try {
|
||||
} else if (ND_lim(agtail(e)) < ND_lim(v))
|
||||
dfs_enter_inedge(agtail(e));
|
||||
}
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null && (Z.z().Slack > 0); i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null && (Z.z().Slack > 0); i++)
|
||||
if (ND_lim(aghead(e)) < ND_lim(v))
|
||||
dfs_enter_inedge(aghead(e));
|
||||
} finally {
|
||||
@ -1081,17 +1082,17 @@ ENTERING("1gvyafmercq92v3lg6gb33cbt","treesearch");
|
||||
try {
|
||||
int i;
|
||||
Agedge_s e;
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
|
||||
if ((ND_mark(aghead(e)) == 0) && (SLACK(e) == 0)) {
|
||||
add_tree_edge(e);
|
||||
if ((Z.z().Tree_edge.getInt("size") == Z.z().N_nodes - 1) || treesearch(aghead(e)))
|
||||
if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(aghead(e)))
|
||||
return NOT(0);
|
||||
}
|
||||
}
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++) {
|
||||
if ((ND_mark(agtail(e)) == 0) && (SLACK(e) == 0)) {
|
||||
add_tree_edge(e);
|
||||
if ((Z.z().Tree_edge.getInt("size") == Z.z().N_nodes - 1) || treesearch(agtail(e)))
|
||||
if ((Z.z().Tree_edge.size == Z.z().N_nodes - 1) || treesearch(agtail(e)))
|
||||
return NOT(0);
|
||||
}
|
||||
}
|
||||
@ -1113,18 +1114,18 @@ try {
|
||||
Agnode_s n;
|
||||
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
|
||||
ND_mark(n, 0);
|
||||
ND_tree_in(n).getArrayOfPtr("list").plus(0).setPtr(null);
|
||||
ND_tree_out(n).getArrayOfPtr("list").plus(0).setPtr(null);
|
||||
ND_tree_in(n).setInt("size", 0);
|
||||
ND_tree_out(n).setInt("size", 0);
|
||||
ND_tree_in(n).setInList(0, null);
|
||||
ND_tree_out(n).setInList(0, null);
|
||||
ND_tree_in(n).size = 0;
|
||||
ND_tree_out(n).size = 0;
|
||||
}
|
||||
for (i = 0; i < Z.z().Tree_edge.getInt("size"); i++)
|
||||
ED_tree_index(Z.z().Tree_edge.getArrayOfPtr("list").plus(i).getPtr(), -1);
|
||||
Z.z().Tree_node.setInt("size", 0);
|
||||
Z.z().Tree_edge.setInt("size", 0);
|
||||
for (n = GD_nlist(Z.z().G_ns); n!=null && (Z.z().Tree_edge.getInt("size") == 0); n = ND_next(n))
|
||||
for (i = 0; i < Z.z().Tree_edge.size; i++)
|
||||
ED_tree_index(Z.z().Tree_edge.getFromList(i), -1);
|
||||
Z.z().Tree_node.size = 0;
|
||||
Z.z().Tree_edge.size = 0;
|
||||
for (n = GD_nlist(Z.z().G_ns); n!=null && (Z.z().Tree_edge.size == 0); n = ND_next(n))
|
||||
treesearch(n);
|
||||
return Z.z().Tree_node.getInt("size");
|
||||
return Z.z().Tree_node.size;
|
||||
} finally {
|
||||
LEAVING("c98bj1u8j43cdezeczn33mec0","tight_tree");
|
||||
}
|
||||
@ -1161,7 +1162,7 @@ try {
|
||||
while (tight_tree() < Z.z().N_nodes) {
|
||||
e = null;
|
||||
for (n = GD_nlist(Z.z().G_ns); n!=null; n = ND_next(n)) {
|
||||
for (i = 0; (f = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (f = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
|
||||
if ((TREE_EDGE(f) == false) && incident(f)!=null && ((e == null)
|
||||
|| (SLACK(f)
|
||||
<
|
||||
@ -1175,8 +1176,8 @@ try {
|
||||
if (delta!=0) {
|
||||
if (EQ(incident(e), aghead(e)))
|
||||
delta = -delta;
|
||||
for (i = 0; i < Z.z().Tree_node.getInt("size"); i++)
|
||||
ND_rank(Z.z().Tree_node.getArrayOfPtr("list").plus(i).getPtr(), ND_rank(Z.z().Tree_node.getArrayOfPtr("list").plus(i).getPtr()) + delta);
|
||||
for (i = 0; i < Z.z().Tree_node.size; i++)
|
||||
ND_rank(Z.z().Tree_node.getFromList(i), ND_rank(Z.z().Tree_node.getFromList(i)) + delta);
|
||||
}
|
||||
} else {
|
||||
return 1;
|
||||
@ -1231,10 +1232,10 @@ try {
|
||||
int i;
|
||||
Agedge_s e;
|
||||
ND_rank(v, ND_rank(v) - delta);
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, ND_par(v)))
|
||||
rerank(aghead(e), delta);
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, ND_par(v)))
|
||||
rerank(agtail(e), delta);
|
||||
} finally {
|
||||
@ -1256,11 +1257,11 @@ try {
|
||||
/* "for (v = in nodes in tail side of e) do ND_rank(v) -= delta;" */
|
||||
if (delta > 0) {
|
||||
int s;
|
||||
s = ND_tree_in(agtail(e)).getInt("size") + ND_tree_out(agtail(e)).getInt("size");
|
||||
s = ND_tree_in(agtail(e)).size + ND_tree_out(agtail(e)).size;
|
||||
if (s == 1)
|
||||
rerank(agtail(e), delta);
|
||||
else {
|
||||
s = ND_tree_in(aghead(e)).getInt("size") + ND_tree_out(aghead(e)).getInt("size");
|
||||
s = ND_tree_in(aghead(e)).size + ND_tree_out(aghead(e)).size;
|
||||
if (s == 1)
|
||||
rerank(aghead(e), -delta);
|
||||
else {
|
||||
@ -1343,8 +1344,8 @@ ENTERING("9gx8p7md3v3mzp640xdjj814a","LR_balance");
|
||||
try {
|
||||
int i, delta;
|
||||
Agedge_s e, f;
|
||||
for (i = 0; i < Z.z().Tree_edge.getInt("size"); i++) {
|
||||
e = (Agedge_s) Z.z().Tree_edge.getArrayOfPtr("list").plus(i).getPtr();
|
||||
for (i = 0; i < Z.z().Tree_edge.size; i++) {
|
||||
e = (Agedge_s) Z.z().Tree_edge.getFromList(i);
|
||||
if (ED_cutvalue(e) == 0) {
|
||||
f = enter_edge(e);
|
||||
if (f == null)
|
||||
@ -1391,11 +1392,11 @@ try {
|
||||
inweight = outweight = 0;
|
||||
low = 0;
|
||||
high = Z.z().Maxrank;
|
||||
for (i = 0; (e = (Agedge_s) ND_in(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
|
||||
inweight += ED_weight(e);
|
||||
low = MAX(low, ND_rank(agtail(e)) + ED_minlen(e));
|
||||
}
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
|
||||
outweight += ED_weight(e);
|
||||
high = MIN(high, ND_rank(aghead(e)) - ED_minlen(e));
|
||||
}
|
||||
@ -1436,17 +1437,18 @@ try {
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
ND_mark(n, 0);
|
||||
Z.z().N_nodes++;
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++)
|
||||
Z.z().N_edges++;
|
||||
}
|
||||
Z.z().Tree_node.setPtr("list", ALLOC_empty(Z.z().N_nodes, Z.z().Tree_node.getPtr("list"), Agnode_s.class));
|
||||
Z.z().Tree_node.setInt("size", 0);
|
||||
Z.z().Tree_edge.setPtr("list", ALLOC_empty(Z.z().N_nodes, Z.z().Tree_edge.getPtr("list"), Agedge_s.class));
|
||||
Z.z().Tree_edge.setInt("size", 0);
|
||||
Z.z().Tree_node.reallocEmpty(Z.z().N_nodes, Agnode_s.class);
|
||||
Z.z().Tree_node.size = 0;
|
||||
// Z.z().Tree_edge.setPtr("list", ALLOC_empty(Z.z().N_nodes, Z.z().Tree_edge.getPtr("list"), Agedge_s.class));
|
||||
Z.z().Tree_edge.realloc(Z.z().N_nodes);
|
||||
Z.z().Tree_edge.size = 0;
|
||||
feasible = 1;
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
ND_priority(n, 0);
|
||||
for (i = 0; (e = (Agedge_s) ND_in(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_in(n).getFromList(i))!=null; i++) {
|
||||
ND_priority(n, 1+ND_priority(n));
|
||||
ED_cutvalue(e, 0);
|
||||
ED_tree_index(e, -1);
|
||||
@ -1454,11 +1456,13 @@ try {
|
||||
&& (ND_rank(aghead(e)) - ND_rank(agtail(e)) < ED_minlen(e)))
|
||||
feasible = 0;
|
||||
}
|
||||
ND_tree_in(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));;
|
||||
ND_tree_in(n).setInt("size", 0);
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++);
|
||||
ND_tree_out(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));
|
||||
ND_tree_out(n).setInt("size", 0);
|
||||
// ND_tree_in(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));;
|
||||
ND_tree_in(n).mallocEmpty(Agedge_s.class, i+1);
|
||||
ND_tree_in(n).size = 0;
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++);
|
||||
// ND_tree_out(n).setPtr("list", zmalloc(sizeof(Agedge_s.class, i+1)));
|
||||
ND_tree_out(n).mallocEmpty(Agedge_s.class, i+1);
|
||||
ND_tree_out(n).size = 0;
|
||||
}
|
||||
return feasible;
|
||||
} finally {
|
||||
@ -1606,9 +1610,9 @@ try {
|
||||
dir = -1;
|
||||
}
|
||||
sum = 0;
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_out(v).getFromList(i))!=null; i++)
|
||||
sum += x_val(e, v, dir);
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_in(v).getFromList(i))!=null; i++)
|
||||
sum += x_val(e, v, dir);
|
||||
ED_cutvalue(f, sum);
|
||||
} finally {
|
||||
@ -1672,10 +1676,10 @@ ENTERING("ah65iqmwa5j0qwotm6amhijlg","dfs_cutval");
|
||||
try {
|
||||
int i;
|
||||
Agedge_s e;
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, par))
|
||||
dfs_cutval(aghead(e), e);
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, par))
|
||||
dfs_cutval(agtail(e), e);
|
||||
if (par!=null)
|
||||
@ -1698,10 +1702,10 @@ try {
|
||||
lim = low;
|
||||
ND_par(v, par);
|
||||
ND_low(v, low);
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_out(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, par))
|
||||
lim = dfs_range(aghead(e), e, lim);
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) ND_tree_in(v).getFromList(i))!=null; i++)
|
||||
if (NEQ(e, par))
|
||||
lim = dfs_range(agtail(e), e, lim);
|
||||
ND_lim(v, lim);
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class output__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class pointset__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -81,6 +81,7 @@ import h.Agedge_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agsym_s;
|
||||
import h.ST_boxf;
|
||||
import h.bezier;
|
||||
import h.boxf;
|
||||
import h.label_params_t;
|
||||
@ -88,6 +89,7 @@ import h.object_t;
|
||||
import h.pointf;
|
||||
import h.textlabel_t;
|
||||
import h.xlabel_t;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -356,7 +358,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -394,7 +396,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -434,7 +436,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -739,7 +741,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//1 ejooa1m5uoq0ue852wtuerpy
|
||||
// static pointf Offset
|
||||
//private final static __struct__<pointf> Offset = __struct__.from(pointf.class);
|
||||
//private final static __struct__<pointf> Offset = JUtils.from(pointf.class);
|
||||
|
||||
|
||||
|
||||
@ -752,7 +754,7 @@ return map_point_w_(p.copy()).copy();
|
||||
private static __struct__<pointf> map_point_w_(final __struct__<pointf> p) {
|
||||
ENTERING("dajapw16wus3rwimkrk5ihi2b","map_point");
|
||||
try {
|
||||
p.____(ccwrotatepf(p, Z.z().Rankdir * 90));
|
||||
p.___(ccwrotatepf(p, Z.z().Rankdir * 90));
|
||||
p.setDouble("x", p.getDouble("x") - Z.z().Offset.getDouble("x"));
|
||||
p.setDouble("y", p.getDouble("y") - Z.z().Offset.getDouble("y"));
|
||||
return p;
|
||||
@ -770,7 +772,7 @@ public static void map_edge(Agedge_s e) {
|
||||
ENTERING("bvq3vvonvotn47mfe5zsvchie","map_edge");
|
||||
try {
|
||||
int j, k;
|
||||
final __struct__<bezier> bz = __struct__.from(bezier.class);
|
||||
final __struct__<bezier> bz = JUtils.from(bezier.class);
|
||||
if (ED_spl(e) == null) {
|
||||
if ((Z.z().Concentrate == false) && (ED_edge_type(e) != 6))
|
||||
System.err.println("lost %s %s edge\n"+ agnameof(agtail(e))+
|
||||
@ -778,18 +780,18 @@ try {
|
||||
return;
|
||||
}
|
||||
for (j = 0; j < ED_spl(e).getInt("size"); j++) {
|
||||
bz.____(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct());
|
||||
bz.___(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct());
|
||||
for (k = 0; k < bz.getInt("size"); k++) {
|
||||
bz.getArrayOfPtr("list").plus(k).setStruct(map_point(bz.getArrayOfPtr("list").plus(k).getStruct()));
|
||||
}
|
||||
if (bz.getBoolean("sflag"))
|
||||
UNSUPPORTED("7894dgzvk2um2w1a5ph2r0bcc"); // ED_spl(e)->list[j].sp = map_point(ED_spl(e)->list[j].sp);
|
||||
if (bz.getBoolean("eflag")) {
|
||||
ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep").____(map_point(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep")));
|
||||
ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep").___(map_point(ED_spl(e).getArrayOfPtr("list").plus(j).getStruct("ep")));
|
||||
}
|
||||
}
|
||||
if (ED_label(e)!=null)
|
||||
ED_label(e).getStruct("pos").____(map_point(ED_label(e).getStruct("pos")));
|
||||
ED_label(e).getStruct("pos").___(map_point(ED_label(e).getStruct("pos")));
|
||||
if (ED_xlabel(e)!=null)
|
||||
UNSUPPORTED("al3tnq9zjjqeq1ll7qdxyu3ja"); // ED_xlabel(e)->pos = map_point(ED_xlabel(e)->pos);
|
||||
/* vladimir */
|
||||
@ -811,16 +813,16 @@ public static void translate_bb(Agraph_s g, int rankdir) {
|
||||
ENTERING("a3hf82rxsojxbunj6p8a6bkse","translate_bb");
|
||||
try {
|
||||
int c;
|
||||
final __struct__<boxf> bb = __struct__.from(boxf.class), new_bb = __struct__.from(boxf.class);
|
||||
bb.____(GD_bb(g));
|
||||
final ST_boxf bb = new ST_boxf(), new_bb = new ST_boxf();
|
||||
bb.___(GD_bb(g));
|
||||
if (rankdir == 1 || rankdir == 2) {
|
||||
UNSUPPORTED("d4wrtj0h7lkb0e0vernd9czq9"); // new_bb.LL = map_point(pointfof(bb.LL.x, bb.UR.y));
|
||||
UNSUPPORTED("crysiae5zxc69cj3v2ygfs8xn"); // new_bb.UR = map_point(pointfof(bb.UR.x, bb.LL.y));
|
||||
} else {
|
||||
new_bb.getStruct("LL").____(map_point(pointfof(bb.getStruct("LL").getDouble("x"), bb.getStruct("LL").getDouble("y"))));
|
||||
new_bb.getStruct("UR").____(map_point(pointfof(bb.getStruct("UR").getDouble("x"), bb.getStruct("UR").getDouble("y"))));
|
||||
new_bb.LL.___(map_point(pointfof(bb.LL.x, bb.LL.y)));
|
||||
new_bb.UR.___(map_point(pointfof(bb.UR.x, bb.UR.y)));
|
||||
}
|
||||
GD_bb(g).____(new_bb);
|
||||
GD_bb(g).___(new_bb);
|
||||
if (GD_label(g)!=null) {
|
||||
GD_label(g).setStruct("pos", map_point(GD_label(g).getStruct("pos")));
|
||||
}
|
||||
@ -847,7 +849,7 @@ try {
|
||||
for (v = agfstnode(g); v!=null; v = agnxtnode(g, v)) {
|
||||
if (Z.z().Rankdir!=0)
|
||||
UNSUPPORTED("e0j848r4j1j7sojfht5gwikvi"); // gv_nodesize(v, 0);
|
||||
ND_coord(v).____(map_point(ND_coord(v)));
|
||||
ND_coord(v).___(map_point(ND_coord(v)));
|
||||
if (ND_xlabel(v)!=null)
|
||||
UNSUPPORTED("3fy0l7w2v24hzrvlpstpknwl7"); // ND_xlabel(v)->pos = map_point(ND_xlabel(v)->pos);
|
||||
if (Z.z().State == 1)
|
||||
@ -1157,10 +1159,10 @@ try {
|
||||
int n_elbls = 0; /* # of unset edge labels or xlabels */
|
||||
int n_set_lbls = 0; /* # of set xlabels and edge labels */
|
||||
int n_clbls = 0; /* # of set cluster labels */
|
||||
final __struct__<boxf> bb = __struct__.from(boxf.class);
|
||||
final __struct__<pointf> ur = __struct__.from(pointf.class);
|
||||
final __struct__<boxf> bb = JUtils.from(boxf.class);
|
||||
final __struct__<pointf> ur = JUtils.from(pointf.class);
|
||||
textlabel_t lp;
|
||||
final __struct__<label_params_t> params = __struct__.from(label_params_t.class);
|
||||
final __struct__<label_params_t> params = JUtils.from(label_params_t.class);
|
||||
object_t objs;
|
||||
xlabel_t lbls;
|
||||
object_t objp;
|
||||
@ -1344,7 +1346,7 @@ public static void gv_postprocess(Agraph_s g, int allowTranslation) {
|
||||
ENTERING("8fc0zxg8y7hec3n4evx3jw6cq","gv_postprocess");
|
||||
try {
|
||||
double diff;
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class);
|
||||
Z.z().Rankdir = GD_rankdir(g);
|
||||
Z.z().Flip = GD_flip(g)!=0;
|
||||
/* Handle cluster labels */
|
||||
@ -1395,7 +1397,7 @@ UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
|
||||
if (allowTranslation!=0) {
|
||||
switch (Z.z().Rankdir) {
|
||||
case 0:
|
||||
Z.z().Offset.____(GD_bb(g).getStruct("LL"));
|
||||
Z.z().Offset.___(GD_bb(g).LL);
|
||||
break;
|
||||
case 1:
|
||||
UNSUPPORTED("5t3j9lrc86kd5ouaqgzvz3qcm"); // Offset = pointfof(-GD_bb(g).UR.y, GD_bb(g).LL.x);
|
||||
@ -1483,11 +1485,11 @@ public static void place_graph_label(Agraph_s g) {
|
||||
ENTERING("72zw1alhd5vd0g6mhum507rvx","place_graph_label");
|
||||
try {
|
||||
int c;
|
||||
final __struct__<pointf> p = __struct__.from(pointf.class), d = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> p = JUtils.from(pointf.class), d = JUtils.from(pointf.class);
|
||||
if (NEQ(g, agroot(g)) && (GD_label(g)!=null) && N(GD_label(g).getInt("set"))) {
|
||||
if ((GD_label_pos(g) & 1)!=0) {
|
||||
d.____(GD_border(g).plus(2).getStruct());
|
||||
p.setDouble("y", GD_bb(g).getStruct("UR").getDouble("y") - d.getDouble("y") / 2);
|
||||
d.___(GD_border(g).plus(2).getStruct());
|
||||
p.setDouble("y", GD_bb(g).UR.y - d.getDouble("y") / 2);
|
||||
} else {
|
||||
UNSUPPORTED("1w38no4welthbwa0i10hei16b"); // d = GD_border(g)[0];
|
||||
UNSUPPORTED("2xa4n9ca16xpf1kahaycmkl4r"); // p.y = GD_bb(g).LL.y + d.y / 2;
|
||||
@ -1497,7 +1499,7 @@ UNSUPPORTED("cgv3bcg9c274cdwxi1y0sja3p"); // p.x = GD_bb(g).UR.x - d.x / 2;
|
||||
} else if ((GD_label_pos(g) & 2)!=0) {
|
||||
UNSUPPORTED("7ictv9eqmjvxjii5lqlyw8nu"); // p.x = GD_bb(g).LL.x + d.x / 2;
|
||||
} else {
|
||||
p.setDouble("x", (GD_bb(g).getStruct("LL").getDouble("x") + GD_bb(g).getStruct("UR").getDouble("x")) / 2);
|
||||
p.setDouble("x", (GD_bb(g).LL.x + GD_bb(g).UR.x) / 2);
|
||||
}
|
||||
GD_label(g).setStruct("pos", p);
|
||||
GD_label(g).setBoolean("set", NOT(false));
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class psusershape__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -71,9 +71,11 @@ import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.Agedge_s;
|
||||
import h.Pedge_t;
|
||||
import h.Ppoly_t;
|
||||
import h.ST_boxf;
|
||||
import h.boxf;
|
||||
import h.path;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_ptr__;
|
||||
@ -346,7 +348,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -384,7 +386,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -424,7 +426,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -762,7 +764,7 @@ return simpleSplineRoute_w_(tp.copy(), hp.copy(), poly.copy(), n_spl_pts, polyli
|
||||
private static pointf simpleSplineRoute_w_(final __struct__<pointf> tp, final __struct__<pointf> hp, final __struct__<Ppoly_t> poly, int[] n_spl_pts, boolean polyline) {
|
||||
ENTERING("7ebl6qohcfpf1b9ucih5r9qgp","simpleSplineRoute");
|
||||
try {
|
||||
final __struct__<Ppoly_t> pl = __struct__.from(Ppoly_t.class), spl = __struct__.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class);
|
||||
final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2);
|
||||
final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2);
|
||||
int i;
|
||||
@ -860,10 +862,10 @@ try {
|
||||
for (splinepi = 0; splinepi + 3 < pn; splinepi += 3) {
|
||||
for (si = 0; si <= num_div; si++) {
|
||||
t = si / (double)num_div;
|
||||
sp.plus(0).getStruct().____(pps.plus(splinepi).getStruct());
|
||||
sp.plus(1).getStruct().____(pps.plus(splinepi+1).getStruct());
|
||||
sp.plus(2).getStruct().____(pps.plus(splinepi+2).getStruct());
|
||||
sp.plus(3).getStruct().____(pps.plus(splinepi+3).getStruct());
|
||||
sp.plus(0).getStruct().___(pps.plus(splinepi).getStruct());
|
||||
sp.plus(1).getStruct().___(pps.plus(splinepi+1).getStruct());
|
||||
sp.plus(2).getStruct().___(pps.plus(splinepi+2).getStruct());
|
||||
sp.plus(3).getStruct().___(pps.plus(splinepi+3).getStruct());
|
||||
sp.plus(0).setDouble("x", sp.plus(0).getDouble("x") + t * (sp.plus(1).getDouble("x") - sp.plus(0).getDouble("x")));
|
||||
sp.plus(0).setDouble("y", sp.plus(0).getDouble("y") + t * (sp.plus(1).getDouble("y") - sp.plus(0).getDouble("y")));
|
||||
sp.plus(1).setDouble("x", sp.plus(1).getDouble("x") + t * (sp.plus(2).getDouble("x") - sp.plus(1).getDouble("x")));
|
||||
@ -901,8 +903,8 @@ LEAVING("cu8ssjizw7ileqe9u7tcclq7k","limitBoxes");
|
||||
public static __ptr__ _routesplines(path pp, int npoints[], int polyline) {
|
||||
ENTERING("3mcnemqisisnqtd4mr72ej76y","_routesplines");
|
||||
try {
|
||||
final __struct__<Ppoly_t> poly = __struct__.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> pl = __struct__.from(Ppoly_t.class), spl = __struct__.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> poly = JUtils.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> pl = JUtils.from(Ppoly_t.class), spl = JUtils.from(Ppoly_t.class);
|
||||
int splinepi;
|
||||
final __array_of_struct__ eps = __array_of_struct__.malloc(pointf.class, 2);
|
||||
final __array_of_struct__ evs = __array_of_struct__.malloc(pointf.class, 2);
|
||||
@ -931,12 +933,12 @@ try {
|
||||
Z.z().polypoints = ALLOC_allocated2(boxn * 8, Z.z().polypoints, pointf.class);
|
||||
Z.z().polypointn = boxn * 8;
|
||||
}
|
||||
if ((boxn > 1) && (boxes.plus(0).getStruct().getStruct("LL").getDouble("y") > boxes.plus(1).getStruct().getStruct("LL").getDouble("y"))) {
|
||||
if ((boxn > 1) && (((ST_boxf)boxes.plus(0).getStruct()).LL.y > ((ST_boxf)boxes.plus(1).getStruct()).LL.y)) {
|
||||
flip = 1;
|
||||
for (bi = 0; bi < boxn; bi++) {
|
||||
double v = boxes.plus(bi).getStruct().getStruct("UR").getDouble("y");
|
||||
boxes.plus(bi).getStruct().getStruct("UR").setDouble("y",-1*boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
boxes.plus(bi).getStruct().getStruct("LL").setDouble("y", -v);
|
||||
double v = ((ST_boxf)boxes.plus(bi).getStruct()).UR.y;
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).UR.y= -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y;
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v;
|
||||
}
|
||||
}
|
||||
else flip = 0;
|
||||
@ -946,20 +948,20 @@ try {
|
||||
for (bi = 0, pi = 0; bi < boxn; bi++) {
|
||||
next = prev = 0;
|
||||
if (bi > 0)
|
||||
prev = (boxes.plus(bi).getStruct().getStruct("LL").getDouble("y") > boxes.plus(bi-1).getStruct().getStruct("LL").getDouble("y")) ? -1 : 1;
|
||||
prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y) ? -1 : 1;
|
||||
if (bi < boxn - 1)
|
||||
next = (boxes.plus(bi+1).getStruct().getStruct("LL").getDouble("y") > boxes.plus(bi).getStruct().getStruct("LL").getDouble("y")) ? 1 : -1;
|
||||
next = (((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1;
|
||||
if (prev != next) {
|
||||
if (next == -1 || prev == 1) {
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
} else {
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
}
|
||||
}
|
||||
else if (prev == 0) { /* single box */
|
||||
@ -978,20 +980,20 @@ UNSUPPORTED("9idk92zg2ysz316lfwzvvvde6"); // return NULL;
|
||||
for (bi = boxn - 1; bi >= 0; bi--) {
|
||||
next = prev = 0;
|
||||
if (bi < boxn - 1)
|
||||
prev = (boxes.plus(bi).getStruct().getStruct("LL").getDouble("y") > boxes.plus(bi+1).getStruct().getStruct("LL").getDouble("y")) ? -1 : 1;
|
||||
prev = (((ST_boxf)boxes.plus(bi).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi+1).getStruct()).LL.y) ? -1 : 1;
|
||||
if (bi > 0)
|
||||
next = (boxes.plus(bi-1).getStruct().getStruct("LL").getDouble("y") > boxes.plus(bi).getStruct().getStruct("LL").getDouble("y")) ? 1 : -1;
|
||||
next = (((ST_boxf)boxes.plus(bi-1).getStruct()).LL.y > ((ST_boxf)boxes.plus(bi).getStruct()).LL.y) ? 1 : -1;
|
||||
if (prev != next) {
|
||||
if (next == -1 || prev == 1 ) {
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
} else {
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
}
|
||||
}
|
||||
else if (prev == 0) { /* single box */
|
||||
@ -1006,14 +1008,14 @@ UNSUPPORTED("87y5d0ts6xdjyx905bha50f3s"); // /* it went badly, e.g. degene
|
||||
UNSUPPORTED("1qt7hixteu3pt64wk1sqw352a"); // agerr(AGERR, "in routesplines, illegal values of prev %d and next %d, line %d\n", prev, next, 476);
|
||||
UNSUPPORTED("35untdbpd42pt4c74gjbxqx7q"); // return NULL; /* for correctness sake, it's best to just stop */
|
||||
}
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", boxes.plus(bi).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).UR.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).UR.y);
|
||||
Z.z().polypoints.plus(pi).setDouble("x", ((ST_boxf)boxes.plus(bi).getStruct()).LL.x);
|
||||
Z.z().polypoints.plus(pi++).setDouble("y", ((ST_boxf)boxes.plus(bi).getStruct()).LL.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1024,16 +1026,16 @@ UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL;
|
||||
if (flip!=0) {
|
||||
int i;
|
||||
for (bi = 0; bi < boxn; bi++) {
|
||||
int v = (int) boxes.plus(bi).getStruct().getStruct("UR").getDouble("y");
|
||||
boxes.plus(bi).getStruct().getStruct("UR").setDouble("y", -1*boxes.plus(bi).getStruct().getStruct("LL").getDouble("y"));
|
||||
boxes.plus(bi).getStruct().getStruct("LL").setDouble("y", -v);
|
||||
int v = (int) ((ST_boxf)boxes.plus(bi).getStruct()).UR.y;
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).UR.y = -1*((ST_boxf)boxes.plus(bi).getStruct()).LL.y;
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).LL.y = -v;
|
||||
}
|
||||
for (i = 0; i < pi; i++)
|
||||
Z.z().polypoints.plus(i).setDouble("y", -1 * Z.z().polypoints.plus(i).getDouble("y"));
|
||||
}
|
||||
for (bi = 0; bi < boxn; bi++) {
|
||||
boxes.plus(bi).getStruct().getStruct("LL").setDouble("x", INT_MAX);
|
||||
boxes.plus(bi).getStruct().getStruct("UR").setDouble("x", INT_MIN);
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).LL.x = INT_MAX;
|
||||
((ST_boxf)boxes.plus(bi).getStruct()).UR.x = INT_MIN;
|
||||
}
|
||||
poly.setPtr("ps", Z.z().polypoints);
|
||||
poly.setInt("pn", pi);
|
||||
@ -1042,8 +1044,8 @@ UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL;
|
||||
eps.plus(1).getStruct().setDouble("x", pp.getStruct("end").getStruct("p").getDouble("x"));
|
||||
eps.plus(1).getStruct().setDouble("y", pp.getStruct("end").getStruct("p").getDouble("y"));
|
||||
if (Pshortestpath((Ppoly_t) poly.amp(), eps, (Ppoly_t) pl.amp()) < 0) {
|
||||
UNSUPPORTED("5wo4uqzvxd2gjq9bz036zhavp"); // agerr(AGERR, "in routesplines, Pshortestpath failed\n");
|
||||
UNSUPPORTED("11hwqop4xebvtcskop4uhpp01"); // return NULL;
|
||||
System.err.println("in routesplines, Pshortestpath failed\n");
|
||||
return null;
|
||||
}
|
||||
if (polyline!=0) {
|
||||
UNSUPPORTED("48veztc3k9dfw8tqolu7jsktk"); // make_polyline (pl, &spl);
|
||||
@ -1114,7 +1116,7 @@ UNSUPPORTED("7x5kpcbvg4va887hky7ufm45y"); // return NULL; /* Bailout if no mem
|
||||
* to bound the boxes. This will probably mean a bad edge, but we avoid an infinite
|
||||
* loop and we can see the bad edge, and even use the showboxes scaffolding.
|
||||
*/
|
||||
final __struct__<Ppoly_t> polyspl = __struct__.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> polyspl = JUtils.from(Ppoly_t.class);
|
||||
System.err.println("Unable to reclaim box space in spline routing for edge \"%s\" -> \"%s\". Something is probably seriously wrong.\n");
|
||||
make_polyline (pl, polyspl.amp());
|
||||
limitBoxes (boxes, boxn, polyspl.getPtr("ps"), polyspl.getInt("pn"), 10);
|
||||
@ -1198,9 +1200,9 @@ try {
|
||||
/* remove degenerate boxes. */
|
||||
i = 0;
|
||||
for (bi = 0; bi < boxn; bi++) {
|
||||
if (ABS(boxes.plus(bi).getStruct().getStruct("LL").getDouble("y") - boxes.plus(bi).getStruct().getStruct("UR").getDouble("y")) < .01)
|
||||
if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.y - ((ST_boxf)boxes.plus(bi).getStruct()).UR.y) < .01)
|
||||
continue;
|
||||
if (ABS(boxes.plus(bi).getStruct().getStruct("LL").getDouble("x") - boxes.plus(bi).getStruct().getStruct("UR").getDouble("x")) < .01)
|
||||
if (ABS(((ST_boxf)boxes.plus(bi).getStruct()).LL.x - ((ST_boxf)boxes.plus(bi).getStruct()).UR.x) < .01)
|
||||
continue;
|
||||
if (i != bi)
|
||||
boxes.plus(i).setStruct(boxes.plus(bi).getStruct());
|
||||
@ -1241,8 +1243,12 @@ UNSUPPORTED("btmwubugs9vkexo4yb7a5nqel"); // return 1;
|
||||
bb.getStruct("LL").setDouble("x", xy);
|
||||
l = 0;
|
||||
}
|
||||
else if (r == 1)
|
||||
UNSUPPORTED("3naapn9c6ymy8kj291147k4z4"); // xy = ba.getStruct("LL").getDouble("x"), ba.getStruct("LL").getDouble("x") = bb.getStruct("UR").getDouble("x"), bb.getStruct("UR").getDouble("x") = xy, r = 0;
|
||||
else if (r == 1) {
|
||||
xy = (int)(ba.getStruct("LL").getDouble("x"));
|
||||
ba.getStruct("LL").setDouble("x", bb.getStruct("UR").getDouble("x"));
|
||||
bb.getStruct("UR").setDouble("x", xy);
|
||||
r = 0;
|
||||
}
|
||||
else if (d == 1)
|
||||
UNSUPPORTED("eg1w87s0blk4i583rqumhmv6n"); // xy = ba.getStruct("UR").getDouble("y"), ba.getStruct("UR").getDouble("y") = bb.getStruct("LL").getDouble("y"), bb.getStruct("LL").getDouble("y") = xy, d = 0;
|
||||
else if (u == 1)
|
||||
@ -1266,70 +1272,70 @@ UNSUPPORTED("2cnb1bdjh6y26f98vonla73qa"); // bb.getStruct("UR").getDouble("y"
|
||||
xoverlap = overlap(ba.getStruct("LL").getDouble("x"), ba.getStruct("UR").getDouble("x"), bb.getStruct("LL").getDouble("x"), bb.getStruct("UR").getDouble("x"));
|
||||
yoverlap = overlap(ba.getStruct("LL").getDouble("y"), ba.getStruct("UR").getDouble("y"), bb.getStruct("LL").getDouble("y"), bb.getStruct("UR").getDouble("y"));
|
||||
if (xoverlap!=0 && yoverlap!=0) {
|
||||
UNSUPPORTED("d2y9tmfuv1tsgkmmjchguto8b"); // if (xoverlap < yoverlap) {
|
||||
UNSUPPORTED("1wqz597xk17qe9z6tjsf0c3cy"); // if (ba.getStruct("UR").getDouble("x") - ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") - bb.getStruct("LL").getDouble("x")) {
|
||||
UNSUPPORTED("c9abicea7ozw5xtcem9pfdfh1"); // /* take space from ba */
|
||||
if (xoverlap < yoverlap) {
|
||||
if (ba.getStruct("UR").getDouble("x") - ba.getStruct("LL").getDouble("x") > bb.getStruct("UR").getDouble("x") - bb.getStruct("LL").getDouble("x")) {
|
||||
/* take space from ba */
|
||||
UNSUPPORTED("5dqxf3gq05pjtobtnru1g2tuj"); // if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x"))
|
||||
UNSUPPORTED("8gz6k803qp9zyw9s459cpp039"); // ba.getStruct("UR").getDouble("x") = bb.getStruct("LL").getDouble("x");
|
||||
UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else
|
||||
UNSUPPORTED("5r6ck8hfb1cxywn9go61se9kx"); // ba.getStruct("LL").getDouble("x") = bb.getStruct("UR").getDouble("x");
|
||||
UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else {
|
||||
UNSUPPORTED("6f5ihsq4qpci45h8av0c9wdi4"); // /* take space from bb */
|
||||
UNSUPPORTED("5dqxf3gq05pjtobtnru1g2tuj"); // if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x"))
|
||||
UNSUPPORTED("aojz6tby78spomt80sc91qedn"); // bb.getStruct("LL").getDouble("x") = ba.getStruct("UR").getDouble("x");
|
||||
UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else
|
||||
UNSUPPORTED("cdx834oywc193yujb6sgnv8m7"); // bb.getStruct("UR").getDouble("x") = ba.getStruct("LL").getDouble("x");
|
||||
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
|
||||
UNSUPPORTED("6mdyr1xpycmbl0dew79oujjj4"); // } else { /* symmetric for y coords */
|
||||
UNSUPPORTED("18cdu0l0poruy7djzfr7vazf3"); // if (ba.getStruct("UR").getDouble("y") - ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y") - bb.getStruct("LL").getDouble("y")) {
|
||||
UNSUPPORTED("c9abicea7ozw5xtcem9pfdfh1"); // /* take space from ba */
|
||||
UNSUPPORTED("ahgq8sh8si0vwzdw93diqa9e"); // if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
|
||||
UNSUPPORTED("n1xvon1d7b8odl1mhbw8fsc2"); // ba.getStruct("UR").getDouble("y") = bb.getStruct("LL").getDouble("y");
|
||||
UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else
|
||||
UNSUPPORTED("3h281jzhb4w3dt2115b900130"); // ba.getStruct("LL").getDouble("y") = bb.getStruct("UR").getDouble("y");
|
||||
UNSUPPORTED("a47jqpic91ky93e1ohxv590l5"); // } else {
|
||||
UNSUPPORTED("6f5ihsq4qpci45h8av0c9wdi4"); // /* take space from bb */
|
||||
UNSUPPORTED("ahgq8sh8si0vwzdw93diqa9e"); // if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
|
||||
UNSUPPORTED("5ws4vr52jf28wejgwepvdf82g"); // bb.getStruct("LL").getDouble("y") = ba.getStruct("UR").getDouble("y");
|
||||
UNSUPPORTED("9acag2yacl63g8rg6r1alu62x"); // else
|
||||
UNSUPPORTED("cityroxzrcmi8458m7ynqkew9"); // bb.getStruct("UR").getDouble("y") = ba.getStruct("LL").getDouble("y");
|
||||
UNSUPPORTED("6eq5kf0bj692bokt0bixy1ixh"); // }
|
||||
UNSUPPORTED("6t98dcecgbvbvtpycwiq2ynnj"); // }
|
||||
} else {
|
||||
/* take space from bb */
|
||||
if (ba.getStruct("UR").getDouble("x") < bb.getStruct("UR").getDouble("x"))
|
||||
bb.getStruct("LL").setDouble("x", ba.getStruct("UR").getDouble("x"));
|
||||
else
|
||||
bb.getStruct("UR").setDouble("x", ba.getStruct("LL").getDouble("x"));
|
||||
}
|
||||
} else { /* symmetric for y coords */
|
||||
if (ba.getStruct("UR").getDouble("y") - ba.getStruct("LL").getDouble("y") > bb.getStruct("UR").getDouble("y") - bb.getStruct("LL").getDouble("y")) {
|
||||
/* take space from ba */
|
||||
if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
|
||||
ba.getStruct("UR").setDouble("y", bb.getStruct("LL").getDouble("y"));
|
||||
else
|
||||
ba.getStruct("LL").setDouble("y", bb.getStruct("UR").getDouble("y"));
|
||||
} else {
|
||||
/* take space from bb */
|
||||
if (ba.getStruct("UR").getDouble("y") < bb.getStruct("UR").getDouble("y"))
|
||||
bb.getStruct("LL").setDouble("y", ba.getStruct("UR").getDouble("y"));
|
||||
else
|
||||
bb.getStruct("UR").setDouble("y", ba.getStruct("LL").getDouble("y"));
|
||||
}
|
||||
}
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") < boxes.plus(0).getStruct().getStruct("LL").getDouble("x")
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("x") > boxes.plus(0).getStruct().getStruct("UR").getDouble("x")
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("y") < boxes.plus(0).getStruct().getStruct("LL").getDouble("y")
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("y") > boxes.plus(0).getStruct().getStruct("UR").getDouble("y")) {
|
||||
}
|
||||
}
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y
|
||||
|| thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y) {
|
||||
/*if (Verbose) {
|
||||
fprintf(stderr, "in checkpath, start port not in first box\n");
|
||||
printpath(thepath);
|
||||
}*/
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") < boxes.plus(0).getStruct().getStruct("LL").getDouble("x"))
|
||||
thepath.getStruct("start").getStruct("p").setDouble("x", boxes.plus(0).getStruct().getStruct("LL").getDouble("x"));
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") > boxes.plus(0).getStruct().getStruct("UR").getDouble("x"))
|
||||
thepath.getStruct("start").getStruct("p").setDouble("x", boxes.plus(0).getStruct().getStruct("UR").getDouble("x"));
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("y") < boxes.plus(0).getStruct().getStruct("LL").getDouble("y"))
|
||||
thepath.getStruct("start").getStruct("p").setDouble("y", boxes.plus(0).getStruct().getStruct("LL").getDouble("y"));
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("y") > boxes.plus(0).getStruct().getStruct("UR").getDouble("y"))
|
||||
thepath.getStruct("start").getStruct("p").setDouble("y", boxes.plus(0).getStruct().getStruct("UR").getDouble("y"));
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(0).getStruct()).LL.x)
|
||||
thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).LL.x);
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(0).getStruct()).UR.x)
|
||||
thepath.getStruct("start").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(0).getStruct()).UR.x);
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(0).getStruct()).LL.y)
|
||||
thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).LL.y);
|
||||
if (thepath.getStruct("start").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(0).getStruct()).UR.y)
|
||||
thepath.getStruct("start").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(0).getStruct()).UR.y);
|
||||
}
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") < boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("x")
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("x") > boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("x")
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("y") < boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("y")
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("y") > boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("y")) {
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y
|
||||
|| thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y) {
|
||||
/*if (Verbose) {
|
||||
fprintf(stderr, "in checkpath, end port not in last box\n");
|
||||
printpath(thepath);
|
||||
}*/
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") < boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("x"))
|
||||
thepath.getStruct("end").getStruct("p").setDouble("x", boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("x"));
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") > boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("x"))
|
||||
thepath.getStruct("end").getStruct("p").setDouble("x", boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("x"));
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("y") < boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("y"))
|
||||
thepath.getStruct("end").getStruct("p").setDouble("y", boxes.plus(boxn - 1).getStruct().getStruct("LL").getDouble("y"));
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("y") > boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("y"))
|
||||
thepath.getStruct("end").getStruct("p").setDouble("y", boxes.plus(boxn - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x)
|
||||
thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.x);
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("x") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x)
|
||||
thepath.getStruct("end").getStruct("p").setDouble("x", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.x);
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("y") < ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y)
|
||||
thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).LL.y);
|
||||
if (thepath.getStruct("end").getStruct("p").getDouble("y") > ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y)
|
||||
thepath.getStruct("end").getStruct("p").setDouble("y", ((ST_boxf)boxes.plus(boxn - 1).getStruct()).UR.y);
|
||||
}
|
||||
return 0;
|
||||
} finally {
|
||||
|
@ -91,6 +91,9 @@ import h.Agnode_s;
|
||||
import h.Agnodeinfo_t;
|
||||
import h.Agobj_s;
|
||||
import h.Agraphinfo_t;
|
||||
import h.ST_boxf;
|
||||
import h.ST_pointf;
|
||||
import h.ST_port;
|
||||
import h.boxf;
|
||||
import h.inside_t;
|
||||
import h.point;
|
||||
@ -101,10 +104,13 @@ import h.shape_desc;
|
||||
import h.shape_kind;
|
||||
import smetana.core.CFunctionImpl;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__c__fields;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.StarArrayOfPtr;
|
||||
|
||||
public class shapes__c {
|
||||
//1 2digov3edok6d5srhgtlmrycs
|
||||
@ -371,7 +377,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -409,7 +415,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -449,7 +455,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -746,7 +752,7 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//1 8h06z4a8bluhfqji3ysnlr3q8
|
||||
// static port Center =
|
||||
/*private final static __struct__<port> Center = __struct__.from(port.class);
|
||||
/*private final static __struct__<port> Center = JUtils.from(port.class);
|
||||
static {
|
||||
Center.getStruct("p").setDouble("x", 0);
|
||||
Center.getStruct("p").setDouble("y", 0);
|
||||
@ -774,7 +780,7 @@ Center.setInt("side", 0);
|
||||
|
||||
//1 606ee1uued1p0d2o7h96efu9d
|
||||
// static polygon_t p_ellipse =
|
||||
/*public static final __struct__<polygon_t> p_ellipse = __struct__.from(polygon_t.class);
|
||||
/*public static final __struct__<polygon_t> p_ellipse = JUtils.from(polygon_t.class);
|
||||
static {
|
||||
p_ellipse.setInt("regular", 0);
|
||||
p_ellipse.setInt("peripheries", 1);
|
||||
@ -798,7 +804,7 @@ p_ellipse.setDouble("skew", 0.);
|
||||
|
||||
//1 bw9fxu2ppyosdc0fayd10ik29
|
||||
// static polygon_t p_box =
|
||||
/*public final static __struct__<polygon_t> p_box = __struct__.from(polygon_t.class);
|
||||
/*public final static __struct__<polygon_t> p_box = JUtils.from(polygon_t.class);
|
||||
static {
|
||||
p_box.setInt("regular", 0);
|
||||
p_box.setInt("peripheries", 1);
|
||||
@ -994,7 +1000,7 @@ p_box.setDouble("skew", 0.);
|
||||
|
||||
//1 dkgul6r2xulzqk2twms3pswmy
|
||||
// static shape_functions poly_fns =
|
||||
/*public final static __struct__<shape_functions> poly_fns = __struct__.from(shape_functions.class);
|
||||
/*public final static __struct__<shape_functions> poly_fns = JUtils.from(shape_functions.class);
|
||||
static {
|
||||
poly_fns.setPtr("initfn", function(shapes__c.class, "poly_init"));
|
||||
poly_fns.setPtr("freefn", function(shapes__c.class, "poly_free"));
|
||||
@ -2569,9 +2575,9 @@ throw new UnsupportedOperationException();
|
||||
public static void poly_init(Agnode_s n) {
|
||||
ENTERING("a11xv6duihbr3d6gkgo2ye2j5","poly_init");
|
||||
try {
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class), min_bb = __struct__.from(pointf.class), bb = __struct__.from(pointf.class);
|
||||
final __struct__<point> imagesize = __struct__.from(point.class);
|
||||
final __struct__<pointf> P = __struct__.from(pointf.class), Q = __struct__.from(pointf.class), R = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class), min_bb = JUtils.from(pointf.class), bb = JUtils.from(pointf.class);
|
||||
final __struct__<point> imagesize = JUtils.from(point.class);
|
||||
final __struct__<pointf> P = JUtils.from(pointf.class), Q = JUtils.from(pointf.class), R = JUtils.from(pointf.class);
|
||||
__ptr__ vertices = null;
|
||||
CString p, sfile, fxd;
|
||||
double temp, alpha, beta, gamma;
|
||||
@ -2616,7 +2622,7 @@ UNSUPPORTED("cp83hdn3dp0a7rp9bauc3bgki"); // sides = late_int(n, N_sides, 4, 0)
|
||||
UNSUPPORTED("abmuc3vqirf3i48480fj0k14g"); // distortion = late_double(n, N_distortion, 0.0, -100.0);
|
||||
}
|
||||
/* get label dimensions */
|
||||
dimen.____(ND_label(n).getStruct("dimen"));
|
||||
dimen.___(ND_label(n).getStruct("dimen"));
|
||||
/* minimal whitespace around label */
|
||||
if (ROUND(abs(dimen.getDouble("x")))!=0 || ROUND(abs(dimen.getDouble("y")))!=0) {
|
||||
/* padding */
|
||||
@ -2637,8 +2643,8 @@ UNSUPPORTED("afk9bpom7x393euamnvwwkx6b"); // } else
|
||||
UNSUPPORTED("87bdwkkwbzyswxnepdd9bj8mb"); // {((dimen).x += 4*4); ((dimen).y += 2*4);};
|
||||
} else
|
||||
{
|
||||
dimen.setDouble("x", dimen.getDouble("x") + 4*4);
|
||||
dimen.setDouble("y", dimen.getDouble("y") + 2*4);
|
||||
((ST_pointf) dimen).x = dimen.getDouble("x") + 4*4;
|
||||
((ST_pointf) dimen).y = dimen.getDouble("y") + 2*4;
|
||||
};
|
||||
}
|
||||
spacex = dimen.getDouble("x") - ND_label(n).getStruct("dimen").getDouble("x");
|
||||
@ -2683,8 +2689,8 @@ UNSUPPORTED("1x57knvrmlciu7odfroo3paso"); // imagesize.y += 2;
|
||||
UNSUPPORTED("flupwh3kosf3fkhkxllllt1"); // }
|
||||
}
|
||||
/* initialize node bb to labelsize */
|
||||
bb.setDouble("x", ((dimen.getDouble("x"))>(imagesize.getInt("x"))?(dimen.getDouble("x")):(imagesize.getInt("x"))));
|
||||
bb.setDouble("y", ((dimen.getDouble("y"))>(imagesize.getInt("y"))?(dimen.getDouble("y")):(imagesize.getInt("y"))));
|
||||
((ST_pointf) bb).x = ((dimen.getDouble("x"))>(imagesize.getInt("x"))?(dimen.getDouble("x")):(imagesize.getInt("x")));
|
||||
((ST_pointf) bb).y = ((dimen.getDouble("y"))>(imagesize.getInt("y"))?(dimen.getDouble("y")):(imagesize.getInt("y")));
|
||||
/* I don't know how to distort or skew ellipses in postscript */
|
||||
/* Convert request to a polygon with a large number of sides */
|
||||
if ((sides <= 2) && ((distortion != 0.) || (skew != 0.))) {
|
||||
@ -2727,7 +2733,7 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
|
||||
}
|
||||
}
|
||||
/* at this point, bb is the minimum size of node that can hold the label */
|
||||
min_bb.____(bb);
|
||||
min_bb.___(bb);
|
||||
/* increase node size to width/height if needed */
|
||||
fxd = late_string(n, Z.z().N_fixed, new CString("false"));
|
||||
if ((fxd.charAt(0) == 's') && (N(strcmp(fxd,new CString("shape"))))) {
|
||||
@ -2745,9 +2751,9 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
|
||||
bb.setDouble("y", height);
|
||||
} else {
|
||||
width = MAX(width, bb.getDouble("x"));
|
||||
bb.setDouble("x", width);
|
||||
((ST_pointf) bb).x = width;
|
||||
height = MAX(height, bb.getDouble("y"));
|
||||
bb.setDouble("y", height);
|
||||
((ST_pointf) bb).y = height;
|
||||
}
|
||||
/* If regular, make dimensions the same.
|
||||
* Need this to guarantee final node size is regular.
|
||||
@ -2755,13 +2761,13 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
|
||||
if (regular) {
|
||||
width = MAX(bb.getDouble("x"), bb.getDouble("y"));
|
||||
height = width;
|
||||
bb.setDouble("x", width);
|
||||
bb.setDouble("y", width);
|
||||
((ST_pointf) bb).x = width;
|
||||
((ST_pointf) bb).y = width;
|
||||
}
|
||||
/* Compute space available for label. Provides the justification borders */
|
||||
if (N(mapbool(late_string(n, Z.z().N_nojustify, new CString("false"))))) {
|
||||
if (isBox) {
|
||||
ND_label(n).getStruct("space").setDouble("x", MAX(dimen.getDouble("x"),bb.getDouble("x")) - spacex);
|
||||
((ST_pointf) ND_label(n).getStruct("space")).x = MAX(dimen.getDouble("x"),bb.getDouble("x")) - spacex;
|
||||
}
|
||||
else if (dimen.getDouble("y") < bb.getDouble("y")) {
|
||||
temp = bb.getDouble("x") * sqrt(1.0 - SQR(dimen.getDouble("y")) / SQR(bb.getDouble("y")));
|
||||
@ -2776,7 +2782,7 @@ UNSUPPORTED("1fjwgzo5xkijo98ycmzhal8yv"); // bb = pd->size_gen(bb);
|
||||
temp = bb.getDouble("y") - min_bb.getDouble("y");
|
||||
if (dimen.getDouble("y") < imagesize.getInt("y"))
|
||||
temp += imagesize.getInt("y") - dimen.getDouble("y");
|
||||
ND_label(n).getStruct("space").setDouble("y", dimen.getDouble("y") + temp);
|
||||
((ST_pointf) ND_label(n).getStruct("space")).y = dimen.getDouble("y") + temp;
|
||||
}
|
||||
outp = peripheries;
|
||||
if (peripheries < 1)
|
||||
@ -2831,41 +2837,41 @@ UNSUPPORTED("39rdmp8vl9muqtv7xs1xwtrwk"); // ymax = bb.y/2;
|
||||
gskew = skew / 2.;
|
||||
angle = (sectorangle - M_PI) / 2.;
|
||||
sinx = sin(angle); cosx = cos(angle);
|
||||
R.setDouble("x", .5 * cosx);
|
||||
R.setDouble("y", .5 * sinx);
|
||||
((ST_pointf) R).x = .5 * cosx;
|
||||
((ST_pointf) R).y = .5 * sinx;
|
||||
xmax = ymax = 0.;
|
||||
angle += (M_PI - sectorangle) / 2.;
|
||||
for (i = 0; i < sides; i++) {
|
||||
/*next regular vertex */
|
||||
angle += sectorangle;
|
||||
sinx = sin(angle); cosx = cos(angle);
|
||||
R.setDouble("x", R.getDouble("x") + sidelength * cosx);
|
||||
R.setDouble("y", R.getDouble("y") + sidelength * sinx);
|
||||
((ST_pointf) R).x = R.getDouble("x") + sidelength * cosx;
|
||||
((ST_pointf) R).y = R.getDouble("y") + sidelength * sinx;
|
||||
/*distort and skew */
|
||||
P.setDouble("x", R.getDouble("x") * (skewdist + R.getDouble("y") * gdistortion) + R.getDouble("y") * gskew);
|
||||
P.setDouble("y", R.getDouble("y"));
|
||||
((ST_pointf) P).x = R.getDouble("x") * (skewdist + R.getDouble("y") * gdistortion) + R.getDouble("y") * gskew;
|
||||
((ST_pointf) P).y = R.getDouble("y");
|
||||
/*orient P.x,P.y */
|
||||
alpha = RADIANS(orientation) + atan2(P.getDouble("y"), P.getDouble("x"));
|
||||
sinx = sin(alpha); cosx = cos(alpha);
|
||||
P.setDouble("y", hypot(P.getDouble("x"), P.getDouble("y")));
|
||||
P.setDouble("x", P.getDouble("y"));
|
||||
P.setDouble("x", P.getDouble("x") * cosx);
|
||||
P.setDouble("y", P.getDouble("y") * sinx);
|
||||
((ST_pointf) P).y = hypot(P.getDouble("x"), P.getDouble("y"));
|
||||
((ST_pointf) P).x = P.getDouble("y");
|
||||
((ST_pointf) P).x = P.getDouble("x") * cosx;
|
||||
((ST_pointf) P).y = P.getDouble("y") * sinx;
|
||||
/*scale for label */
|
||||
P.setDouble("x", P.getDouble("x") * bb.getDouble("x"));
|
||||
P.setDouble("y", P.getDouble("y") * bb.getDouble("y"));
|
||||
((ST_pointf) P).x = P.getDouble("x") * bb.getDouble("x");
|
||||
((ST_pointf) P).y = P.getDouble("y") * bb.getDouble("y");
|
||||
/*find max for bounding box */
|
||||
xmax = MAX(fabs(P.getDouble("x")), xmax);
|
||||
ymax = MAX(fabs(P.getDouble("y")), ymax);
|
||||
/* store result in array of points */
|
||||
vertices.plus(i).setStruct(P);
|
||||
if (isBox) { /* enforce exact symmetry of box */
|
||||
vertices.plus(1).setDouble("x", -P.getDouble("x"));
|
||||
vertices.plus(1).setDouble("y", P.getDouble("y"));
|
||||
vertices.plus(2).setDouble("x", -P.getDouble("x"));
|
||||
vertices.plus(2).setDouble("y", -P.getDouble("y"));
|
||||
vertices.plus(3).setDouble("x", P.getDouble("x"));
|
||||
vertices.plus(3).setDouble("y", -P.getDouble("y"));
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).x = -P.getDouble("x");
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(1)).getInternalArray().getInternal(0)))).y = P.getDouble("y");
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).x = -P.getDouble("x");
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(2)).getInternalArray().getInternal(0)))).y = -P.getDouble("y");
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).x = P.getDouble("x");
|
||||
((ST_pointf)((__c__fields)(((StarArrayOfPtr) vertices.plus(3)).getInternalArray().getInternal(0)))).y = -P.getDouble("y");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -2873,14 +2879,14 @@ UNSUPPORTED("39rdmp8vl9muqtv7xs1xwtrwk"); // ymax = bb.y/2;
|
||||
/* apply minimum dimensions */
|
||||
xmax *= 2.;
|
||||
ymax *= 2.;
|
||||
bb.setDouble("x", MAX(width, xmax));
|
||||
bb.setDouble("y", MAX(height, ymax));
|
||||
((ST_pointf) bb).x = MAX(width, xmax);
|
||||
((ST_pointf) bb).y = MAX(height, ymax);
|
||||
scalex = bb.getDouble("x") / xmax;
|
||||
scaley = bb.getDouble("y") / ymax;
|
||||
for (i = 0; i < sides; i++) {
|
||||
P.____(vertices.plus(i));
|
||||
P.setDouble("x", P.getDouble("x") * scalex);
|
||||
P.setDouble("y", P.getDouble("y") * scaley);
|
||||
((ST_pointf) P).x = P.getDouble("x") * scalex;
|
||||
((ST_pointf) P).y = P.getDouble("y") * scaley;
|
||||
vertices.plus(i).setStruct(P);
|
||||
}
|
||||
if (peripheries > 1) {
|
||||
@ -2964,7 +2970,7 @@ throw new UnsupportedOperationException();
|
||||
//static Agnode_s lastn; /* last node argument */
|
||||
//static polygon_t poly;
|
||||
//static int last, outp, sides;
|
||||
//static final __struct__<pointf> O = __struct__.from(pointf.class); /* point (0,0) */
|
||||
//static final __struct__<pointf> O = JUtils.from(pointf.class); /* point (0,0) */
|
||||
//static pointf vertex;
|
||||
//static double xsize, ysize, scalex, scaley, box_URx, box_URy;
|
||||
public static boolean poly_inside(inside_t inside_context, final __struct__<pointf> p) {
|
||||
@ -2976,14 +2982,14 @@ ENTERING("570t4xovyyfqipaikkf63crmk","poly_inside");
|
||||
try {
|
||||
int i, i1, j;
|
||||
boolean s;
|
||||
final __struct__<pointf> P = __struct__.from(pointf.class), Q = __struct__.from(pointf.class), R = __struct__.from(pointf.class);
|
||||
final ST_pointf P = new ST_pointf(), Q = new ST_pointf(), R = new ST_pointf();
|
||||
__ptr__ bp = inside_context.getPtr("s.bp");
|
||||
__ptr__ n = inside_context.getPtr("s.n");
|
||||
P.____(ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))));
|
||||
P.___(ccwrotatepf(p, 90 * GD_rankdir(agraphof(n))));
|
||||
/* Quick test if port rectangle is target */
|
||||
if (bp!=null) {
|
||||
final __struct__<boxf> bbox = __struct__.from(boxf.class);
|
||||
bbox.____(bp.getStruct());
|
||||
final ST_boxf bbox = new ST_boxf();
|
||||
bbox.___(bp.getStruct());
|
||||
return INSIDE(P, bbox);
|
||||
}
|
||||
if (NEQ(n, Z.z().lastn)) {
|
||||
@ -3042,8 +3048,8 @@ UNSUPPORTED("8t3g4d9acruono62leh5a8hxh"); // xsize = ND_ht(n);
|
||||
/* use fast test in case we are converging on a segment */
|
||||
i = Z.z().last % Z.z().sides; /* in case last left over from larger polygon */
|
||||
i1 = (i + 1) % Z.z().sides;
|
||||
Q.____(Z.z().vertex.plus(i + Z.z().outp).getStruct());
|
||||
R.____(Z.z().vertex.plus(i1 + Z.z().outp).getStruct());
|
||||
Q.___(Z.z().vertex.plus(i + Z.z().outp).getStruct());
|
||||
R.___(Z.z().vertex.plus(i1 + Z.z().outp).getStruct());
|
||||
if (N(same_side(P, Z.z().O, Q, R))) /* false if outside the segment's face */
|
||||
return false;
|
||||
/* else inside the segment face... */
|
||||
@ -3430,7 +3436,7 @@ return poly_port_w_(n, portname, compass).copy();
|
||||
private static __struct__<port> poly_port_w_(Agnode_s n, CString portname, CString compass) {
|
||||
ENTERING("5k2b9gfpwm2tj3zmzniuz9azt","poly_port");
|
||||
try {
|
||||
final __struct__<port> rv= __struct__.from(port.class);
|
||||
final __struct__<port> rv= JUtils.from(port.class);
|
||||
boxf bp;
|
||||
int sides; /* bitmap of which sides the port lies along */
|
||||
if (portname.charAt(0) == '\0')
|
||||
@ -4890,11 +4896,11 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//3 ckbg1dyu9jzx7g0c9dbriez7r
|
||||
// port resolvePort(node_t * n, node_t * other, port * oldport)
|
||||
public static __struct__<port> resolvePort(Agnode_s n, Agnode_s other, port oldport) {
|
||||
public static ST_port resolvePort(Agnode_s n, Agnode_s other, port oldport) {
|
||||
// WARNING!! STRUCT
|
||||
return resolvePort_w_(n, other, oldport).copy();
|
||||
}
|
||||
private static __struct__<port> resolvePort_w_(Agnode_s n, Agnode_s other, port oldport) {
|
||||
private static ST_port resolvePort_w_(Agnode_s n, Agnode_s other, port oldport) {
|
||||
ENTERING("ckbg1dyu9jzx7g0c9dbriez7r","resolvePort");
|
||||
try {
|
||||
UNSUPPORTED("1aa44pvk8su341rug2x5h5h9o"); // port resolvePort(node_t * n, node_t * other, port * oldport)
|
||||
|
@ -48,6 +48,7 @@ import static gen.lib.cgraph.edge__c.aghead;
|
||||
import static gen.lib.cgraph.edge__c.agtail;
|
||||
import static gen.lib.cgraph.obj__c.agraphof;
|
||||
import static gen.lib.common.arrows__c.arrowEndClip;
|
||||
import static gen.lib.common.arrows__c.arrowStartClip;
|
||||
import static gen.lib.common.arrows__c.arrow_flags;
|
||||
import static gen.lib.common.emit__c.update_bb_bz;
|
||||
import static gen.lib.common.memory__c.zmalloc;
|
||||
@ -83,6 +84,8 @@ import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.Agedge_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.ST_boxf;
|
||||
import h.ST_pointf;
|
||||
import h.bezier;
|
||||
import h.boxf;
|
||||
import h.inside_t;
|
||||
@ -93,6 +96,7 @@ import h.splineInfo;
|
||||
import h.splines;
|
||||
import h.textlabel_t;
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.MutableDouble;
|
||||
import smetana.core.__array_of_struct__;
|
||||
import smetana.core.__ptr__;
|
||||
@ -363,7 +367,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -401,7 +405,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -441,7 +445,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -770,8 +774,8 @@ UNSUPPORTED("dzbrwr2ulubtjkbd8j2o4yyov"); // arrowOrthoClip(e, ps, *startp,
|
||||
}
|
||||
else {
|
||||
if (sflag[0]!=0)
|
||||
UNSUPPORTED("startp[0] =");
|
||||
//arrowStartClip(e, ps, startp, endp, spl, sflag);
|
||||
startp[0] =
|
||||
arrowStartClip(e, ps, startp[0], endp[0], spl, sflag[0]);
|
||||
if (eflag[0]!=0)
|
||||
endp[0] =
|
||||
arrowEndClip(e, ps, startp[0], endp[0], spl, eflag[0]);
|
||||
@ -791,7 +795,7 @@ ENTERING("q4t1ywnk3wm1vyh5seoj7xye","bezier_clip");
|
||||
try {
|
||||
final __array_of_struct__ seg = __array_of_struct__.malloc(pointf.class, 4);
|
||||
final __array_of_struct__ best = __array_of_struct__.malloc(pointf.class, 4);
|
||||
final __struct__<pointf> pt = __struct__.from(pointf.class), opt = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> pt = JUtils.from(pointf.class), opt = JUtils.from(pointf.class);
|
||||
__ptr__ left, right;
|
||||
final MutableDouble low = new MutableDouble(0), high = new MutableDouble(0);
|
||||
double t;
|
||||
@ -801,13 +805,13 @@ try {
|
||||
if (left_inside) {
|
||||
left = null;
|
||||
right = (pointf) seg.asPtr();
|
||||
pt.____(sp.plus(0).getStruct());
|
||||
pt.___(sp.plus(0).getStruct());
|
||||
idir = low;
|
||||
odir = high;
|
||||
} else {
|
||||
left = (pointf) seg.asPtr();
|
||||
right = null;
|
||||
pt.____(sp.plus(3).getStruct());
|
||||
pt.___(sp.plus(3).getStruct());
|
||||
idir = high;
|
||||
odir = low;
|
||||
}
|
||||
@ -815,9 +819,9 @@ try {
|
||||
low.setValue(0.0);
|
||||
high.setValue(1.0);
|
||||
do {
|
||||
opt.____(pt);
|
||||
opt.___(pt);
|
||||
t = (high.getValue() + low.getValue()) / 2.0;
|
||||
pt.____(Bezier(sp, 3, t, left, right));
|
||||
pt.___(Bezier(sp, 3, t, left, right));
|
||||
if ((Boolean) ((CFunction)inside).exe(inside_context, pt)) {
|
||||
idir.setValue(t);
|
||||
} else {
|
||||
@ -931,7 +935,7 @@ LEAVING("bdirexg1qdtophlh0ofjvsmj7","new_spline");
|
||||
public static void clip_and_install(Agedge_s fe, Agnode_s hn, __ptr__ ps, int pn, __ptr__ info) {
|
||||
ENTERING("duednxyuvf6xrff752uuv620f","clip_and_install");
|
||||
try {
|
||||
final __struct__<pointf> p2 = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> p2 = JUtils.from(pointf.class);
|
||||
bezier newspl;
|
||||
Agnode_s tn;
|
||||
int start[] = new int[] {0};
|
||||
@ -940,7 +944,7 @@ try {
|
||||
Agraph_s g;
|
||||
Agedge_s orig;
|
||||
boxf tbox=null, hbox=null;
|
||||
final __struct__<inside_t> inside_context = __struct__.from(inside_t.class);
|
||||
final __struct__<inside_t> inside_context = JUtils.from(inside_t.class);
|
||||
tn = agtail(fe);
|
||||
g = agraphof(tn);
|
||||
newspl = new_spline(fe, pn);
|
||||
@ -1058,14 +1062,14 @@ LEAVING("25ndy15kghfrogsv0b0o0xkgv","conc_slope");
|
||||
|
||||
//3 egq4f4tmy1dhyj6jpj92r7xhu
|
||||
// void add_box(path * P, boxf b)
|
||||
public static void add_box(path P, final __struct__<boxf> b) {
|
||||
public static void add_box(path P, final ST_boxf b) {
|
||||
// WARNING!! STRUCT
|
||||
add_box_w_(P, b.copy());
|
||||
}
|
||||
private static void add_box_w_(path P, final __struct__<boxf> b) {
|
||||
private static void add_box_w_(path P, final ST_boxf b) {
|
||||
ENTERING("egq4f4tmy1dhyj6jpj92r7xhu","add_box");
|
||||
try {
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
{
|
||||
P.getArrayOfPtr("boxes").plus(P.getInt("nbox")).setStruct(b);
|
||||
P.setInt("nbox", P.getInt("nbox")+1);
|
||||
@ -1087,7 +1091,7 @@ try {
|
||||
Agnode_s n;
|
||||
CFunction pboxfn;
|
||||
n = agtail(e);
|
||||
if (ED_tail_port(e).getInt("dyna")!=0)
|
||||
if (ED_tail_port(e).dyna!=0)
|
||||
ED_tail_port(e, resolvePort(agtail(e), aghead(e), ED_tail_port(e).amp()));
|
||||
if (ND_shape(n)!=null)
|
||||
pboxfn = (CFunction) ND_shape(n).getPtr("fns").getPtr("pboxfn");
|
||||
@ -1108,7 +1112,7 @@ try {
|
||||
P.setInt("nbox", 0);
|
||||
P.setPtr("data", e);
|
||||
endp.setStruct("np", P.getStruct("start").getStruct("p"));
|
||||
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_tail_port(e).getInt("side"))!=0)) {
|
||||
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_tail_port(e).side)!=0)) {
|
||||
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
|
||||
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
|
||||
UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) {
|
||||
@ -1174,7 +1178,7 @@ UNSUPPORTED("9352ql3e58qs4fzapgjfrms2s"); // else
|
||||
UNSUPPORTED("2tw6ymudedo6qij3ux424ydsi"); // ED_head_port(orig).clip = 0;
|
||||
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return;
|
||||
}
|
||||
if ((et == 2) && ((side = ED_tail_port(e).getInt("side"))!=0)) {
|
||||
if ((et == 2) && ((side = ED_tail_port(e).side)!=0)) {
|
||||
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
|
||||
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
|
||||
UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) {
|
||||
@ -1259,12 +1263,12 @@ UNSUPPORTED("auefgwb39x5hzqqc9b1zgl239"); // endp->sidemask = (1<<0);
|
||||
break;
|
||||
case 2:
|
||||
if (endp.getInt("sidemask") == (1<<2))
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("LL").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("start").getStruct("p").getDouble("y");
|
||||
else
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("UR").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y");
|
||||
break;
|
||||
case 1:
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("UR").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("start").getStruct("p").getDouble("y");
|
||||
endp.setInt("sidemask", (1<<0));
|
||||
P.getStruct("start").getStruct("p").setDouble("y", P.getStruct("start").getStruct("p").getDouble("y") - 1);
|
||||
break;
|
||||
@ -1307,7 +1311,7 @@ UNSUPPORTED("2w0c22i5xgcch77xd9jg104nw"); // P->end.constrained = NOT(0);
|
||||
P.getStruct("end").setInt("constrained", 0);
|
||||
}
|
||||
endp.setStruct("np", P.getStruct("end").getStruct("p"));
|
||||
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_head_port(e).getInt("side"))!=0)) {
|
||||
if ((et == 1) && (ND_node_type(n) == 0) && ((side = ED_head_port(e).side)!=0)) {
|
||||
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
|
||||
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
|
||||
UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) {
|
||||
@ -1374,7 +1378,7 @@ UNSUPPORTED("dk49xvmby8949ngdmft4sgrox"); // ED_tail_port(orig).clip = 0;
|
||||
UNSUPPORTED("8jqn3kj2hrrlcifbw3x9sf6qu"); // endp->sidemask = side;
|
||||
UNSUPPORTED("a7fgam0j0jm7bar0mblsv3no4"); // return;
|
||||
}
|
||||
if ((et == 2) && ((side = ED_head_port(e).getInt("side"))!=0)) {
|
||||
if ((et == 2) && ((side = ED_head_port(e).side)!=0)) {
|
||||
UNSUPPORTED("ew7nyfe712nsiphifeztwxfop"); // boxf b0, b = endp->nb;
|
||||
UNSUPPORTED("a7lrhlfwr0y475aqjk6abhb3b"); // edge_t* orig;
|
||||
UNSUPPORTED("ait3wtnnvt134z2k87lvhq4ek"); // if (side & (1<<2)) {
|
||||
@ -1459,12 +1463,12 @@ UNSUPPORTED("1r4lctdj9z1ivlz3uqpcj1yzf"); // endp->sidemask = (1<<2);
|
||||
UNSUPPORTED("ai3czg6gaaxspsmndknpyvuiu"); // break;
|
||||
case 2:
|
||||
if (endp.getInt("sidemask") == (1<<2))
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("LL").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y");
|
||||
else
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("UR").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).UR.y = P.getStruct("end").getStruct("p").getDouble("y");
|
||||
break;
|
||||
case 1:
|
||||
endp.getArrayOfStruct("boxes").plus(0).getStruct().getStruct("LL").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y"));
|
||||
((ST_boxf)endp.getArrayOfStruct("boxes").plus(0).getStruct()).LL.y = P.getStruct("end").getStruct("p").getDouble("y");
|
||||
endp.setInt("sidemask", (1<<2));
|
||||
P.getStruct("end").getStruct("p").setDouble("y", P.getStruct("end").getStruct("p").getDouble("y") +1);
|
||||
break;
|
||||
@ -1709,7 +1713,7 @@ ENTERING("3sr8gvj4141qql0v12lb89cyt","selfRight");
|
||||
try {
|
||||
int i, sgn, point_pair;
|
||||
double hx, tx, stepy, dx, dy, width, height;
|
||||
final __struct__<pointf> tp = __struct__.from(pointf.class), hp = __struct__.from(pointf.class), np = __struct__.from(pointf.class);
|
||||
final ST_pointf tp = new ST_pointf(), hp = new ST_pointf(), np = new ST_pointf();
|
||||
Agnode_s n;
|
||||
Agedge_s e;
|
||||
final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 1000);
|
||||
@ -1719,11 +1723,11 @@ try {
|
||||
stepy = (sizey / 2.) / cnt;
|
||||
stepy = MAX(stepy, 2.);
|
||||
pointn = 0;
|
||||
np.____(ND_coord(n));
|
||||
tp.____(ED_tail_port(e).getStruct("p"));
|
||||
np.___(ND_coord(n));
|
||||
tp.___(ED_tail_port(e).getStruct("p"));
|
||||
tp.setDouble("x", tp.getDouble("x") + np.getDouble("x"));
|
||||
tp.setDouble("y", tp.getDouble("y") + np.getDouble("y"));
|
||||
hp.____(ED_head_port(e).getStruct("p"));
|
||||
hp.___(ED_head_port(e).getStruct("p"));
|
||||
hp.setDouble("x", hp.getDouble("x") + np.getDouble("x"));
|
||||
hp.setDouble("y", hp.getDouble("y") + np.getDouble("y"));
|
||||
if (tp.getDouble("y") >= hp.getDouble("y")) sgn = 1;
|
||||
@ -1732,7 +1736,7 @@ try {
|
||||
dy = 0;
|
||||
// certain adjustments are required for some point_pairs in order to improve the
|
||||
// display of the edge path between them
|
||||
point_pair = convert_sides_to_points(ED_tail_port(e).getInt("side"),ED_head_port(e).getInt("side"));
|
||||
point_pair = convert_sides_to_points(ED_tail_port(e).side,ED_head_port(e).side);
|
||||
switch(point_pair){
|
||||
case 32:
|
||||
case 65: if(tp.getDouble("y") == hp.getDouble("y"))
|
||||
@ -1865,12 +1869,12 @@ try {
|
||||
int sw=0;
|
||||
double label_width;
|
||||
textlabel_t l = ED_label(e);
|
||||
if ((N(ED_tail_port(e).getBoolean("defined")) && N(ED_head_port(e).getBoolean("defined"))) ||
|
||||
if ((N(ED_tail_port(e).defined) && N(ED_head_port(e).defined)) ||
|
||||
(
|
||||
N(ED_tail_port(e).getInt("side") & (1<<3)) &&
|
||||
N(ED_head_port(e).getInt("side") & (1<<3)) &&
|
||||
((ED_tail_port(e).getInt("side") != ED_head_port(e).getInt("side")) ||
|
||||
(N(ED_tail_port(e).getInt("side") & ((1<<2)|(1<<0)))))
|
||||
N(ED_tail_port(e).side & (1<<3)) &&
|
||||
N(ED_head_port(e).side & (1<<3)) &&
|
||||
((ED_tail_port(e).side != ED_head_port(e).side) ||
|
||||
(N(ED_tail_port(e).side & ((1<<2)|(1<<0)))))
|
||||
)) {
|
||||
sw = 18;
|
||||
if (l!=null) {
|
||||
@ -1899,18 +1903,18 @@ try {
|
||||
* self edge with all ports inside, on the right, or at most 1 on top
|
||||
* and at most 1 on bottom
|
||||
*/
|
||||
if ((N(ED_tail_port(e).getBoolean("defined")) && N(ED_head_port(e).getBoolean("defined"))) ||
|
||||
if ((N(ED_tail_port(e).defined) && N(ED_head_port(e).defined)) ||
|
||||
(
|
||||
N(ED_tail_port(e).getInt("side") & (1<<3)) &&
|
||||
N(ED_head_port(e).getInt("side") & (1<<3)) &&
|
||||
((ED_tail_port(e).getInt("side") != ED_head_port(e).getInt("side")) ||
|
||||
(N(ED_tail_port(e).getInt("side") & ((1<<2)|(1<<0))))))) {
|
||||
N(ED_tail_port(e).side & (1<<3)) &&
|
||||
N(ED_head_port(e).side & (1<<3)) &&
|
||||
((ED_tail_port(e).side != ED_head_port(e).side) ||
|
||||
(N(ED_tail_port(e).side & ((1<<2)|(1<<0))))))) {
|
||||
selfRight(edges, ind, cnt, sizex, sizey, sinfo);
|
||||
}
|
||||
/* self edge with port on left side */
|
||||
else if ((ED_tail_port(e).getInt("side") & (1<<3))!=0 || (ED_head_port(e).getInt("side") & (1<<3))!=0) {
|
||||
else if ((ED_tail_port(e).side & (1<<3))!=0 || (ED_head_port(e).side & (1<<3))!=0) {
|
||||
/* handle L-R specially */
|
||||
if ((ED_tail_port(e).getInt("side") & (1<<1))!=0 || (ED_head_port(e).getInt("side") & (1<<1))!=0) {
|
||||
if ((ED_tail_port(e).side & (1<<1))!=0 || (ED_head_port(e).side & (1<<1))!=0) {
|
||||
selfTop(edges, ind, cnt, sizex, sizey, sinfo);
|
||||
}
|
||||
else {
|
||||
@ -1918,10 +1922,10 @@ try {
|
||||
}
|
||||
}
|
||||
/* self edge with both ports on top side */
|
||||
else if ((ED_tail_port(e).getInt("side") & (1<<2))!=0) {
|
||||
else if ((ED_tail_port(e).side & (1<<2))!=0) {
|
||||
selfTop(edges, ind, cnt, sizex, sizey, sinfo);
|
||||
}
|
||||
else if ((ED_tail_port(e).getInt("side") & (1<<0))!=0) {
|
||||
else if ((ED_tail_port(e).side & (1<<0))!=0) {
|
||||
selfBottom(edges, ind, cnt, sizex, sizey, sinfo);
|
||||
}
|
||||
else assert(false);
|
||||
|
@ -51,6 +51,7 @@ import h.GVC_s;
|
||||
import h._dt_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -319,7 +320,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -357,7 +358,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -397,7 +398,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -94,6 +94,8 @@ import h.Agedge_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Agsym_s;
|
||||
import h.ST_boxf;
|
||||
import h.ST_port;
|
||||
import h.boxf;
|
||||
import h.fontinfo;
|
||||
import h.nodequeue;
|
||||
@ -103,6 +105,7 @@ import h.shape_kind;
|
||||
import h.textlabel_t;
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
@ -374,7 +377,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -412,7 +415,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -452,7 +455,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -1537,14 +1540,14 @@ LEAVING("bgnk1zwht9rwx6thmly98iofb","noClip");
|
||||
|
||||
//3 9vnr1bc7p533acazoxbhbfmx3
|
||||
// static port chkPort (port (*pf)(node_t*, char*, char*), node_t* n, char* s)
|
||||
public static __struct__<port> chkPort(CFunction pf, Agnode_s n, CString s) {
|
||||
public static ST_port chkPort(CFunction pf, Agnode_s n, CString s) {
|
||||
// WARNING!! STRUCT
|
||||
return chkPort_w_(pf, n, s).copy();
|
||||
}
|
||||
private static __struct__<port> chkPort_w_(CFunction pf, Agnode_s n, CString s) {
|
||||
private static ST_port chkPort_w_(CFunction pf, Agnode_s n, CString s) {
|
||||
ENTERING("9vnr1bc7p533acazoxbhbfmx3","chkPort");
|
||||
try {
|
||||
final __struct__<port> pt = __struct__.from(port.class);
|
||||
final ST_port pt = new ST_port();
|
||||
CString cp=null;
|
||||
if(s!=null)
|
||||
cp= strchr(s,':');
|
||||
@ -1555,8 +1558,8 @@ UNSUPPORTED("971i954brvgqb35cftazlqhon"); // *cp = ':';
|
||||
UNSUPPORTED("2o9oidtrr5gspl1dh6vnz7mlz"); // pt.name = cp+1;
|
||||
}
|
||||
else
|
||||
pt.____((__struct__<port>) pf.exe(n, s, null));
|
||||
pt.setPtr("name", s);
|
||||
pt.___((__struct__<port>) pf.exe(n, s, null));
|
||||
pt.name = s;
|
||||
return pt;
|
||||
} finally {
|
||||
LEAVING("9vnr1bc7p533acazoxbhbfmx3","chkPort");
|
||||
@ -1573,8 +1576,8 @@ ENTERING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge");
|
||||
try {
|
||||
CString str;
|
||||
int r = 0;
|
||||
final __struct__<fontinfo> fi = __struct__.from(fontinfo.class);
|
||||
final __struct__<fontinfo> lfi = __struct__.from(fontinfo.class);
|
||||
final __struct__<fontinfo> fi = JUtils.from(fontinfo.class);
|
||||
final __struct__<fontinfo> lfi = JUtils.from(fontinfo.class);
|
||||
Agraph_s sg = agraphof(agtail(e));
|
||||
fi.setPtr("fontname", null);
|
||||
lfi.setPtr("fontname", null);
|
||||
@ -1643,16 +1646,16 @@ LEAVING("3aqh64lxwv4da2snfe7fvr45b","common_init_edge");
|
||||
|
||||
//3 3mkqvtbyq9j8ktzil6t7vakg5
|
||||
// static boxf addLabelBB(boxf bb, textlabel_t * lp, boolean flipxy)
|
||||
public static __struct__<boxf> addLabelBB(final __struct__<boxf> bb, textlabel_t lp, boolean flipxy) {
|
||||
public static __struct__<boxf> addLabelBB(final ST_boxf bb, textlabel_t lp, boolean flipxy) {
|
||||
// WARNING!! STRUCT
|
||||
return addLabelBB_w_(bb.copy(), lp, flipxy).copy();
|
||||
}
|
||||
private static __struct__<boxf> addLabelBB_w_(final __struct__<boxf> bb, textlabel_t lp, boolean flipxy) {
|
||||
private static __struct__<boxf> addLabelBB_w_(final ST_boxf bb, textlabel_t lp, boolean flipxy) {
|
||||
ENTERING("3mkqvtbyq9j8ktzil6t7vakg5","addLabelBB");
|
||||
try {
|
||||
double width, height;
|
||||
final __struct__<pointf> p = __struct__.from(pointf.class);
|
||||
p.____(lp.getStruct("pos"));
|
||||
final __struct__<pointf> p = JUtils.from(pointf.class);
|
||||
p.___(lp.getStruct("pos"));
|
||||
double min, max;
|
||||
if (flipxy) {
|
||||
height = lp.getStruct("dimen").getDouble("x");
|
||||
@ -1664,16 +1667,16 @@ try {
|
||||
}
|
||||
min = p.getDouble("x") - width / 2.;
|
||||
max = p.getDouble("x") + width / 2.;
|
||||
if (min < bb.getStruct("LL").getDouble("x"))
|
||||
bb.getStruct("LL").setDouble("x", min);
|
||||
if (max > bb.getStruct("UR").getDouble("x"))
|
||||
bb.getStruct("UR").setDouble("x", max);
|
||||
if (min < bb.LL.x)
|
||||
bb.LL.x = min;
|
||||
if (max > bb.UR.x)
|
||||
bb.UR.x = max;
|
||||
min = p.getDouble("y") - height / 2.;
|
||||
max = p.getDouble("y") + height / 2.;
|
||||
if (min < bb.getStruct("LL").getDouble("y"))
|
||||
bb.getStruct("LL").setDouble("y", min);
|
||||
if (max > bb.getStruct("UR").getDouble("y"))
|
||||
bb.getStruct("UR").setDouble("y", max);
|
||||
if (min < bb.LL.y)
|
||||
bb.LL.y = min;
|
||||
if (max > bb.UR.y)
|
||||
bb.UR.y = max;
|
||||
return bb;
|
||||
} finally {
|
||||
LEAVING("3mkqvtbyq9j8ktzil6t7vakg5","addLabelBB");
|
||||
@ -1714,7 +1717,7 @@ throw new UnsupportedOperationException();
|
||||
public static void updateBB(Agraph_s g, textlabel_t lp) {
|
||||
ENTERING("bz7kjecium6a7xa39qfobwwnc","updateBB");
|
||||
try {
|
||||
GD_bb(g).____(addLabelBB(GD_bb(g), lp, GD_flip(g)!=0));
|
||||
GD_bb(g).___(addLabelBB(GD_bb(g), lp, GD_flip(g)!=0));
|
||||
} finally {
|
||||
LEAVING("bz7kjecium6a7xa39qfobwwnc","updateBB");
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class acyclic__c {
|
||||
@ -331,7 +332,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -369,7 +370,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -409,7 +410,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -737,7 +738,7 @@ try {
|
||||
return;
|
||||
ND_mark(n, 1);
|
||||
ND_onstack(n, 1);
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
|
||||
w = aghead(e);
|
||||
if (ND_onstack(w)) {
|
||||
reverse_edge(e);
|
||||
@ -763,8 +764,8 @@ ENTERING("1ejgnwd7ek344caegjwg46n6h","acyclic");
|
||||
try {
|
||||
int c;
|
||||
Agnode_s n;
|
||||
for (c = 0; c < GD_comp(g).getInt("size"); c++) {
|
||||
GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
|
||||
for (c = 0; c < GD_comp(g).size; c++) {
|
||||
GD_nlist(g, GD_comp(g).getFromList(c));
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n))
|
||||
ND_mark(n, 0);
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n))
|
||||
|
@ -54,6 +54,7 @@ import h.aspect_t;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class aspect__c {
|
||||
@ -321,7 +322,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -359,7 +360,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -399,7 +400,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -77,6 +77,7 @@ import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -345,7 +346,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -383,7 +384,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -423,7 +424,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -104,6 +104,7 @@ import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -372,7 +373,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -410,7 +411,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -450,7 +451,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -753,8 +754,8 @@ public static Agnode_s label_vnode(Agraph_s g, Agedge_s orig) {
|
||||
ENTERING("2zn7c6ulmwwzaibdxo127jf04","label_vnode");
|
||||
try {
|
||||
Agnode_s v;
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class);
|
||||
dimen.____(ED_label(orig).getStruct("dimen"));
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class);
|
||||
dimen.___(ED_label(orig).getStruct("dimen"));
|
||||
v = virtual_node(g);
|
||||
ND_label(v, ED_label(orig));
|
||||
ND_lw(v, GD_nodesep(agroot(v)));
|
||||
@ -893,7 +894,7 @@ try {
|
||||
make_chain(g, t, h, e);
|
||||
/* mark as cluster edge */
|
||||
for (ve = ED_to_virt(e); ve!=null && (ND_rank(aghead(ve)) <= ND_rank(h));
|
||||
ve = (Agedge_s) ND_out(aghead(ve)).getArrayOfPtr("list").plus(0).getPtr())
|
||||
ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0))
|
||||
ED_edge_type(ve, 5);
|
||||
}
|
||||
/* else ignore intra-cluster edges at this point */
|
||||
@ -939,7 +940,7 @@ try {
|
||||
if (ND_rank(aghead(rep)) == lastrank)
|
||||
break;
|
||||
incr_width(g, aghead(rep));
|
||||
rep = (Agedge_s) ND_out(aghead(rep)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
rep = (Agedge_s) ND_out(aghead(rep)).getFromList(0);
|
||||
} while (rep!=null);
|
||||
} finally {
|
||||
LEAVING("c45973dtaighb3u0auuekcs1y","merge_chain");
|
||||
@ -1087,8 +1088,8 @@ try {
|
||||
}
|
||||
/* since decompose() is not called on subgraphs */
|
||||
if (NEQ(g, dot_root(g))) {
|
||||
GD_comp(g).setPtr("list", ALLOC_empty(1, GD_comp(g).getPtr("list"), Agnode_s.class));
|
||||
GD_comp(g).getArrayOfPtr("list").plus(0).setPtr(GD_nlist(g));
|
||||
GD_comp(g).reallocEmpty(1, Agnode_s.class);
|
||||
GD_comp(g).setInList(0, GD_nlist(g));
|
||||
}
|
||||
} finally {
|
||||
LEAVING("d0bxlkysxucmww7t74u9krrgz","class2");
|
||||
|
@ -115,6 +115,7 @@ import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.nodequeue;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -383,7 +384,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -421,7 +422,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -461,7 +462,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -871,7 +872,7 @@ try {
|
||||
ED_edge_type(e, type);
|
||||
u = v;
|
||||
ED_count(ve, ED_count(ve) - 1);
|
||||
ve = (Agedge_s) ND_out(aghead(ve)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
ve = (Agedge_s) ND_out(aghead(ve)).getFromList(0);
|
||||
}
|
||||
} else {
|
||||
if (ND_rank(to) - ND_rank(from) == 1) {
|
||||
@ -899,7 +900,7 @@ try {
|
||||
} else
|
||||
e = ve;
|
||||
while (ND_rank(aghead(e)) != ND_rank(to))
|
||||
e = (Agedge_s) ND_out(aghead(e)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
|
||||
if (NEQ(aghead(e), to)) {
|
||||
ve = e;
|
||||
e = virtual_edge(agtail(e), to, orig);
|
||||
@ -958,12 +959,12 @@ try {
|
||||
e = AGMKOUT(e);
|
||||
/* short/flat multi edges */
|
||||
if (mergeable(prev, e)) {
|
||||
UNSUPPORTED("1pv8kbb78w6fs8m3i4x1mrsfv"); // if (ND_rank(agtail(e)) == ND_rank(aghead(e)))
|
||||
UNSUPPORTED("dzrp230epur5myrngxf86icdl"); // ED_to_virt(e) = prev;
|
||||
UNSUPPORTED("7e1uy5mzei37p66t8jp01r3mk"); // else
|
||||
UNSUPPORTED("80avg8pw0q6u1yek5npatayak"); // ED_to_virt(e) = NULL;
|
||||
UNSUPPORTED("2oxl2hzhfzzfn7q7i6phwgkqd"); // if (ED_to_virt(prev) == NULL)
|
||||
UNSUPPORTED("10wljk1lfxrvhkb8y6bzvxz35"); // continue; /* internal edge */
|
||||
if (ND_rank(agtail(e)) == ND_rank(aghead(e)))
|
||||
ED_to_virt(e, prev);
|
||||
else
|
||||
ED_to_virt(e, null);
|
||||
if (ED_to_virt(prev) == null)
|
||||
continue; /* internal edge */
|
||||
UNSUPPORTED("8d5mw7m9lzlseqbyx8a8mncgs"); // merge_chain(subg, e, ED_to_virt(prev), 0);
|
||||
UNSUPPORTED("87mmnlsj8quzlzg0vxax15kt2"); // safe_other_edge(e);
|
||||
UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue;
|
||||
@ -1057,9 +1058,9 @@ try {
|
||||
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
|
||||
v = (Agnode_s) GD_rankleader(g).plus(r).getPtr();
|
||||
/* remove the entire chain */
|
||||
while ((e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(0).getPtr())!=null)
|
||||
while ((e = (Agedge_s) ND_out(v).getFromList(0))!=null)
|
||||
delete_fast_edge(e);
|
||||
while ((e = (Agedge_s) ND_in(v).getArrayOfPtr("list").plus(0).getPtr())!=null)
|
||||
while ((e = (Agedge_s) ND_in(v).getFromList(0))!=null)
|
||||
delete_fast_edge(e);
|
||||
delete_fast_node(dot_root(g), v);
|
||||
GD_rankleader(g).plus(r).setPtr(null);
|
||||
@ -1079,8 +1080,9 @@ ENTERING("ecrplg8hsyl484f9kxc5xp0go","expand_cluster");
|
||||
try {
|
||||
/* build internal structure of the cluster */
|
||||
class2(subg);
|
||||
GD_comp(subg).setInt("size", 1);
|
||||
GD_comp(subg).getArrayOfPtr("list").plus(0).setPtr(GD_nlist(subg));
|
||||
GD_comp(subg).size = 1;
|
||||
// GD_comp(subg).getArrayOfPtr("list").plus(0).setPtr(GD_nlist(subg));
|
||||
GD_comp(subg).setInList(0, GD_nlist(subg));
|
||||
allocate_ranks(subg);
|
||||
build_ranks(subg, 0);
|
||||
merge_ranks(subg);
|
||||
@ -1130,7 +1132,7 @@ UNSUPPORTED("6hyelvzskqfqa07xtgjtvg2is"); // continue;
|
||||
if ((e = ED_to_virt(orig))!=null) {
|
||||
while (e!=null && ND_node_type(vn =aghead(e)) == 1) {
|
||||
ND_clust(vn, clust);
|
||||
e = (Agedge_s) ND_out(aghead(e)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
|
||||
/* trouble if concentrators and clusters are mixed */
|
||||
}
|
||||
}
|
||||
@ -1173,7 +1175,7 @@ try {
|
||||
ND_UF_size(rl, ND_UF_size(rl)+1);
|
||||
for (e = agfstout(subg, v); e!=null; e = agnxtout(subg, e)) {
|
||||
for (r = ND_rank(agtail(e)); r < ND_rank(aghead(e)); r++) {
|
||||
ED_count(ND_out(rl).getArrayOfPtr("list").plus(0).getPtr(), ED_count(ND_out(rl).getArrayOfPtr("list").plus(0).getPtr())+1);
|
||||
ED_count(ND_out(rl).getFromList(0), ED_count(ND_out(rl).getFromList(0))+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1227,7 +1229,7 @@ try {
|
||||
if ((e = ED_to_virt(orig))!=null) {
|
||||
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) {
|
||||
ND_clust(vn, null);
|
||||
e = (Agedge_s) ND_out(aghead(e)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1264,7 +1266,7 @@ try {
|
||||
while (e!=null && (ND_node_type(vn = aghead(e))) == 1) {
|
||||
if (ND_clust(vn) == null)
|
||||
ND_clust(vn, g);
|
||||
e = (Agedge_s) ND_out(aghead(e)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e = (Agedge_s) ND_out(aghead(e)).getFromList(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class compound__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.jmp_buf;
|
||||
|
||||
@ -317,7 +318,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -355,7 +356,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -395,7 +396,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -52,7 +52,6 @@ import static gen.lib.common.utils__c.UF_find;
|
||||
import static smetana.core.JUtils.EQ;
|
||||
import static smetana.core.JUtilsDebug.ENTERING;
|
||||
import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.ALLOC_empty;
|
||||
import static smetana.core.Macro.GD_comp;
|
||||
import static smetana.core.Macro.GD_n_nodes;
|
||||
import static smetana.core.Macro.GD_nlist;
|
||||
@ -70,9 +69,11 @@ import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.Agedge_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.ST_elist;
|
||||
import h.boxf;
|
||||
import h.elist;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
import smetana.core.__struct__;
|
||||
@ -342,7 +343,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -380,7 +381,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -420,7 +421,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -771,10 +772,10 @@ public static void end_component() {
|
||||
ENTERING("5o8hxpr6ppi15pinuy79m7u04","end_component");
|
||||
try {
|
||||
int i;
|
||||
i = GD_comp(Z.z().G_decomp).getInt("size");
|
||||
GD_comp(Z.z().G_decomp).setInt("size", 1+GD_comp(Z.z().G_decomp).getInt("size"));
|
||||
GD_comp(Z.z().G_decomp).setPtr("list", ALLOC_empty(GD_comp(Z.z().G_decomp).getInt("size"), GD_comp(Z.z().G_decomp).getPtr("list"), Agnode_s.class));
|
||||
GD_comp(Z.z().G_decomp).getArrayOfPtr("list").plus(i).setPtr(GD_nlist(Z.z().G_decomp));
|
||||
i = GD_comp(Z.z().G_decomp).size;
|
||||
GD_comp(Z.z().G_decomp).size = 1+GD_comp(Z.z().G_decomp).size;
|
||||
GD_comp(Z.z().G_decomp).reallocEmpty(GD_comp(Z.z().G_decomp).size, Agnode_s.class);
|
||||
GD_comp(Z.z().G_decomp).setInList(i ,GD_nlist(Z.z().G_decomp));
|
||||
} finally {
|
||||
LEAVING("5o8hxpr6ppi15pinuy79m7u04","end_component");
|
||||
}
|
||||
@ -798,8 +799,8 @@ try {
|
||||
vec.plus(2).setStruct(ND_flat_out(n));
|
||||
vec.plus(3).setStruct(ND_flat_in(n));
|
||||
for (c = 0; c <= 3; c++) {
|
||||
if (vec.plus(c).getStruct().getPtr("list")!=null)
|
||||
for (i = 0; (e = (Agedge_s) vec.plus(c).getStruct().getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (((ST_elist) vec.plus(c).getStruct()).listNotNull())
|
||||
for (i = 0; (e = (Agedge_s) ((ST_elist) vec.plus(c).getStruct()).getFromList(i))!=null; i++) {
|
||||
if (EQ(other = aghead(e), n))
|
||||
other = agtail(e);
|
||||
if ((ND_mark(other) != Z.z().Cmark) && (EQ(other, UF_find(other))))
|
||||
@ -825,7 +826,7 @@ try {
|
||||
if (++Z.z().Cmark == 0)
|
||||
Z.z().Cmark = 1;
|
||||
GD_n_nodes(g, 0);
|
||||
GD_comp(g).setInt("size", 0);
|
||||
GD_comp(g).size = 0;
|
||||
for (n = agfstnode(g); n!=null; n = agnxtnode(g, n)) {
|
||||
v = n;
|
||||
if ((pass > 0) && (subg = ND_clust(v))!=null)
|
||||
|
@ -113,6 +113,7 @@ import h.pack_info;
|
||||
import h.pack_mode;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__ptr__;
|
||||
@ -383,7 +384,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -421,7 +422,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -461,7 +462,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -129,15 +129,17 @@ import h.Agedgepair_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.Ppoly_t;
|
||||
import h.ST_boxf;
|
||||
import h.ST_port;
|
||||
import h.attr_state_t;
|
||||
import h.bezier;
|
||||
import h.boxf;
|
||||
import h.path;
|
||||
import h.pathend_t;
|
||||
import h.pointf;
|
||||
import h.port;
|
||||
import h.spline_info_t;
|
||||
import h.splines;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
@ -409,7 +411,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -440,18 +442,18 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//3 1vvsta5i8of59frav6uymguav
|
||||
// static inline boxf boxfof(double llx, double lly, double urx, double ury)
|
||||
public static __struct__<boxf> boxfof(double llx, double lly, double urx, double ury) {
|
||||
public static ST_boxf boxfof(double llx, double lly, double urx, double ury) {
|
||||
// WARNING!! STRUCT
|
||||
return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
}
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
private static ST_boxf boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
b.getStruct("UR").setDouble("y", ury);
|
||||
final ST_boxf b = new ST_boxf();
|
||||
b.LL.x = llx;
|
||||
b.LL.y = lly;
|
||||
b.UR.x = urx;
|
||||
b.UR.y = ury;
|
||||
return b;
|
||||
} finally {
|
||||
LEAVING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
@ -487,7 +489,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -813,7 +815,7 @@ public static boolean spline_merge(Agnode_s n) {
|
||||
ENTERING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
|
||||
try {
|
||||
return ((ND_node_type(n) == 1)
|
||||
&& ((ND_in(n).getInt("size") > 1) || (ND_out(n).getInt("size") > 1)));
|
||||
&& ((ND_in(n).size > 1) || (ND_out(n).size > 1)));
|
||||
} finally {
|
||||
LEAVING("ddeny5ht7w8b16ztj5zt840ld","spline_merge");
|
||||
}
|
||||
@ -844,7 +846,7 @@ LEAVING("36ofw2qfqlh5ci8gc8cfkqgg3","swap_ends_p");
|
||||
|
||||
//1 300wnvw9sndobgke752j9u139
|
||||
// static splineInfo sinfo =
|
||||
/*static final __struct__<splineInfo> sinfo = __struct__.from(splineInfo.class);
|
||||
/*static final __struct__<splineInfo> sinfo = JUtils.from(splineInfo.class);
|
||||
static {
|
||||
sinfo.setPtr("swapEnds", function(dotsplines__c.class, "swap_ends_p"));
|
||||
sinfo.setPtr("splineMerge", function(dotsplines__c.class, "spline_merge"));
|
||||
@ -855,21 +857,21 @@ static {
|
||||
|
||||
//3 3krohso3quojiv4fveh1en7o6
|
||||
// int portcmp(port p0, port p1)
|
||||
public static int portcmp(final __struct__<port> p0, final __struct__<port> p1) {
|
||||
public static int portcmp(final ST_port p0, final ST_port p1) {
|
||||
// WARNING!! STRUCT
|
||||
return portcmp_w_(p0.copy(), p1.copy());
|
||||
}
|
||||
private static int portcmp_w_(final __struct__<port> p0, final __struct__<port> p1) {
|
||||
private static int portcmp_w_(final ST_port p0, final ST_port p1) {
|
||||
ENTERING("3krohso3quojiv4fveh1en7o6","portcmp");
|
||||
try {
|
||||
int rv;
|
||||
if (p1.getBoolean("defined") == false)
|
||||
return (p0.getBoolean("defined") ? 1 : 0);
|
||||
if (p0.getBoolean("defined") == false)
|
||||
if (p1.defined == 0)
|
||||
return (p0.defined!=0 ? 1 : 0);
|
||||
if (p0.defined == 0)
|
||||
return -1;
|
||||
rv = (int) (p0.getStruct("p").getDouble("x") - p1.getStruct("p").getDouble("x"));
|
||||
rv = (int) (p0.p.x - p1.p.x);
|
||||
if (rv == 0)
|
||||
rv = (int) (p0.getStruct("p").getDouble("y") - p1.getStruct("p").getDouble("y"));
|
||||
rv = (int) (p0.p.y - p1.p.y);
|
||||
return rv;
|
||||
} finally {
|
||||
LEAVING("3krohso3quojiv4fveh1en7o6","portcmp");
|
||||
@ -893,7 +895,7 @@ try {
|
||||
lp = list;
|
||||
olp = old.getArrayOfPtr("list").plus(sz - 1).asPtr();
|
||||
for (i = 0; i < sz; i++) { /* reverse list of points */
|
||||
lp.getStruct().____(olp.getStruct());
|
||||
lp.getStruct().___(olp.getStruct());
|
||||
lp=lp.plus(1);
|
||||
olp=olp.plus(-1);
|
||||
}
|
||||
@ -1024,12 +1026,12 @@ ENTERING("6agx6m2qof9lg57co232lwakj","_dot_splines");
|
||||
try {
|
||||
int i, j, k, n_nodes, n_edges, ind, cnt;
|
||||
Agnode_s n;
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = __struct__.from(Agedgeinfo_t.class), fwdedgebi = __struct__.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = __struct__.from(Agedgepair_s.class), fwdedgeb = __struct__.from(Agedgepair_s.class);
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class);
|
||||
Agedge_s e, e0, e1, ea, eb, le0, le1;
|
||||
__ptr__ edges;
|
||||
path P;
|
||||
final __struct__<spline_info_t> sd = __struct__.from(spline_info_t.class);
|
||||
final __struct__<spline_info_t> sd = JUtils.from(spline_info_t.class);
|
||||
int et = (GD_flags(g) & (7 << 1));
|
||||
fwdedgea.getStruct("out").getStruct("base").setPtr("data", fwdedgeai.amp());
|
||||
fwdedgeb.getStruct("out").getStruct("base").setPtr("data", fwdedgebi.amp());
|
||||
@ -1079,7 +1081,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
|
||||
if ((ND_node_type(n) != 0) &&
|
||||
((Boolean)Z.z().sinfo.call("splineMerge", n) == false))
|
||||
continue;
|
||||
for (k = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(k).getPtr())!=null; k++) {
|
||||
for (k = 0; (e = (Agedge_s) ND_out(n).getFromList(k))!=null; k++) {
|
||||
if ((ED_edge_type(e) == 4)
|
||||
|| (ED_edge_type(e) == 6))
|
||||
continue;
|
||||
@ -1088,14 +1090,14 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
|
||||
if (n_edges % 128 == 0)
|
||||
edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class);
|
||||
}
|
||||
if (ND_flat_out(n).getPtr("list")!=null)
|
||||
for (k = 0; (e = (Agedge_s) ND_flat_out(n).getArrayOfPtr("list").plus(k).getPtr())!=null; k++) {
|
||||
if (ND_flat_out(n).listNotNull())
|
||||
for (k = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(k))!=null; k++) {
|
||||
setflags(e, 2, 0, 128);
|
||||
edges.plus(n_edges++).setPtr(e);
|
||||
if (n_edges % 128 == 0)
|
||||
edges = ALLOC_empty (n_edges + 128, edges, Agedge_s.class);
|
||||
}
|
||||
if (ND_other(n).getPtr("list")!=null) {
|
||||
if (ND_other(n).listNotNull()) {
|
||||
/* In position, each node has its rw stored in mval and,
|
||||
* if a node is part of a loop, rw may be increased to
|
||||
* reflect the loops and associated labels. We restore
|
||||
@ -1106,7 +1108,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
|
||||
ND_rw(n, ND_mval(n));
|
||||
ND_mval(n, tmp);
|
||||
}
|
||||
for (k = 0; (e = (Agedge_s) ND_other(n).getArrayOfPtr("list").plus(k).getPtr())!=null; k++) {
|
||||
for (k = 0; (e = (Agedge_s) ND_other(n).getFromList(k))!=null; k++) {
|
||||
setflags(e, 0, 0, 128);
|
||||
edges.plus(n_edges++).setPtr(e);
|
||||
if (n_edges % 128 == 0)
|
||||
@ -1141,7 +1143,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
|
||||
boolean havePorts;
|
||||
ind = i;
|
||||
le0 = getmainedge((e0 = (Agedge_s) edges.plus(i++).getPtr()));
|
||||
if (ED_tail_port(e0).getBoolean("defined") || ED_head_port(e0).getBoolean("defined")) {
|
||||
if (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) {
|
||||
havePorts = NOT(false);
|
||||
ea = e0;
|
||||
} else {
|
||||
@ -1156,7 +1158,7 @@ UNSUPPORTED("46btiag50nczzur103eqhjcup"); // goto finish;
|
||||
if (NEQ(le0, (le1 = getmainedge((e1 = (Agedge_s) edges.plus(i).getPtr())))))
|
||||
break;
|
||||
if (ED_adjacent(e0)!=0) continue; /* all flat adjacent edges at once */
|
||||
if (ED_tail_port(e1).getBoolean("defined") || ED_head_port(e1).getBoolean("defined")) {
|
||||
if (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) {
|
||||
if (N(havePorts)) break;
|
||||
else
|
||||
eb = e1;
|
||||
@ -1280,14 +1282,14 @@ LEAVING("5n306wbdfjbfnimdo9lg6jjaa","dot_splines");
|
||||
public static void place_vnlabel(Agnode_s n) {
|
||||
ENTERING("8jja9ukzsq8tlb9yy7uzavg91","place_vnlabel");
|
||||
try {
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class);
|
||||
double width;
|
||||
Agedge_s e;
|
||||
if (ND_in(n).getInt("size") == 0)
|
||||
if (ND_in(n).size == 0)
|
||||
return; /* skip flat edge labels here */
|
||||
for (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(0).getPtr(); ED_edge_type(e) != 0;
|
||||
for (e = (Agedge_s) ND_out(n).getFromList(0); ED_edge_type(e) != 0;
|
||||
e = ED_to_orig(e));
|
||||
dimen.____(ED_label(e).getStruct("dimen"));
|
||||
dimen.___(ED_label(e).getStruct("dimen"));
|
||||
width = GD_flip(agraphof(n))!=0 ? dimen.getDouble("y") : dimen.getDouble("x");
|
||||
ED_label(e).getStruct("pos").setDouble("x", ND_coord(n).getDouble("x") + width / 2.0);
|
||||
ED_label(e).getStruct("pos").setDouble("y", ND_coord(n).getDouble("y"));
|
||||
@ -1310,7 +1312,7 @@ try {
|
||||
f1 = hint1;
|
||||
else {
|
||||
if (EQ(agtail(e), aghead(e)))
|
||||
if (ED_tail_port(e).getBoolean("defined") || ED_head_port(e).getBoolean("defined"))
|
||||
if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0)
|
||||
f1 = 4;
|
||||
else
|
||||
f1 = 8;
|
||||
@ -1343,8 +1345,8 @@ LEAVING("598jn37hjkm7j0kcg2nmdvlwq","setflags");
|
||||
public static int edgecmp(__ptr__ ptr0, __ptr__ ptr1) {
|
||||
ENTERING("1nf1s6wkn35ptjn884ii56fh","edgecmp");
|
||||
try {
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = __struct__.from(Agedgeinfo_t.class), fwdedgebi = __struct__.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = __struct__.from(Agedgepair_s.class), fwdedgeb = __struct__.from(Agedgepair_s.class);
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class);
|
||||
Agedge_s e0, e1, ea, eb, le0, le1;
|
||||
int et0, et1, v0, v1, rv;
|
||||
double t0, t1;
|
||||
@ -1373,12 +1375,12 @@ try {
|
||||
/* This provides a cheap test for edges having the same set of endpoints. */
|
||||
if (AGSEQ(le0) != AGSEQ(le1))
|
||||
return (AGSEQ(le0) - AGSEQ(le1));
|
||||
ea = (ED_tail_port(e0).getBoolean("defined") || ED_head_port(e0).getBoolean("defined")) ? e0 : le0;
|
||||
ea = (ED_tail_port(e0).defined!=0 || ED_head_port(e0).defined!=0) ? e0 : le0;
|
||||
if ((ED_tree_index(ea) & 32)!=0) {
|
||||
MAKEFWDEDGE(fwdedgea.getStruct("out").amp(), ea);
|
||||
ea = fwdedgea.getStruct("out").amp();
|
||||
}
|
||||
eb = (ED_tail_port(e1).getBoolean("defined") || ED_head_port(e1).getBoolean("defined")) ? e1 : le1;
|
||||
eb = (ED_tail_port(e1).defined!=0 || ED_head_port(e1).defined!=0) ? e1 : le1;
|
||||
if ((ED_tree_index(eb) & 32)!=0) {
|
||||
MAKEFWDEDGE(fwdedgeb.getStruct("out").amp(), eb);
|
||||
eb = fwdedgeb.getStruct("out").amp();
|
||||
@ -1676,13 +1678,13 @@ public static int edgelblcmpfn(__ptr__ ptr0, __ptr__ ptr1) {
|
||||
ENTERING("bmsa24i3avg14po4sp17yh89k","edgelblcmpfn");
|
||||
try {
|
||||
Agedge_s e0, e1;
|
||||
final __struct__<pointf> sz0 = __struct__.from(pointf.class), sz1 = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> sz0 = JUtils.from(pointf.class), sz1 = JUtils.from(pointf.class);
|
||||
e0 = (Agedge_s) ptr0.getPtr();
|
||||
e1 = (Agedge_s) ptr1.getPtr();
|
||||
if (ED_label(e0)!=null) {
|
||||
if (ED_label(e1)!=null) {
|
||||
sz0.____(ED_label(e0).getStruct("dimen"));
|
||||
sz1.____(ED_label(e1).getStruct("dimen"));
|
||||
sz0.___(ED_label(e0).getStruct("dimen"));
|
||||
sz1.___(ED_label(e1).getStruct("dimen"));
|
||||
if (sz0.getDouble("x") > sz1.getDouble("x")) return -1;
|
||||
else if (sz0.getDouble("x") < sz1.getDouble("x")) return 1;
|
||||
else if (sz0.getDouble("y") > sz1.getDouble("y")) return -1;
|
||||
@ -1711,11 +1713,11 @@ public static void makeSimpleFlatLabels(Agnode_s tn, Agnode_s hn, __ptr__ edges,
|
||||
ENTERING("3xmylrnypvoqrj2yrxnomsj5k","makeSimpleFlatLabels");
|
||||
try {
|
||||
pointf ps;
|
||||
final __struct__<Ppoly_t> poly = __struct__.from(Ppoly_t.class);
|
||||
final __struct__<Ppoly_t> poly = JUtils.from(Ppoly_t.class);
|
||||
int pn[] = new int[1];
|
||||
Agedge_s e = (Agedge_s) edges.plus(ind).getPtr();
|
||||
final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10);
|
||||
final __struct__<pointf> tp = __struct__.from(pointf.class), hp = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class);
|
||||
int i, pointn;
|
||||
double leftend, rightend, ctrx=0, ctry=0, miny, maxy;
|
||||
double uminx=0, umaxx=0;
|
||||
@ -1728,8 +1730,8 @@ try {
|
||||
cnt,
|
||||
sizeof(earray.plus(0)),
|
||||
function(dotsplines__c.class, "edgelblcmpfn"));
|
||||
tp.____(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
|
||||
hp.____(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
|
||||
tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
|
||||
hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
|
||||
leftend = tp.getDouble("x")+ND_rw(tn);
|
||||
rightend = hp.getDouble("x")-ND_lw(hn);
|
||||
ctrx = (leftend + rightend)/2.0;
|
||||
@ -1864,11 +1866,11 @@ ENTERING("8kqyzk43ovc2sq6jegua6ytp","makeSimpleFlat");
|
||||
try {
|
||||
Agedge_s e = (Agedge_s) edges.plus(ind).getPtr();
|
||||
final __array_of_struct__ points = __array_of_struct__.malloc(pointf.class, 10);
|
||||
final __struct__<pointf> tp = __struct__.from(pointf.class), hp = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> tp = JUtils.from(pointf.class), hp = JUtils.from(pointf.class);
|
||||
int i, pointn;
|
||||
double stepy, dy;
|
||||
tp.____(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
|
||||
hp.____(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
|
||||
tp.___(add_pointf(ND_coord(tn), ED_tail_port(e).getStruct("p")));
|
||||
hp.___(add_pointf(ND_coord(hn), ED_head_port(e).getStruct("p")));
|
||||
stepy = (cnt > 1) ? ND_ht(tn) / (double)(cnt - 1) : 0.;
|
||||
dy = tp.getDouble("y") - ((cnt > 1) ? ND_ht(tn) / 2. : 0.);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
@ -1917,14 +1919,14 @@ try {
|
||||
Agnode_s auxt, auxh;
|
||||
Agedge_s auxe;
|
||||
int i, j, midx, midy, leftx, rightx;
|
||||
final __struct__<pointf> del = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> del = JUtils.from(pointf.class);
|
||||
Agedge_s hvye = null;
|
||||
attr_state_t attrs;
|
||||
tn = agtail(e0); hn = aghead(e0);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
e = (Agedge_s) edges.plus(ind + i).getPtr();
|
||||
if (ED_label(e)!=null) labels++;
|
||||
if (ED_tail_port(e).getBoolean("defined") || ED_head_port(e).getBoolean("defined")) ports = 1;
|
||||
if (ED_tail_port(e).defined!=0 || ED_head_port(e).defined!=0) ports = 1;
|
||||
}
|
||||
if (ports == 0) {
|
||||
/* flat edges without ports and labels can go straight left to right */
|
||||
@ -2051,16 +2053,16 @@ LEAVING("bhnjospwghq4plid12757c928","make_flat_adj_edges");
|
||||
public static void makeFlatEnd(Agraph_s g, spline_info_t sp, path P, Agnode_s n, Agedge_s e, pathend_t endp, boolean isBegin) {
|
||||
ENTERING("fybar4mljnmkh3kure5k1eod","makeFlatEnd");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
b.____(maximal_bbox(g, sp, n, null, e));
|
||||
final ST_boxf b = new ST_boxf();
|
||||
b.___(maximal_bbox(g, sp, n, null, e));
|
||||
endp.setStruct("nb", b);
|
||||
endp.setInt("sidemask", 1<<2);
|
||||
if (isBegin) beginpath(P, e, 2, endp, false);
|
||||
else endpath(P, e, 2, endp, false);
|
||||
b.getStruct("UR").setDouble("y", endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
b.getStruct("LL").setDouble("y", endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("y"));
|
||||
b.____(makeregularend(b, (1<<2), ND_coord(n).getDouble("y") + GD_rank(g).plus(ND_rank(n)).getDouble("ht2")));
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
b.UR.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).UR.y;
|
||||
b.LL.y = ((ST_boxf)endp.getArrayOfStruct("boxes").plus(endp.getInt("boxn") - 1).getStruct()).LL.y;
|
||||
b.___(makeregularend((ST_boxf) b, (1<<2), ND_coord(n).getDouble("y") + GD_rank(g).plus(ND_rank(n)).getDouble("ht2")));
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
UNSUPPORTED("cmjm4y40vf7wklmgz0ae4k36v"); // endp->boxes[endp->boxn++] = b;
|
||||
} finally {
|
||||
LEAVING("fybar4mljnmkh3kure5k1eod","makeFlatEnd");
|
||||
@ -2102,8 +2104,8 @@ ENTERING("w8ptjibydq995d2lexg85mku","make_flat_labeled_edge");
|
||||
try {
|
||||
Agnode_s tn, hn, ln;
|
||||
pointf ps = null;
|
||||
final __struct__<pathend_t> tend = __struct__.from(pathend_t.class), hend = __struct__.from(pathend_t.class);
|
||||
final __struct__<boxf> lb = __struct__.from(boxf.class);
|
||||
final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
|
||||
final ST_boxf lb = new ST_boxf();
|
||||
int boxn, i, ydelta;
|
||||
int pn[] = new int[1];
|
||||
Agedge_s f;
|
||||
@ -2127,34 +2129,34 @@ UNSUPPORTED("68ojpcos92c96bc0i5ag1yb6v"); // ps = points;
|
||||
UNSUPPORTED("1uunj4jbr2uhiqxwor6rzmr3j"); // pn = 7;
|
||||
}
|
||||
else {
|
||||
lb.getStruct("LL").setDouble("x", ND_coord(ln).getDouble("x") - ND_lw(ln));
|
||||
lb.getStruct("UR").setDouble("x", ND_coord(ln).getDouble("x") + ND_rw(ln));
|
||||
lb.getStruct("UR").setDouble("y", ND_coord(ln).getDouble("y") + ND_ht(ln)/2);
|
||||
lb.LL.x = ND_coord(ln).getDouble("x") - ND_lw(ln);
|
||||
lb.UR.x = ND_coord(ln).getDouble("x") + ND_rw(ln);
|
||||
lb.UR.y = ND_coord(ln).getDouble("y") + ND_ht(ln)/2;
|
||||
ydelta = (int)(ND_coord(ln).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1") -
|
||||
ND_coord(tn).getDouble("y") + GD_rank(g).plus(ND_rank(tn)).getDouble("ht2"));
|
||||
ydelta = (int)(ydelta / 6.);
|
||||
lb.getStruct("LL").setDouble("y", lb.getStruct("UR").getDouble("y") - MAX(5.,ydelta));
|
||||
lb.LL.y = lb.UR.y - MAX(5.,ydelta);
|
||||
boxn = 0;
|
||||
makeFlatEnd (g, sp, P, tn, e, tend.amp(), NOT(false));
|
||||
makeFlatEnd (g, sp, P, hn, e, hend.amp(), false);
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", lb.getStruct("LL").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", lb.getStruct("LL").getDouble("y"));
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = lb.LL.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y;
|
||||
boxn++;
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", lb.getStruct("LL").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", lb.getStruct("UR").getDouble("y"));
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = lb.LL.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.UR.y;
|
||||
boxn++;
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", lb.getStruct("UR").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", lb.getStruct("LL").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("x"));
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = lb.UR.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = lb.LL.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.x;
|
||||
boxn++;
|
||||
for (i = 0; i < tend.getInt("boxn"); i++) add_box(P, tend.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
for (i = 0; i < boxn; i++) add_box(P, Z.z().boxes.plus(i).getStruct());
|
||||
for (i = hend.getInt("boxn") - 1; i >= 0; i--) add_box(P, hend.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
for (i = 0; i < tend.getInt("boxn"); i++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
for (i = 0; i < boxn; i++) add_box(P, (ST_boxf)Z.z().boxes.plus(i).getStruct());
|
||||
for (i = hend.getInt("boxn") - 1; i >= 0; i--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
if (et == (5 << 1)) ps = routesplines(P, pn);
|
||||
else ps = routepolylines(P, pn);
|
||||
if (pn[0] == 0) return;
|
||||
@ -2243,15 +2245,15 @@ public static void make_flat_edge(Agraph_s g, spline_info_t sp, path P, __ptr__
|
||||
ENTERING("6yr3jfkljl5w0z6dv354ryx63","make_flat_edge");
|
||||
try {
|
||||
Agnode_s tn, hn;
|
||||
final __struct__<Agedgeinfo_t> fwdedgei = __struct__.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedge = __struct__.from(Agedgepair_s.class);
|
||||
final __struct__<Agedgeinfo_t> fwdedgei = JUtils.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedge = JUtils.from(Agedgepair_s.class);
|
||||
Agedge_s e;
|
||||
int j, i, r, isAdjacent;
|
||||
double stepx, stepy, vspace;
|
||||
int tside, hside;
|
||||
int pn[] = new int[] {0};
|
||||
pointf ps;
|
||||
final __struct__<pathend_t> tend = __struct__.from(pathend_t.class), hend = __struct__.from(pathend_t.class);
|
||||
final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
|
||||
fwdedge.getStruct("out").getStruct("base").setPtr("data", fwdedgei.amp());
|
||||
/* Get sample edge; normalize to go from left to right */
|
||||
e = (Agedge_s) edges.plus(ind).getPtr();
|
||||
@ -2309,29 +2311,29 @@ try {
|
||||
makeFlatEnd (g, sp, P, hn, e, hend.amp(), false);
|
||||
for (i = 0; i < cnt; i++) {
|
||||
int boxn;
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final ST_boxf b = new ST_boxf();
|
||||
e = (Agedge_s) edges.plus(ind + i).getPtr();
|
||||
boxn = 0;
|
||||
b.____(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct());
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", b.getStruct("LL").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", b.getStruct("UR").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", b.getStruct("UR").getDouble("x") + (i + 1) * stepx);
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", b.getStruct("UR").getDouble("y") + (i + 1) * stepy);
|
||||
b.___(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct());
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x + (i + 1) * stepx;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = b.UR.y + (i + 1) * stepy;
|
||||
boxn++;
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", Z.z().boxes.plus(boxn-1).getStruct().getStruct("UR").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", Z.z().boxes.plus(boxn).getStruct().getStruct("LL").getDouble("y") + stepy);
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = ((ST_boxf)(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct())).LL.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).UR.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = ((ST_boxf)(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct())).UR.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y + stepy;
|
||||
boxn++;
|
||||
b.____(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct());
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("x", b.getStruct("UR").getDouble("x"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("y", b.getStruct("UR").getDouble("y"));
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("LL").setDouble("x", b.getStruct("LL").getDouble("x") - (i + 1) * stepx);
|
||||
Z.z().boxes.plus(boxn).getStruct().getStruct("UR").setDouble("y", Z.z().boxes.plus(boxn-1).getStruct().getStruct("LL").getDouble("y"));
|
||||
b.___(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct());
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.x = b.UR.x;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.y = b.UR.y;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).LL.x = b.LL.x - (i + 1) * stepx;
|
||||
((ST_boxf)Z.z().boxes.plus(boxn).getStruct()).UR.y = ((ST_boxf)Z.z().boxes.plus(boxn-1).getStruct()).LL.y;
|
||||
boxn++;
|
||||
for (j = 0; j < tend.getInt("boxn"); j++) add_box(P, tend.getArrayOfStruct("boxes").plus(j).getStruct());
|
||||
for (j = 0; j < boxn; j++) add_box(P, Z.z().boxes.plus(j).getStruct());
|
||||
for (j = hend.getInt("boxn") - 1; j >= 0; j--) add_box(P, hend.getArrayOfStruct("boxes").plus(j).getStruct());
|
||||
for (j = 0; j < tend.getInt("boxn"); j++) add_box(P, (ST_boxf)tend.getArrayOfStruct("boxes").plus(j).getStruct());
|
||||
for (j = 0; j < boxn; j++) add_box(P, (ST_boxf)Z.z().boxes.plus(j).getStruct());
|
||||
for (j = hend.getInt("boxn") - 1; j >= 0; j--) add_box(P, (ST_boxf)hend.getArrayOfStruct("boxes").plus(j).getStruct());
|
||||
if (et == (5 << 1)) ps = (pointf) routesplines(P, pn);
|
||||
else ps = (pointf) routepolylines(P, pn);
|
||||
if (pn[0] == 0)
|
||||
@ -2448,12 +2450,12 @@ public static void make_regular_edge(Agraph_s g, spline_info_t sp, path P, __ptr
|
||||
ENTERING("30wfq1dby4t07hft9io52nq6z","make_regular_edge");
|
||||
try {
|
||||
Agnode_s tn, hn = null;
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = __struct__.from(Agedgeinfo_t.class), fwdedgebi = __struct__.from(Agedgeinfo_t.class), fwdedgei = __struct__.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = __struct__.from(Agedgepair_s.class), fwdedgeb = __struct__.from(Agedgepair_s.class), fwdedge = __struct__.from(Agedgepair_s.class);
|
||||
final __struct__<Agedgeinfo_t> fwdedgeai = JUtils.from(Agedgeinfo_t.class), fwdedgebi = JUtils.from(Agedgeinfo_t.class), fwdedgei = JUtils.from(Agedgeinfo_t.class);
|
||||
final __struct__<Agedgepair_s> fwdedgea = JUtils.from(Agedgepair_s.class), fwdedgeb = JUtils.from(Agedgepair_s.class), fwdedge = JUtils.from(Agedgepair_s.class);
|
||||
Agedge_s e, fe, le, segfirst;
|
||||
pointf ps = null;
|
||||
final __struct__<pathend_t> tend = __struct__.from(pathend_t.class), hend = __struct__.from(pathend_t.class);
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<pathend_t> tend = JUtils.from(pathend_t.class), hend = JUtils.from(pathend_t.class);
|
||||
final ST_boxf b = new ST_boxf();
|
||||
int boxn, sl, si, i, j, dx, hackflag, longedge;
|
||||
boolean smode;
|
||||
int pn[] = new int[] {0};
|
||||
@ -2511,16 +2513,16 @@ UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
|
||||
segfirst = e;
|
||||
tn = agtail(e);
|
||||
hn = aghead(e);
|
||||
b.____(maximal_bbox(g, sp, tn, null, e));
|
||||
tend.getStruct("nb").____(b);
|
||||
b.___(maximal_bbox(g, sp, tn, null, e));
|
||||
tend.getStruct("nb").___(b);
|
||||
beginpath(P, e, 1, tend.amp(), spline_merge(tn));
|
||||
b.getStruct("UR").setDouble("y",
|
||||
tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
b.getStruct("LL").setDouble("y",
|
||||
tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("y"));
|
||||
b.____(makeregularend(b, (1<<0),
|
||||
b.UR.y =
|
||||
((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).UR.y;
|
||||
b.LL.y =
|
||||
((ST_boxf)tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct()).LL.y;
|
||||
b.___(makeregularend(b, (1<<0),
|
||||
ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1")));
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
{
|
||||
tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn")).setStruct(b);
|
||||
tend.setInt("boxn", tend.getInt("boxn") + 1);
|
||||
@ -2538,17 +2540,17 @@ UNSUPPORTED("bxkpl0bp0qhtxaj6rspd19d1k"); // hackflag = NOT(0);
|
||||
}
|
||||
if (N(smode) || si > 0) {
|
||||
si--;
|
||||
Z.z().boxes.plus(boxn++).setStruct( maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getArrayOfPtr("list").plus(0).getPtr()));
|
||||
e = (Agedge_s) ND_out(hn).getArrayOfPtr("list").plus(0).getPtr();
|
||||
Z.z().boxes.plus(boxn++).setStruct( maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0)));
|
||||
e = (Agedge_s) ND_out(hn).getFromList(0);
|
||||
tn = agtail(e);
|
||||
hn = aghead(e);
|
||||
continue;
|
||||
}
|
||||
hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getArrayOfPtr("list").plus(0).getPtr()));
|
||||
hend.setStruct("nb", maximal_bbox(g, sp, hn, e, (Agedge_s) ND_out(hn).getFromList(0)));
|
||||
endpath(P, e, 1, hend.amp(), spline_merge(aghead(e)));
|
||||
b.____(makeregularend(hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct(), (1<<2),
|
||||
b.___(makeregularend((ST_boxf) hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct(), (1<<2),
|
||||
ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2")));
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
UNSUPPORTED("1crhubfzekx1qi2ti9ajqsfoc"); // hend.boxes[hend.boxn++] = b;
|
||||
P.getStruct("end").setDouble("theta", M_PI / 2);
|
||||
P.getStruct("end").setBoolean("constrained", NOT(false));
|
||||
@ -2574,31 +2576,31 @@ UNSUPPORTED("8kbxhk7qirj3tr7hn1ukwar3h"); // pointfs = RALLOC(numpts, pointfs,
|
||||
for (i = 0; i < pn[0]; i++) {
|
||||
Z.z().pointfs.plus(pointn[0]++).setStruct(ps.plus(i).getStruct());
|
||||
}
|
||||
e = straight_path((Agedge_s)ND_out(hn).getArrayOfPtr("list").plus(0).getPtr(), sl, Z.z().pointfs, pointn);
|
||||
e = straight_path((Agedge_s)ND_out(hn).getFromList(0), sl, Z.z().pointfs, pointn);
|
||||
recover_slack(segfirst, P);
|
||||
segfirst = e;
|
||||
tn = agtail(e);
|
||||
hn = aghead(e);
|
||||
boxn = 0;
|
||||
tend.setStruct("nb", maximal_bbox(g, sp, tn, (Agedge_s) ND_in(tn).getArrayOfPtr("list").plus(0).getPtr(), e));
|
||||
tend.setStruct("nb", maximal_bbox(g, sp, tn, (Agedge_s) ND_in(tn).getFromList(0), e));
|
||||
beginpath(P, e, 1, tend.amp(), spline_merge(tn));
|
||||
b.____(makeregularend(tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct(), (1<<0),
|
||||
b.___(makeregularend((ST_boxf) tend.getArrayOfStruct("boxes").plus(tend.getInt("boxn") - 1).getStruct(), (1<<0),
|
||||
ND_coord(tn).getDouble("y") - GD_rank(g).plus(ND_rank(tn)).getDouble("ht1")));
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
UNSUPPORTED("cjx6tldge3otk1pk6ks1pkn2w"); // tend.boxes[tend.boxn++] = b;
|
||||
P.getStruct("start").setDouble("theta", -M_PI / 2);
|
||||
P.getStruct("start").setBoolean("constrained", NOT(false));
|
||||
smode = false;
|
||||
}
|
||||
Z.z().boxes.plus(boxn++).setStruct(rank_box(sp, g, ND_rank(tn)));
|
||||
b.____(maximal_bbox(g, sp, hn, e, null));
|
||||
hend.getStruct("nb").____(b);
|
||||
b.___(maximal_bbox(g, sp, hn, e, null));
|
||||
hend.getStruct("nb").___(b);
|
||||
endpath(P, hackflag!=0 ? fwdedgeb.getStruct("out").amp() : e, 1, hend.amp(), spline_merge(aghead(e)));
|
||||
b.getStruct("UR").setDouble("y", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("UR").getDouble("y"));
|
||||
b.getStruct("LL").setDouble("y", hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct().getStruct("LL").getDouble("y"));
|
||||
b.____(makeregularend(b, (1<<2),
|
||||
b.UR.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).UR.y;
|
||||
b.LL.y = ((ST_boxf)hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn") - 1).getStruct()).LL.y;
|
||||
b.___(makeregularend(b, (1<<2),
|
||||
ND_coord(hn).getDouble("y") + GD_rank(g).plus(ND_rank(hn)).getDouble("ht2")));
|
||||
if (b.getStruct("LL").getDouble("x") < b.getStruct("UR").getDouble("x") && b.getStruct("LL").getDouble("y") < b.getStruct("UR").getDouble("y"))
|
||||
if (b.LL.x < b.UR.x && b.LL.y < b.UR.y)
|
||||
{
|
||||
hend.getArrayOfStruct("boxes").plus(hend.getInt("boxn")).setStruct(b);
|
||||
hend.setInt("boxn", hend.getInt("boxn")+1);
|
||||
@ -2702,13 +2704,13 @@ try {
|
||||
pn = spl.getArrayOfPtr("list").plus(spl.getInt("size") - 1).getPtr().getInt("size");
|
||||
}
|
||||
for (i = 0; i < tendp.getInt("boxn"); i++)
|
||||
add_box(P, tendp.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
add_box(P, (ST_boxf)tendp.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
fb = P.getInt("nbox") + 1;
|
||||
lb = fb + boxn - 3;
|
||||
for (i = 0; i < boxn; i++)
|
||||
add_box(P, boxes.plus(i).getStruct());
|
||||
add_box(P, (ST_boxf)boxes.plus(i).getStruct());
|
||||
for (i = hendp.getInt("boxn") - 1; i >= 0; i--)
|
||||
add_box(P, hendp.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
add_box(P, (ST_boxf)hendp.getArrayOfStruct("boxes").plus(i).getStruct());
|
||||
adjustregularpath(P, fb, lb);
|
||||
} finally {
|
||||
LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath");
|
||||
@ -2720,20 +2722,20 @@ LEAVING("va61hggynvb6z6j34w7otmab","completeregularpath");
|
||||
|
||||
//3 3wwhczhpkcnflwr1l9wcga7tq
|
||||
// static boxf makeregularend(boxf b, int side, double y)
|
||||
public static __struct__<boxf> makeregularend(final __struct__<boxf> b, int side, double y) {
|
||||
public static __struct__<boxf> makeregularend(final ST_boxf b, int side, double y) {
|
||||
// WARNING!! STRUCT
|
||||
return makeregularend_w_(b.copy(), side, y).copy();
|
||||
}
|
||||
private static __struct__<boxf> makeregularend_w_(final __struct__<boxf> b, int side, double y) {
|
||||
private static __struct__<boxf> makeregularend_w_(final ST_boxf b, int side, double y) {
|
||||
ENTERING("3wwhczhpkcnflwr1l9wcga7tq","makeregularend");
|
||||
try {
|
||||
final __struct__<boxf> newb = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> newb = JUtils.from(boxf.class);
|
||||
switch (side) {
|
||||
case (1<<0):
|
||||
newb.____(boxfof(b.getStruct("LL").getDouble("x"), y, b.getStruct("UR").getDouble("x"), b.getStruct("LL").getDouble("y")));
|
||||
newb.___(boxfof(b.LL.x, y, b.UR.x, b.LL.y));
|
||||
break;
|
||||
case (1<<2):
|
||||
newb.____(boxfof(b.getStruct("LL").getDouble("x"), b.getStruct("UR").getDouble("y"), b.getStruct("UR").getDouble("x"), y));
|
||||
newb.___(boxfof(b.LL.x, b.UR.y, b.UR.x, y));
|
||||
break;
|
||||
}
|
||||
return newb;
|
||||
@ -2793,25 +2795,25 @@ LEAVING("88xrlzjovkxcnay9b2y5zyiid","adjustregularpath");
|
||||
|
||||
//3 bajn5vx0isu427n6dh131b985
|
||||
// static boxf rank_box(spline_info_t* sp, graph_t * g, int r)
|
||||
public static __struct__<boxf> rank_box(spline_info_t sp, Agraph_s g, int r) {
|
||||
public static ST_boxf rank_box(spline_info_t sp, Agraph_s g, int r) {
|
||||
// WARNING!! STRUCT
|
||||
return rank_box_w_(sp, g, r).copy();
|
||||
}
|
||||
private static __struct__<boxf> rank_box_w_(spline_info_t sp, Agraph_s g, int r) {
|
||||
private static ST_boxf rank_box_w_(spline_info_t sp, Agraph_s g, int r) {
|
||||
ENTERING("bajn5vx0isu427n6dh131b985","rank_box");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final ST_boxf b = new ST_boxf();
|
||||
Agnode_s /* *right0, *right1, */ left0, left1;
|
||||
b.____(sp.getPtr("Rank_box").plus(r).getStruct());
|
||||
if (b.getStruct("LL").getDouble("x") == b.getStruct("UR").getDouble("x")) {
|
||||
b.___(sp.getPtr("Rank_box").plus(r).getStruct());
|
||||
if (b.LL.x == b.UR.x) {
|
||||
left0 = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(0).getPtr();
|
||||
/* right0 = GD_rank(g)[r].v[GD_rank(g)[r].n - 1]; */
|
||||
left1 = (Agnode_s) GD_rank(g).plus(r + 1).getArrayOfPtr("v").plus(0).getPtr();
|
||||
/* right1 = GD_rank(g)[r + 1].v[GD_rank(g)[r + 1].n - 1]; */
|
||||
b.getStruct("LL").setDouble("x", sp.getInt("LeftBound"));
|
||||
b.getStruct("LL").setDouble("y", ND_coord(left1).getDouble("y") + GD_rank(g).plus(r + 1).getDouble("ht2"));
|
||||
b.getStruct("UR").setDouble("x", sp.getInt("RightBound"));
|
||||
b.getStruct("UR").setDouble("y", ND_coord(left0).getDouble("y") - GD_rank(g).plus(r).getDouble("ht1"));
|
||||
b.LL.x = sp.getInt("LeftBound");
|
||||
b.LL.y = ND_coord(left1).getDouble("y") + GD_rank(g).plus(r + 1).getDouble("ht2");
|
||||
b.UR.x = sp.getInt("RightBound");
|
||||
b.UR.y = ND_coord(left0).getDouble("y") - GD_rank(g).plus(r).getDouble("ht1");
|
||||
sp.getPtr("Rank_box").plus(r).setStruct(b);
|
||||
}
|
||||
return b;
|
||||
@ -2832,10 +2834,10 @@ try {
|
||||
Agnode_s v;
|
||||
v = n;
|
||||
while (true) {
|
||||
v = (Agnode_s) aghead(ND_out(v).getArrayOfPtr("list").plus(0).getPtr());
|
||||
v = (Agnode_s) aghead(ND_out(v).getFromList(0));
|
||||
if (ND_node_type(v) != 1)
|
||||
break;
|
||||
if ((ND_out(v).getInt("size") != 1) || (ND_in(v).getInt("size") != 1))
|
||||
if ((ND_out(v).size != 1) || (ND_in(v).size != 1))
|
||||
break;
|
||||
if (ND_coord(v).getDouble("x") != ND_coord(n).getDouble("x"))
|
||||
break;
|
||||
@ -2858,7 +2860,7 @@ try {
|
||||
int n = np[0];
|
||||
Agedge_s f = e;
|
||||
while ((cnt--)!=0)
|
||||
f = (Agedge_s) ND_out(aghead(f)).getArrayOfPtr("list").plus(0).getPtr();
|
||||
f = (Agedge_s) ND_out(aghead(f)).getFromList(0);
|
||||
plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
|
||||
plist.plus(np[0]++).setStruct(plist.plus(n - 1).getStruct());
|
||||
plist.plus(np[0]).setStruct(ND_coord(agtail(f))); /* will be overwritten by next spline */
|
||||
@ -2881,7 +2883,7 @@ try {
|
||||
b = 0; /* skip first rank box */
|
||||
for (vn = aghead(e);
|
||||
ND_node_type(vn) == 1 && N(((Boolean)Z.z().sinfo.call("splineMerge", vn)).booleanValue());
|
||||
vn = aghead(ND_out(vn).getArrayOfPtr("list").plus(0).getPtr())) {
|
||||
vn = aghead(ND_out(vn).getFromList(0))) {
|
||||
while ((b < p.getInt("nbox")) && (p.getPtr("boxes").plus(b).getStruct("LL").getDouble("y") > ND_coord(vn).getDouble("y")))
|
||||
b++;
|
||||
if (b >= p.getInt("nbox"))
|
||||
@ -2927,7 +2929,7 @@ ENTERING("9t0v5wicmjuc3ij9hko6iawle","top_bound");
|
||||
try {
|
||||
Agedge_s f, ans = null;
|
||||
int i;
|
||||
for (i = 0; (f = (Agedge_s) ND_out(agtail(e)).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (f = (Agedge_s) ND_out(agtail(e)).getFromList(i))!=null; i++) {
|
||||
if (side * (ND_order(aghead(f)) - ND_order(aghead(e))) <= 0)
|
||||
continue;
|
||||
if ((ED_spl(f) == null)
|
||||
@ -2953,7 +2955,7 @@ ENTERING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
|
||||
try {
|
||||
Agedge_s f, ans = null;
|
||||
int i;
|
||||
for (i = 0; (f = (Agedge_s) ND_in(aghead(e)).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (f = (Agedge_s) ND_in(aghead(e)).getFromList(i))!=null; i++) {
|
||||
if (side * (ND_order(agtail(f)) - ND_order(agtail(e))) <= 0)
|
||||
continue;
|
||||
if ((ED_spl(f) == null)
|
||||
@ -2977,8 +2979,8 @@ LEAVING("9fsg0uiyhtrayd4mimmc0i25e","bot_bound");
|
||||
public static boolean cl_vninside(Agraph_s cl, Agnode_s n) {
|
||||
ENTERING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
|
||||
try {
|
||||
return (BETWEEN(GD_bb(cl).getStruct("LL").getDouble("x"), (double)(ND_coord(n).getDouble("x")), GD_bb(cl).getStruct("UR").getDouble("x")) &&
|
||||
BETWEEN(GD_bb(cl).getStruct("LL").getDouble("y"), (double)(ND_coord(n).getDouble("y")), GD_bb(cl).getStruct("UR").getDouble("y")));
|
||||
return (BETWEEN(GD_bb(cl).LL.x, (double)(ND_coord(n).getDouble("x")), GD_bb(cl).UR.x) &&
|
||||
BETWEEN(GD_bb(cl).LL.y, (double)(ND_coord(n).getDouble("y")), GD_bb(cl).UR.y));
|
||||
} finally {
|
||||
LEAVING("65uvkv1mextaah5m997ibe3qs","cl_vninside");
|
||||
}
|
||||
@ -2998,7 +3000,7 @@ try {
|
||||
if (ND_node_type(n) == 0)
|
||||
tcl = hcl = ND_clust(n);
|
||||
else {
|
||||
orig = ED_to_orig(ND_out(n).getArrayOfPtr("list").plus(0).getPtr());
|
||||
orig = ED_to_orig(ND_out(n).getFromList(0));
|
||||
tcl = ND_clust(agtail(orig));
|
||||
hcl = ND_clust(aghead(orig));
|
||||
}
|
||||
@ -3007,7 +3009,7 @@ try {
|
||||
if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl))
|
||||
rv = cl;
|
||||
} else {
|
||||
orig = ED_to_orig(ND_out(adj).getArrayOfPtr("list").plus(0).getPtr());
|
||||
orig = ED_to_orig(ND_out(adj).getFromList(0));
|
||||
cl = ( EQ(ND_clust(agtail(orig)), g) ? null:ND_clust(agtail(orig)));
|
||||
if (cl!=null && NEQ(cl, tcl) && NEQ(cl, hcl) && cl_vninside(cl, adj))
|
||||
rv = cl;
|
||||
@ -3038,13 +3040,13 @@ try {
|
||||
double b, nb;
|
||||
Agraph_s left_cl, right_cl;
|
||||
Agnode_s left, right;
|
||||
final __struct__<boxf> rv = __struct__.from(boxf.class);
|
||||
final ST_boxf rv = new ST_boxf();
|
||||
left_cl = right_cl = null;
|
||||
/* give this node all the available space up to its neighbors */
|
||||
b = (double)(ND_coord(vn).getDouble("x") - ND_lw(vn) - 4);
|
||||
if ((left = neighbor(g, vn, ie, oe, -1))!=null) {
|
||||
if ((left_cl = cl_bound(g, vn, left))!=null)
|
||||
nb = GD_bb(left_cl).getStruct("UR").getDouble("x") + (double)(sp.getInt("Splinesep"));
|
||||
nb = GD_bb(left_cl).UR.x + (double)(sp.getInt("Splinesep"));
|
||||
else {
|
||||
nb = (double)(ND_coord(left).getDouble("x") + ND_mval(left));
|
||||
if (ND_node_type(left) == 0)
|
||||
@ -3054,9 +3056,9 @@ try {
|
||||
}
|
||||
if (nb < b)
|
||||
b = nb;
|
||||
rv.getStruct("LL").setDouble("x", ROUND(b));
|
||||
rv.LL.x = ROUND(b);
|
||||
} else
|
||||
rv.getStruct("LL").setDouble("x", MIN(ROUND(b), sp.getInt("LeftBound")));
|
||||
rv.LL.x = MIN(ROUND(b), sp.getInt("LeftBound"));
|
||||
/* we have to leave room for our own label! */
|
||||
if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null))
|
||||
b = (double)(ND_coord(vn).getDouble("x") + 10);
|
||||
@ -3064,7 +3066,7 @@ try {
|
||||
b = (double)(ND_coord(vn).getDouble("x") + ND_rw(vn) + 4);
|
||||
if ((right = neighbor(g, vn, ie, oe, 1))!=null) {
|
||||
if ((right_cl = cl_bound(g, vn, right))!=null)
|
||||
nb = GD_bb(right_cl).getStruct("LL").getDouble("x") - (double)(sp.getInt("Splinesep"));
|
||||
nb = GD_bb(right_cl).LL.x - (double)(sp.getInt("Splinesep"));
|
||||
else {
|
||||
nb = ND_coord(right).getDouble("x") - ND_lw(right);
|
||||
if (ND_node_type(right) == 0)
|
||||
@ -3074,15 +3076,15 @@ try {
|
||||
}
|
||||
if (nb > b)
|
||||
b = nb;
|
||||
rv.getStruct("UR").setDouble("x", ROUND(b));
|
||||
rv.UR.x = ROUND(b);
|
||||
} else
|
||||
rv.getStruct("UR").setDouble("x", MAX(ROUND(b), sp.getInt("RightBound")));
|
||||
rv.UR.x = MAX(ROUND(b), sp.getInt("RightBound"));
|
||||
if ((ND_node_type(vn) == 1) && (ND_label(vn)!=null)) {
|
||||
rv.getStruct("UR").setDouble("x", rv.getStruct("UR").getDouble("x") - ND_rw(vn));
|
||||
if (rv.getStruct("UR").getDouble("x") < rv.getStruct("LL").getDouble("x")) rv.getStruct("UR").setDouble("x", ND_coord(vn).getDouble("x"));
|
||||
rv.UR.x = rv.UR.x - ND_rw(vn);
|
||||
if (rv.UR.x < rv.LL.x) rv.UR.x = ND_coord(vn).getDouble("x");
|
||||
}
|
||||
rv.getStruct("LL").setDouble("y", ND_coord(vn).getDouble("y") - GD_rank(g).plus(ND_rank(vn)).getDouble("ht1"));
|
||||
rv.getStruct("UR").setDouble("y", ND_coord(vn).getDouble("y") + GD_rank(g).plus(ND_rank(vn)).getDouble("ht2"));
|
||||
rv.LL.y = ND_coord(vn).getDouble("y") - GD_rank(g).plus(ND_rank(vn)).getDouble("ht1");
|
||||
rv.UR.y = ND_coord(vn).getDouble("y") + GD_rank(g).plus(ND_rank(vn)).getDouble("ht2");
|
||||
return rv;
|
||||
} finally {
|
||||
LEAVING("6qwgl36ugfnduc5x59ohuewv1","maximal_bbox");
|
||||
@ -3134,38 +3136,38 @@ try {
|
||||
boolean order;
|
||||
int cnt;
|
||||
order = (ND_order(n0) > ND_order(n1));
|
||||
if ((ND_out(n0).getInt("size") != 1) && (ND_out(n0).getInt("size") != 1))
|
||||
if ((ND_out(n0).size != 1) && (ND_out(n0).size != 1))
|
||||
return false;
|
||||
e1 = oe1;
|
||||
if (ND_out(n0).getInt("size") == 1 && e1!=null) {
|
||||
e0 = (Agedge_s) ND_out(n0).getArrayOfPtr("list").plus(0).getPtr();
|
||||
if (ND_out(n0).size == 1 && e1!=null) {
|
||||
e0 = (Agedge_s) ND_out(n0).getFromList(0);
|
||||
for (cnt = 0; cnt < 2; cnt++) {
|
||||
if (EQ(na = aghead(e0), nb = aghead(e1)))
|
||||
break;
|
||||
if (order != (ND_order(na) > ND_order(nb)))
|
||||
return NOT(false);
|
||||
if ((ND_out(na).getInt("size") != 1) || (ND_node_type(na) == 0))
|
||||
if ((ND_out(na).size != 1) || (ND_node_type(na) == 0))
|
||||
break;
|
||||
e0 = (Agedge_s) ND_out(na).getArrayOfPtr("list").plus(0).getPtr();
|
||||
if ((ND_out(nb).getInt("size") != 1) || (ND_node_type(nb) == 0))
|
||||
e0 = (Agedge_s) ND_out(na).getFromList(0);
|
||||
if ((ND_out(nb).size != 1) || (ND_node_type(nb) == 0))
|
||||
break;
|
||||
e1 = (Agedge_s) ND_out(nb).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e1 = (Agedge_s) ND_out(nb).getFromList(0);
|
||||
}
|
||||
}
|
||||
e1 = ie1;
|
||||
if (ND_in(n0).getInt("size") == 1 && e1!=null) {
|
||||
e0 = (Agedge_s) ND_in(n0).getArrayOfPtr("list").plus(0).getPtr();
|
||||
if (ND_in(n0).size == 1 && e1!=null) {
|
||||
e0 = (Agedge_s) ND_in(n0).getFromList(0);
|
||||
for (cnt = 0; cnt < 2; cnt++) {
|
||||
if (EQ(na = agtail(e0), nb = agtail(e1)))
|
||||
break;
|
||||
if (order != (ND_order(na) > ND_order(nb)))
|
||||
return NOT(false);
|
||||
if ((ND_in(na).getInt("size") != 1) || (ND_node_type(na) == 0))
|
||||
if ((ND_in(na).size != 1) || (ND_node_type(na) == 0))
|
||||
break;
|
||||
e0 = (Agedge_s) ND_in(na).getArrayOfPtr("list").plus(0).getPtr();
|
||||
if ((ND_in(nb).getInt("size") != 1) || (ND_node_type(nb) == 0))
|
||||
e0 = (Agedge_s) ND_in(na).getFromList(0);
|
||||
if ((ND_in(nb).size != 1) || (ND_node_type(nb) == 0))
|
||||
break;
|
||||
e1 = (Agedge_s) ND_in(nb).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e1 = (Agedge_s) ND_in(nb).getFromList(0);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -95,9 +95,11 @@ import h.Agnode_s;
|
||||
import h.Agnodeinfo_t;
|
||||
import h.Agraph_s;
|
||||
import h.Agrec_s;
|
||||
import h.ST_elist;
|
||||
import h.boxf;
|
||||
import h.elist;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class fastgr__c {
|
||||
@ -365,7 +367,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -403,7 +405,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -443,7 +445,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -742,22 +744,22 @@ throw new UnsupportedOperationException();
|
||||
|
||||
//3 econbrl314rr46qnvvw5e32j7
|
||||
// static edge_t *ffe(node_t * u, elist uL, node_t * v, elist vL)
|
||||
public static Agedge_s ffe(Agnode_s u, final __struct__<elist> uL, Agnode_s v, final __struct__<elist> vL) {
|
||||
public static Agedge_s ffe(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) {
|
||||
// WARNING!! STRUCT
|
||||
return ffe_w_(u, uL.copy(), v, vL.copy());
|
||||
}
|
||||
private static Agedge_s ffe_w_(Agnode_s u, final __struct__<elist> uL, Agnode_s v, final __struct__<elist> vL) {
|
||||
private static Agedge_s ffe_w_(Agnode_s u, final ST_elist uL, Agnode_s v, final ST_elist vL) {
|
||||
ENTERING("econbrl314rr46qnvvw5e32j7","ffe");
|
||||
try {
|
||||
int i;
|
||||
Agedge_s e = null;
|
||||
if ((uL.getInt("size") > 0) && (vL.getInt("size") > 0)) {
|
||||
if (uL.getInt("size") < vL.getInt("size")) {
|
||||
for (i = 0; (e = (Agedge_s) uL.getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
if ((uL.size > 0) && (vL.size > 0)) {
|
||||
if (uL.size < vL.size) {
|
||||
for (i = 0; (e = (Agedge_s) uL.getFromList(i))!=null; i++)
|
||||
if (EQ(aghead(e), v))
|
||||
break;
|
||||
} else {
|
||||
for (i = 0; (e = (Agedge_s) vL.getArrayOfPtr("list").plus(i).getPtr())!=null; i++)
|
||||
for (i = 0; (e = (Agedge_s) vL.getFromList(i))!=null; i++)
|
||||
if (EQ(agtail(e), u))
|
||||
break;
|
||||
}
|
||||
|
@ -96,6 +96,7 @@ import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import h.rank_t;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -364,7 +365,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -402,7 +403,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -442,7 +443,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -801,9 +802,9 @@ try {
|
||||
Agedge_s f;
|
||||
if (ND_node_type(v) == 1) {
|
||||
ord = ND_order(v);
|
||||
if (ND_in(v).getInt("size") == 0) { /* flat */
|
||||
assert(ND_out(v).getInt("size") == 2);
|
||||
findlr((Agnode_s) aghead(ND_out(v).getArrayOfPtr("list").plus(0).getPtr()), (Agnode_s) aghead(ND_out(v).getArrayOfPtr("list").plus(1).getPtr()), l,
|
||||
if (ND_in(v).size == 0) { /* flat */
|
||||
assert(ND_out(v).size == 2);
|
||||
findlr((Agnode_s) aghead(ND_out(v).getFromList(0)), (Agnode_s) aghead(ND_out(v).getFromList(1)), l,
|
||||
r);
|
||||
/* the other flat edge could be to the left or right */
|
||||
if (r[0] <= lpos[0])
|
||||
@ -822,7 +823,7 @@ try {
|
||||
} else { /* forward */
|
||||
boolean onleft, onright;
|
||||
onleft = onright = false;
|
||||
for (i = 0; (f = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (f = (Agedge_s) ND_out(v).getFromList(i))!=null; i++) {
|
||||
if (ND_order(aghead(f)) <= lpos[0]) {
|
||||
onleft = NOT(false);
|
||||
continue;
|
||||
@ -893,7 +894,7 @@ try {
|
||||
Agraph_s g;
|
||||
Agnode_s n, vn;
|
||||
Agedge_s ve;
|
||||
final __struct__<pointf> dimen = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> dimen = JUtils.from(pointf.class);
|
||||
if (ED_label(e) == null)
|
||||
return;
|
||||
g = dot_root(agtail(e));
|
||||
@ -907,7 +908,7 @@ try {
|
||||
ypos = (int)(ND_coord(n).getDouble("y") + GD_rank(g).plus(r).getDouble("ht2") + GD_ranksep(g));
|
||||
}
|
||||
vn = make_vn_slot(g, r - 1, place);
|
||||
dimen.____(ED_label(e).getStruct("dimen"));
|
||||
dimen.___(ED_label(e).getStruct("dimen"));
|
||||
if (GD_flip(g)!=0) {
|
||||
double f = dimen.getDouble("x");
|
||||
dimen.setDouble("x", dimen.getDouble("y"));
|
||||
@ -1022,20 +1023,20 @@ try {
|
||||
Agedge_s e;
|
||||
int found = 0;
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
if (ND_flat_out(n).getPtr("list")!=null) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(n).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
if (ND_flat_out(n).listNotNull()) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(j))!=null; j++) {
|
||||
checkFlatAdjacent (e);
|
||||
}
|
||||
}
|
||||
for (j = 0; j < ND_other(n).getInt("size"); j++) {
|
||||
e = (Agedge_s) ND_other(n).getArrayOfPtr("list").plus(j).getPtr();
|
||||
for (j = 0; j < ND_other(n).size; j++) {
|
||||
e = (Agedge_s) ND_other(n).getFromList(j);
|
||||
if (ND_rank(aghead(e)) == ND_rank(agtail(e)))
|
||||
checkFlatAdjacent (e);
|
||||
}
|
||||
}
|
||||
if ((GD_rank(g).plus(0).getPtr("flat")!=null) || (GD_n_cluster(g) > 0)) {
|
||||
for (i = 0; (n = (Agnode_s) GD_rank(g).plus(0).getArrayOfPtr("v").plus(i).getPtr())!=null; i++) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_in(n).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_in(n).getFromList(j))!=null; j++) {
|
||||
if ((ED_label(e)!=null) && N(ED_adjacent(e))) {
|
||||
abomination(g);
|
||||
found = 1;
|
||||
@ -1049,8 +1050,8 @@ try {
|
||||
rec_save_vlists(g);
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
/* if n is the tail of any flat edge, one will be in flat_out */
|
||||
if (ND_flat_out(n).getPtr("list")!=null) {
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (ND_flat_out(n).listNotNull()) {
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(n).getFromList(i))!=null; i++) {
|
||||
if (ED_label(e)!=null) {
|
||||
if (ED_adjacent(e)!=0) {
|
||||
if (GD_flip(g)!=0) ED_dist(e, ED_label(e).getStruct("dimen").getDouble("y"));
|
||||
@ -1063,9 +1064,9 @@ try {
|
||||
}
|
||||
}
|
||||
/* look for other flat edges with labels */
|
||||
for (j = 0; j < ND_other(n).getInt("size"); j++) {
|
||||
for (j = 0; j < ND_other(n).size; j++) {
|
||||
Agedge_s le;
|
||||
e = (Agedge_s) ND_other(n).getArrayOfPtr("list").plus(j).getPtr();
|
||||
e = (Agedge_s) ND_other(n).getFromList(j);
|
||||
if (ND_rank(agtail(e)) != ND_rank(aghead(e))) continue;
|
||||
if (EQ(agtail(e), aghead(e))) continue; /* skip loops */
|
||||
le = e;
|
||||
|
@ -137,6 +137,7 @@ import h.nodequeue;
|
||||
import h.pointf;
|
||||
import h.rank_t;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_ptr__;
|
||||
@ -408,7 +409,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -446,7 +447,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -486,7 +487,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -863,7 +864,7 @@ try {
|
||||
int c, nc;
|
||||
CString s;
|
||||
init_mincross(g);
|
||||
for (nc = c = 0; c < GD_comp(g).getInt("size"); c++) {
|
||||
for (nc = c = 0; c < GD_comp(g).size; c++) {
|
||||
init_mccomp(g, c);
|
||||
nc += mincross_(g, 0, 2, doBalance);
|
||||
}
|
||||
@ -928,7 +929,8 @@ public static void init_mccomp(Agraph_s g, int c) {
|
||||
ENTERING("49vw7fkn99wbojtfksugvuruh","init_mccomp");
|
||||
try {
|
||||
int r;
|
||||
GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
|
||||
// GD_nlist(g, GD_comp(g).getFromListt(c).getPtr());
|
||||
GD_nlist(g, GD_comp(g).getFromList(c));
|
||||
if (c > 0) {
|
||||
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
|
||||
GD_rank(g).plus(r).setPtr("v", GD_rank(g).plus(r).getPtr("v").plus(GD_rank(g).plus(r).getInt("n")));
|
||||
@ -1164,10 +1166,10 @@ try {
|
||||
__array_of_ptr__ e1;
|
||||
__array_of_ptr__ e2;
|
||||
int inv, cross = 0, t;
|
||||
for (e2 = ND_in(w).getArrayOfPtr("list"); e2.getPtr()!=null; e2=e2.plus(1)) {
|
||||
for (e2 = ND_in(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) {
|
||||
int cnt = ED_xpenalty(e2.getPtr());
|
||||
inv = ND_order((agtail(e2.getPtr())));
|
||||
for (e1 = ND_in(v).getArrayOfPtr("list"); e1.getPtr()!=null; e1=e1.plus(1)) {
|
||||
for (e1 = ND_in(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) {
|
||||
t = ND_order(agtail(e1.getPtr())) - inv;
|
||||
if ((t > 0)
|
||||
|| ((t == 0)
|
||||
@ -1191,10 +1193,10 @@ ENTERING("b7mf74np8ewrgzwd5u0o8fqod","out_cross");
|
||||
try {
|
||||
__array_of_ptr__ e1, e2;
|
||||
int inv, cross = 0, t;
|
||||
for (e2 = ND_out(w).getArrayOfPtr("list"); e2.getPtr()!=null; e2=e2.plus(1)) {
|
||||
for (e2 = ND_out(w).getTheArray(); e2.getPtr()!=null; e2=e2.plus(1)) {
|
||||
int cnt = ED_xpenalty((Agedge_s)e2.getPtr());
|
||||
inv = ND_order(aghead(e2.getPtr()));
|
||||
for (e1 = ND_out(v).getArrayOfPtr("list"); e1.getPtr()!=null; e1=e1.plus(1)) {
|
||||
for (e1 = ND_out(v).getTheArray(); e1.getPtr()!=null; e1=e1.plus(1)) {
|
||||
t = ND_order(aghead(e1.getPtr())) - inv;
|
||||
if ((t > 0)
|
||||
|| ((t == 0)
|
||||
@ -1532,7 +1534,7 @@ ENTERING("8uyqc48j0oul206l3np85wj9p","save_best");
|
||||
try {
|
||||
Agnode_s n;
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n))
|
||||
(ND_coord(n)).setDouble("x", ND_order(n));
|
||||
(ND_coord(n)).x = ND_order(n);
|
||||
} finally {
|
||||
LEAVING("8uyqc48j0oul206l3np85wj9p","save_best");
|
||||
}
|
||||
@ -1548,11 +1550,11 @@ ENTERING("6d08fwi4dsk6ikk5d0gy6rq2h","merge_components");
|
||||
try {
|
||||
int c;
|
||||
Agnode_s u, v;
|
||||
if (GD_comp(g).getInt("size") <= 1)
|
||||
if (GD_comp(g).size <= 1)
|
||||
return;
|
||||
u = null;
|
||||
for (c = 0; c < GD_comp(g).getInt("size"); c++) {
|
||||
v = (Agnode_s) GD_comp(g).getArrayOfPtr("list").plus(c).getPtr();
|
||||
for (c = 0; c < GD_comp(g).size; c++) {
|
||||
v = (Agnode_s) GD_comp(g).getFromList(c);
|
||||
if (u!=null)
|
||||
ND_next(u, v);
|
||||
ND_prev(v, u);
|
||||
@ -1561,8 +1563,8 @@ try {
|
||||
}
|
||||
u = v;
|
||||
}
|
||||
GD_comp(g).setInt("size", 1);
|
||||
GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(0).getPtr());
|
||||
GD_comp(g).size = 1;
|
||||
GD_nlist(g, GD_comp(g).getFromList(0));
|
||||
GD_minrank(g, Z.z().GlobalMinRank);
|
||||
GD_maxrank(g, Z.z().GlobalMaxRank);
|
||||
} finally {
|
||||
@ -1631,8 +1633,8 @@ try {
|
||||
for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
|
||||
v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
|
||||
ND_order(v, i);
|
||||
if (ND_flat_out(v).getPtr("list")!=null) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(v).getArrayOfPtr("list").plus(j).getPtr())!=null; j++)
|
||||
if (ND_flat_out(v).listNotNull()) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++)
|
||||
if (ED_edge_type(e) == 4) {
|
||||
delete_flat_edge(e);
|
||||
Memory.free(e.getPtr("base.data"));
|
||||
@ -1697,8 +1699,8 @@ public static boolean is_a_vnode_of_an_edge_of(Agraph_s g, Agnode_s v) {
|
||||
ENTERING("9f8atyi1unmleplge3rijdt4s","is_a_vnode_of_an_edge_of");
|
||||
try {
|
||||
if ((ND_node_type(v) == 1)
|
||||
&& (ND_in(v).getInt("size") == 1) && (ND_out(v).getInt("size") == 1)) {
|
||||
Agedge_s e = (Agedge_s) ND_out(v).getArrayOfPtr("list").plus(0).getPtr();
|
||||
&& (ND_in(v).size == 1) && (ND_out(v).size == 1)) {
|
||||
Agedge_s e = (Agedge_s) ND_out(v).getFromList(0);
|
||||
while (ED_edge_type(e) != 0)
|
||||
e = ED_to_orig(e);
|
||||
if (agcontains(g, e))
|
||||
@ -1920,10 +1922,11 @@ ENTERING("6fprrp93vmz0jn3l4ro0iropp","flat_rev");
|
||||
try {
|
||||
int j;
|
||||
Agedge_s rev;
|
||||
if (N(ND_flat_out(aghead(e)).getArrayOfPtr("list")))
|
||||
if (ND_flat_out(aghead(e)).listNotNull()==false)
|
||||
// if (N(ND_flat_out(aghead(e)).getArrayOfPtr("list")))
|
||||
rev = null;
|
||||
else
|
||||
for (j = 0; (rev = (Agedge_s) ND_flat_out(aghead(e)).getArrayOfPtr("list").plus(j).getPtr())!=null; j++)
|
||||
for (j = 0; (rev = (Agedge_s) ND_flat_out(aghead(e)).getFromList(j))!=null; j++)
|
||||
if (EQ(aghead(rev), agtail(e)))
|
||||
break;
|
||||
if (rev!=null) {
|
||||
@ -1963,8 +1966,8 @@ try {
|
||||
ND_mark(v, NOT(false));
|
||||
ND_onstack(v, NOT(false));
|
||||
hascl = (GD_n_cluster(dot_root(g)) > 0);
|
||||
if (ND_flat_out(v).getArrayOfPtr("list")!=null)
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (ND_flat_out(v).listNotNull())
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
|
||||
if (hascl
|
||||
&& NOT(agcontains(g, agtail(e)) && agcontains(g, aghead(e))))
|
||||
continue;
|
||||
@ -2010,7 +2013,7 @@ try {
|
||||
ND_mark(v, 0);
|
||||
ND_onstack(v, 0);
|
||||
ND_low(v, i);
|
||||
if ((ND_flat_out(v).getInt("size") > 0) && (flat == 0)) {
|
||||
if ((ND_flat_out(v).size > 0) && (flat == 0)) {
|
||||
GD_rank(g).plus(r).setPtr("flat",
|
||||
new_matrix(GD_rank(g).plus(r).getInt("n"), GD_rank(g).plus(r).getInt("n")));
|
||||
flat = 1;
|
||||
@ -2131,7 +2134,7 @@ try {
|
||||
for (i = GD_minrank(g); i <= GD_maxrank(g); i++)
|
||||
GD_rank(g).plus(i).setInt("n", 0);
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
otheredges = ((pass == 0) ? ND_in(n).getPtr("list") : ND_out(n).getPtr("list"));
|
||||
otheredges = ((pass == 0) ? ND_in(n).getTheList() : ND_out(n).getTheList());
|
||||
if (otheredges.plus(0).getPtr() != null)
|
||||
continue;
|
||||
if ((ND_mark(n)) == 0) {
|
||||
@ -2179,16 +2182,16 @@ try {
|
||||
int i;
|
||||
Agedge_s e;
|
||||
if (pass == 0) {
|
||||
for (i = 0; i < ND_out(n0).getInt("size"); i++) {
|
||||
e = (Agedge_s) ND_out(n0).getArrayOfPtr("list").plus(i).getPtr();
|
||||
for (i = 0; i < ND_out(n0).size; i++) {
|
||||
e = (Agedge_s) ND_out(n0).getFromList(i);
|
||||
if (((ND_mark(aghead(e)))) == 0) {
|
||||
ND_mark(aghead(e), 1);
|
||||
enqueue(q, aghead(e));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < ND_in(n0).getInt("size"); i++) {
|
||||
e = (Agedge_s) ND_in(n0).getArrayOfPtr("list").plus(i).getPtr();
|
||||
for (i = 0; i < ND_in(n0).size; i++) {
|
||||
e = (Agedge_s) ND_in(n0).getFromList(i);
|
||||
if (((ND_mark(agtail(e)))) == 0) {
|
||||
ND_mark(agtail(e), 1);
|
||||
enqueue(q, agtail(e));
|
||||
@ -2228,8 +2231,8 @@ try {
|
||||
Agedge_s e;
|
||||
int i, cnt = 0;
|
||||
ND_mark(v, NOT(false));
|
||||
if (ND_flat_out(v).getInt("size") > 0) {
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(v).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (ND_flat_out(v).size > 0) {
|
||||
for (i = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(i))!=null; i++) {
|
||||
if (N(constraining_flat_edge(g,v,e))) continue;
|
||||
if ((ND_mark(aghead(e))) == 0)
|
||||
cnt += postorder(g, aghead(e), list.plus(cnt), r);
|
||||
@ -2270,12 +2273,12 @@ try {
|
||||
if (GD_flip(g)!=0) v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
|
||||
else v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(GD_rank(g).plus(r).getInt("n") - i - 1).getPtr();
|
||||
local_in_cnt = local_out_cnt = 0;
|
||||
for (j = 0; j < ND_flat_in(v).getInt("size"); j++) {
|
||||
flat_e = (Agedge_s) ND_flat_in(v).getArrayOfPtr("list").plus(j).getPtr();
|
||||
for (j = 0; j < ND_flat_in(v).size; j++) {
|
||||
flat_e = (Agedge_s) ND_flat_in(v).getFromList(j);
|
||||
if (constraining_flat_edge(g,v,flat_e)) local_in_cnt++;
|
||||
}
|
||||
for (j = 0; j < ND_flat_out(v).getInt("size"); j++) {
|
||||
flat_e = (Agedge_s) ND_flat_out(v).getArrayOfPtr("list").plus(j).getPtr();
|
||||
for (j = 0; j < ND_flat_out(v).size; j++) {
|
||||
flat_e = (Agedge_s) ND_flat_out(v).getFromList(j);
|
||||
if (constraining_flat_edge(g,v,flat_e)) local_out_cnt++;
|
||||
}
|
||||
if ((local_in_cnt == 0) && (local_out_cnt == 0))
|
||||
@ -2308,8 +2311,8 @@ try {
|
||||
/* nonconstraint flat edges must be made LR */
|
||||
for (i = 0; i < GD_rank(g).plus(r).getInt("n"); i++) {
|
||||
v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(i).getPtr();
|
||||
if (ND_flat_out(v).getArrayOfPtr("list")!=null) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(v).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
if (ND_flat_out(v).listNotNull()) {
|
||||
for (j = 0; (e = (Agedge_s) ND_flat_out(v).getFromList(j))!=null; j++) {
|
||||
if ( ((GD_flip(g) == 0) && (ND_order(aghead(e)) < ND_order(agtail(e)))) ||
|
||||
( (GD_flip(g)!=0) && (ND_order(aghead(e)) > ND_order(agtail(e)) ))) {
|
||||
assert(constraining_flat_edge(g,v,e) == false);
|
||||
@ -2506,12 +2509,12 @@ try {
|
||||
for (top = 0; top < GD_rank(g).plus(r).getInt("n"); top++) {
|
||||
Agedge_s e;
|
||||
if (max > 0) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) {
|
||||
for (k = ND_order(aghead(e)) + 1; k <= max; k++)
|
||||
cross += Z.z().Count.plus(k).getInt() * ED_xpenalty(e);
|
||||
}
|
||||
}
|
||||
for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(rtop.plus(top).getPtr()).getFromList(i))!=null; i++) {
|
||||
int inv = ND_order(aghead(e));
|
||||
if (inv > max)
|
||||
max = inv;
|
||||
@ -2587,8 +2590,8 @@ try {
|
||||
Agedge_s e;
|
||||
__ptr__ fl;
|
||||
Agnode_s nn;
|
||||
if (ND_flat_in(n).getInt("size") > 0) {
|
||||
fl = ND_flat_in(n).getPtr("list");
|
||||
if (ND_flat_in(n).size > 0) {
|
||||
fl = ND_flat_in(n).getTheList();
|
||||
nn = agtail(fl.plus(0).getPtr());
|
||||
for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++)
|
||||
if (ND_order(agtail(e)) > ND_order(nn))
|
||||
@ -2597,8 +2600,8 @@ try {
|
||||
ND_mval(n, ND_mval(nn) + 1);
|
||||
return false;
|
||||
}
|
||||
} else if (ND_flat_out(n).getInt("size") > 0) {
|
||||
fl = ND_flat_out(n).getPtr("list");
|
||||
} else if (ND_flat_out(n).size > 0) {
|
||||
fl = ND_flat_out(n).getTheList();
|
||||
nn = aghead(fl.plus(0).getPtr());
|
||||
for (i = 1; (e = (Agedge_s) fl.plus(i).getPtr())!=null; i++)
|
||||
if (ND_order(aghead(e)) < ND_order(nn))
|
||||
@ -2634,11 +2637,11 @@ try {
|
||||
n = (Agnode_s) v.plus(i).getPtr();
|
||||
j = 0;
|
||||
if (r1 > r0)
|
||||
for (j0 = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(j0).getPtr())!=null; j0++) {
|
||||
for (j0 = 0; (e = (Agedge_s) ND_out(n).getFromList(j0))!=null; j0++) {
|
||||
if (ED_xpenalty(e) > 0)
|
||||
list.plus(j++).setInt((256 * ND_order(aghead(e)) + (ED_head_port(e)).getInt("order")));
|
||||
} else
|
||||
for (j0 = 0; (e = (Agedge_s) ND_in(n).getArrayOfPtr("list").plus(j0).getPtr())!=null; j0++) {
|
||||
for (j0 = 0; (e = (Agedge_s) ND_in(n).getFromList(j0))!=null; j0++) {
|
||||
if (ED_xpenalty(e) > 0)
|
||||
list.plus(j++).setInt((256 * ND_order(agtail(e)) + (ED_tail_port(e)).getInt("order")));
|
||||
}
|
||||
@ -2676,7 +2679,7 @@ try {
|
||||
}
|
||||
for (i = 0; i < GD_rank(g).plus(r0).getInt("n"); i++) {
|
||||
n = (Agnode_s) v.plus(i).getPtr();
|
||||
if ((ND_out(n).getInt("size") == 0) && (ND_in(n).getInt("size") == 0))
|
||||
if ((ND_out(n).size == 0) && (ND_in(n).size == 0))
|
||||
hasfixed |= flat_mval(n);
|
||||
}
|
||||
return hasfixed;
|
||||
|
@ -138,12 +138,14 @@ import h.Agedgeinfo_t;
|
||||
import h.Agedgepair_s;
|
||||
import h.Agnode_s;
|
||||
import h.Agraph_s;
|
||||
import h.ST_pointf;
|
||||
import h.aspect_t;
|
||||
import h.boxf;
|
||||
import h.point;
|
||||
import h.pointf;
|
||||
import h.ratio_t;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__ptr__;
|
||||
@ -414,7 +416,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -452,7 +454,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -492,7 +494,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -827,8 +829,8 @@ try {
|
||||
tp = null;
|
||||
for (i = 0; i < rp.getPtr().getInt("n"); i++) {
|
||||
tp = (Agnode_s) rp.getPtr().getArrayOfPtr("v").plus(i).getPtr();
|
||||
if (ND_save_out(tp).getPtr("list")!=null) {
|
||||
for (j = 0; (e = (Agedge_s) ND_save_out(tp).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
if (ND_save_out(tp).listNotNull()) {
|
||||
for (j = 0; (e = (Agedge_s) ND_save_out(tp).getFromList(j))!=null; j++) {
|
||||
if ((ND_rank(aghead(e)) > r) || (ND_rank(agtail(e)) > r)) {
|
||||
found = 1;
|
||||
break;
|
||||
@ -836,8 +838,8 @@ try {
|
||||
}
|
||||
if (found!=0) break;
|
||||
}
|
||||
if (ND_save_in(tp).getPtr("list")!=null) {
|
||||
for (j = 0; (e = (Agedge_s) ND_save_in(tp).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
if (ND_save_in(tp).listNotNull()) {
|
||||
for (j = 0; (e = (Agedge_s) ND_save_in(tp).getFromList(j))!=null; j++) {
|
||||
if ((ND_rank(agtail(e)) > r) || (ND_rank(aghead(e)) > r)) {
|
||||
found = 1;
|
||||
break;
|
||||
@ -924,7 +926,7 @@ try {
|
||||
Agedge_s e;
|
||||
if (EQ(u, v))
|
||||
return NOT(false);
|
||||
for (i = 0; (e = (Agedge_s) ND_out(u).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(u).getFromList(i))!=null; i++) {
|
||||
if (go(aghead(e), v))
|
||||
return NOT(false);
|
||||
}
|
||||
@ -989,8 +991,8 @@ try {
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
ND_save_in(n, ND_in(n));
|
||||
ND_save_out(n, ND_out(n));
|
||||
for (i = 0; ND_out(n).getArrayOfPtr("list").plus(i).getPtr()!=null; i++);
|
||||
for (j = 0; ND_in(n).getArrayOfPtr("list").plus(j).getPtr()!=null; j++);
|
||||
for (i = 0; ND_out(n).getFromList(i)!=null; i++);
|
||||
for (j = 0; ND_in(n).getFromList(j)!=null; j++);
|
||||
n_in = i + j;
|
||||
alloc_elist(n_in + 3, ND_in(n), Agnode_s.class);
|
||||
alloc_elist(3, ND_out(n), Agnode_s.class);
|
||||
@ -1034,7 +1036,7 @@ try {
|
||||
for (j = 0; j < rank.plus(i).getInt("n"); j++) {
|
||||
u = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr();
|
||||
ND_mval(u, ND_rw(u)); /* keep it somewhere safe */
|
||||
if (ND_other(u).getInt("size") > 0) { /* compute self size */
|
||||
if (ND_other(u).size > 0) { /* compute self size */
|
||||
/* FIX: dot assumes all self-edges go to the right. This
|
||||
* is no longer true, though makeSelfEdge still attempts to
|
||||
* put as many as reasonable on the right. The dot code
|
||||
@ -1044,7 +1046,7 @@ try {
|
||||
* positioning but may also affect interrank spacing.
|
||||
*/
|
||||
sw = 0;
|
||||
for (k = 0; (e = (Agedge_s) ND_other(u).getArrayOfPtr("list").plus(k).getPtr())!=null; k++) {
|
||||
for (k = 0; (e = (Agedge_s) ND_other(u).getFromList(k))!=null; k++) {
|
||||
if (EQ(agtail(e), aghead(e))) {
|
||||
sw += selfRightSpace (e);
|
||||
}
|
||||
@ -1060,8 +1062,8 @@ try {
|
||||
}
|
||||
/* constraints from labels of flat edges on previous rank */
|
||||
if ((e = (Agedge_s) ND_alg(u))!=null) {
|
||||
e0 = (Agedge_s) ND_save_out(u).getArrayOfPtr("list").plus(0).getPtr();
|
||||
e1 = (Agedge_s) ND_save_out(u).getArrayOfPtr("list").plus(1).getPtr();
|
||||
e0 = (Agedge_s) ND_save_out(u).getFromList(0);
|
||||
e1 = (Agedge_s) ND_save_out(u).getFromList(1);
|
||||
if (ND_order(aghead(e0)) > ND_order(aghead(e1))) {
|
||||
ff = e0;
|
||||
e0 = e1;
|
||||
@ -1080,8 +1082,8 @@ try {
|
||||
ED_weight(e));
|
||||
}
|
||||
/* position flat edge endpoints */
|
||||
for (k = 0; k < ND_flat_out(u).getInt("size"); k++) {
|
||||
e = (Agedge_s) ND_flat_out(u).getArrayOfPtr("list").plus(k).getPtr();
|
||||
for (k = 0; k < ND_flat_out(u).size; k++) {
|
||||
e = (Agedge_s) ND_flat_out(u).getFromList(k);
|
||||
if (ND_order(agtail(e)) < ND_order(aghead(e))) {
|
||||
t0 = agtail(e);
|
||||
h0 = aghead(e);
|
||||
@ -1131,11 +1133,11 @@ try {
|
||||
Agnode_s n, sn;
|
||||
Agedge_s e;
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
if (ND_save_out(n).getPtr("list")!=null)
|
||||
for (i = 0; (e = (Agedge_s) ND_save_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (ND_save_out(n).listNotNull())
|
||||
for (i = 0; (e = (Agedge_s) ND_save_out(n).getFromList(i))!=null; i++) {
|
||||
sn = virtual_node(g);
|
||||
ND_node_type(sn, 2);
|
||||
m0 = (int)(ED_head_port(e).getStruct("p").getDouble("x") - ED_tail_port(e).getStruct("p").getDouble("x"));
|
||||
m0 = (int)(ED_head_port(e).p.x - ED_tail_port(e).p.x);
|
||||
if (m0 > 0)
|
||||
m1 = 0;
|
||||
else {
|
||||
@ -1189,7 +1191,7 @@ try {
|
||||
Agedge_s e;
|
||||
if (ND_node_type(v) != 1)
|
||||
return false;
|
||||
for (e = (Agedge_s) ND_save_out(v).getArrayOfPtr("list").plus(0).getPtr(); ED_to_orig(e)!=null; e = ED_to_orig(e));
|
||||
for (e = (Agedge_s) ND_save_out(v).getFromList(0); ED_to_orig(e)!=null; e = ED_to_orig(e));
|
||||
if (agcontains(g, agtail(e)))
|
||||
return false;
|
||||
if (agcontains(g, aghead(e)))
|
||||
@ -1392,7 +1394,7 @@ try {
|
||||
Agnode_s n, nnext, nprev;
|
||||
Agedge_s e;
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
for (i = 0; (e = (Agedge_s) ND_out(n).getFromList(i))!=null; i++) {
|
||||
Memory.free(e.getStruct("base").getPtr("data"));
|
||||
Memory.free(e);
|
||||
}
|
||||
@ -1435,7 +1437,7 @@ try {
|
||||
for (i = GD_minrank(g); i <= GD_maxrank(g); i++) {
|
||||
for (j = 0; j < rank.plus(i).getInt("n"); j++) {
|
||||
v = (Agnode_s) rank.plus(i).getArrayOfPtr("v").plus(j).getPtr();
|
||||
ND_coord(v).setDouble("x", ND_rank(v));
|
||||
ND_coord(v).x = ND_rank(v);
|
||||
ND_rank(v, i);
|
||||
}
|
||||
}
|
||||
@ -1604,8 +1606,8 @@ try {
|
||||
/* assumes symmetry, ht1 = ht2 */
|
||||
ht2 = ND_ht(n) / 2;
|
||||
/* have to look for high self-edge labels, too */
|
||||
if (ND_other(n).getPtr("list")!=null)
|
||||
for (j = 0; (e = (Agedge_s) ND_other(n).getArrayOfPtr("list").plus(j).getPtr())!=null; j++) {
|
||||
if (ND_other(n).listNotNull())
|
||||
for (j = 0; (e = (Agedge_s) ND_other(n).getFromList(j))!=null; j++) {
|
||||
if (EQ(agtail(e), aghead(e))) {
|
||||
if (ED_label(e)!=null)
|
||||
ht2 = MAX(ht2, ED_label(e).getStruct("dimen").getDouble("y") / 2);
|
||||
@ -1672,7 +1674,7 @@ UNSUPPORTED("e6dfx5uesysjaefb0djyfp7f"); // (ND_coord(rank[r + 1].v[0])).y
|
||||
}
|
||||
/* copy ycoord assignment from leftmost nodes to others */
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n))
|
||||
ND_coord(n).setDouble("y", (ND_coord(rank.plus(ND_rank(n)).getArrayOfPtr("v").plus(0).getPtr())).getDouble("y"));
|
||||
ND_coord(n).y = ND_coord(rank.plus(ND_rank(n)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y");
|
||||
} finally {
|
||||
LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords");
|
||||
}
|
||||
@ -1682,18 +1684,18 @@ LEAVING("bp8vmol4ncadervcfossysdtd","set_ycoords");
|
||||
|
||||
|
||||
//3 9ay2xnnmh407i32pfokujfda5
|
||||
// static void dot_compute_bb(graph_t * g, graph_t * root)
|
||||
//static void dot_compute_bb(graph_t * g, graph_t * root)
|
||||
public static void dot_compute_bb(Agraph_s g, Agraph_s root) {
|
||||
ENTERING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb");
|
||||
try {
|
||||
int r, c;
|
||||
double x, offset;
|
||||
Agnode_s v;
|
||||
final __struct__<pointf> LL = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> UR = __struct__.from(pointf.class);
|
||||
final ST_pointf LL = new ST_pointf();
|
||||
final ST_pointf UR = new ST_pointf();
|
||||
if (EQ(g, dot_root(g))) {
|
||||
LL.setDouble("x", INT_MAX);
|
||||
UR.setDouble("x", -((double)INT_MAX));
|
||||
LL.x = INT_MAX;
|
||||
UR.x = -((double)INT_MAX);
|
||||
for (r = GD_minrank(g); r <= GD_maxrank(g); r++) {
|
||||
int rnkn = GD_rank(g).plus(r).getInt("n");
|
||||
if (rnkn == 0)
|
||||
@ -1712,21 +1714,21 @@ try {
|
||||
for (c = rnkn-2; ND_node_type(v) != 0; c--)
|
||||
v = (Agnode_s) GD_rank(g).plus(r).getArrayOfPtr("v").plus(c).getPtr();
|
||||
x = ND_coord(v).getDouble("x") + ND_rw(v);
|
||||
UR.setDouble("x", MAX(UR.getDouble("x"), x));
|
||||
UR.x = MAX(UR.getDouble("x"), x);
|
||||
}
|
||||
offset = 8;
|
||||
for (c = 1; c <= GD_n_cluster(g); c++) {
|
||||
x = (double)(GD_bb(GD_clust(g).plus(c)).getStruct("LL").getDouble("x") - offset);
|
||||
LL.setDouble("x", MIN(LL.getDouble("x"), x));
|
||||
x = (double)(GD_bb(GD_clust(g).plus(c)).getStruct("UR").getDouble("x") + offset);
|
||||
UR.setDouble("x", MAX(UR.getDouble("x"), x));
|
||||
x = (double)(GD_bb(GD_clust(g).plus(c)).LL.x - offset);
|
||||
LL.x = MIN(LL.getDouble("x"), x);
|
||||
x = (double)(GD_bb(GD_clust(g).plus(c)).UR.x + offset);
|
||||
UR.x = MAX(UR.getDouble("x"), x);
|
||||
}
|
||||
} else {
|
||||
LL.setDouble("x", (double)(ND_rank(GD_ln(g))));
|
||||
UR.setDouble("x", (double)(ND_rank(GD_rn(g))));
|
||||
LL.x = (double)(ND_rank(GD_ln(g)));
|
||||
UR.x = (double)(ND_rank(GD_rn(g)));
|
||||
}
|
||||
LL.setDouble("y", ND_coord(GD_rank(root).plus(GD_maxrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - GD_ht1(g));
|
||||
UR.setDouble("y", ND_coord(GD_rank(root).plus(GD_minrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") + GD_ht2(g));
|
||||
LL.y = ND_coord(GD_rank(root).plus(GD_maxrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") - GD_ht1(g);
|
||||
UR.y = ND_coord(GD_rank(root).plus(GD_minrank(g)).getArrayOfPtr("v").plus(0).getPtr()).getDouble("y") + GD_ht2(g);
|
||||
GD_bb(g).setStruct("LL", LL);
|
||||
GD_bb(g).setStruct("UR", UR);
|
||||
} finally {
|
||||
@ -1737,6 +1739,7 @@ LEAVING("9ay2xnnmh407i32pfokujfda5","dot_compute_bb");
|
||||
|
||||
|
||||
|
||||
|
||||
//3 dlbpiimh9g9ff9w7wjoabf817
|
||||
// static void rec_bb(graph_t * g, graph_t * root)
|
||||
public static void rec_bb(Agraph_s g, Agraph_s root) {
|
||||
@ -2017,13 +2020,13 @@ throw new UnsupportedOperationException();
|
||||
public static boolean ports_eq(Agedge_s e, Agedge_s f) {
|
||||
ENTERING("alpljm8o6nsam95ly6leelnbp","ports_eq");
|
||||
try {
|
||||
return ((ED_head_port(e).getBoolean("defined") == ED_head_port(f).getBoolean("defined"))
|
||||
&& (((ED_head_port(e).getStruct("p").getDouble("x") == ED_head_port(f).getStruct("p").getDouble("x")) &&
|
||||
(ED_head_port(e).getStruct("p").getDouble("y") == ED_head_port(f).getStruct("p").getDouble("y")))
|
||||
|| (ED_head_port(e).getBoolean("defined") == false))
|
||||
&& (((ED_tail_port(e).getStruct("p").getDouble("x") == ED_tail_port(f).getStruct("p").getDouble("x")) &&
|
||||
(ED_tail_port(e).getStruct("p").getDouble("y") == ED_tail_port(f).getStruct("p").getDouble("y")))
|
||||
|| (ED_tail_port(e).getBoolean("defined") == false))
|
||||
return ((ED_head_port(e).defined == ED_head_port(f).defined)
|
||||
&& (((ED_head_port(e).p.x == ED_head_port(f).p.x) &&
|
||||
(ED_head_port(e).p.y == ED_head_port(f).p.y))
|
||||
|| (ED_head_port(e).defined == 0))
|
||||
&& (((ED_tail_port(e).p.x == ED_tail_port(f).p.x) &&
|
||||
(ED_tail_port(e).p.y == ED_tail_port(f).p.y))
|
||||
|| (ED_tail_port(e).defined == 0))
|
||||
);
|
||||
} finally {
|
||||
LEAVING("alpljm8o6nsam95ly6leelnbp","ports_eq");
|
||||
@ -2047,8 +2050,8 @@ try {
|
||||
do_leaves(g, ND_inleaf(n));
|
||||
if (ND_outleaf(n)!=null)
|
||||
do_leaves(g, ND_outleaf(n));
|
||||
if (ND_other(n).getPtr("list")!=null)
|
||||
for (i = 0; (e = (Agedge_s) ND_other(n).getArrayOfPtr("list").plus(i).getPtr())!=null; i++) {
|
||||
if (ND_other(n).listNotNull())
|
||||
for (i = 0; (e = (Agedge_s) ND_other(n).getFromList(i))!=null; i++) {
|
||||
if ((d = ND_rank(aghead(e)) - ND_rank(aghead(e))) == 0)
|
||||
continue;
|
||||
f = ED_to_orig(e);
|
||||
|
@ -111,6 +111,7 @@ import h.elist;
|
||||
import h.point;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
@ -380,7 +381,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -418,7 +419,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -458,7 +459,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
@ -780,8 +781,8 @@ try {
|
||||
Agnode_s n;
|
||||
Agedge_s e, f;
|
||||
int c;
|
||||
for (c = 0; c < GD_comp(g).getInt("size"); c++) {
|
||||
GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
|
||||
for (c = 0; c < GD_comp(g).size; c++) {
|
||||
GD_nlist(g, GD_comp(g).getFromList(c));
|
||||
for (n = GD_nlist(g); n!=null; n = ND_next(n)) {
|
||||
renewlist(ND_in(n).amp());
|
||||
renewlist(ND_out(n).amp());
|
||||
@ -814,9 +815,8 @@ try {
|
||||
ED_to_virt(e, null);
|
||||
}
|
||||
}
|
||||
Memory.free(GD_comp(g).getPtr("list"));
|
||||
GD_comp(g).setPtr("list", null);
|
||||
GD_comp(g).setInt("size", 0);
|
||||
GD_comp(g).resetList();
|
||||
GD_comp(g).size = 0;
|
||||
} finally {
|
||||
LEAVING("1xov2qhuxj1f9nbzu3xsa6679","cleanup1");
|
||||
}
|
||||
@ -1130,7 +1130,7 @@ ENTERING("3bcr1748gqnu8ogb73jeja7ly","minmax_edges");
|
||||
try {
|
||||
Agnode_s n;
|
||||
Agedge_s e;
|
||||
final __struct__<point> slen = __struct__.from(point.class);
|
||||
final __struct__<point> slen = JUtils.from(point.class);
|
||||
slen.setInt("x", 0);
|
||||
slen.setInt("y", 0);
|
||||
if ((GD_maxset(g) == null) && (GD_minset(g) == null))
|
||||
@ -1211,8 +1211,9 @@ try {
|
||||
CString s;
|
||||
if ((s = agget(g, new CString("nslimit1")))!=null)
|
||||
UNSUPPORTED("9tp2zk1tsr4ce9rwsr0is9u3o"); // maxiter = atof(s) * agnnodes(g);
|
||||
for (c = 0; c < GD_comp(g).getInt("size"); c++) {
|
||||
GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
|
||||
for (c = 0; c < GD_comp(g).size; c++) {
|
||||
//GD_nlist(g, GD_comp(g).getArrayOfPtr("list").plus(c).getPtr());
|
||||
GD_nlist(g, GD_comp(g).getFromList(c));
|
||||
rank(g, (GD_n_cluster(g) == 0 ? 1 : 0), maxiter); /* TB balance */
|
||||
}
|
||||
} finally {
|
||||
@ -1273,7 +1274,7 @@ LEAVING("cdh8wnb99v90dy6efpbzmrjix","expand_ranksets");
|
||||
public static void dot1_rank(Agraph_s g, aspect_t asp) {
|
||||
ENTERING("2o4rmb4o6f6zh46ak3se91rwr","dot1_rank");
|
||||
try {
|
||||
final __struct__<point> p = __struct__.from(point.class);
|
||||
final __struct__<point> p = JUtils.from(point.class);
|
||||
edgelabel_ranks(g);
|
||||
if (asp!=null) {
|
||||
UNSUPPORTED("kh7e20nqwuserrnpf3zpvuyl"); // init_UF_size(g);
|
||||
@ -1282,7 +1283,7 @@ UNSUPPORTED("d88j5oswhz0d3yvd4wlvxohmu"); // initEdgeTypes(g);
|
||||
collapse_sets(g,g);
|
||||
/*collapse_leaves(g); */
|
||||
class1_(g);
|
||||
p.____(minmax_edges(g));
|
||||
p.___(minmax_edges(g));
|
||||
decompose(g, 0);
|
||||
if (asp!=null && ((GD_comp(g).getInt("size") > 1)||(GD_n_cluster(g) > 0))) {
|
||||
UNSUPPORTED("evcjt85irnaa02v8cam07i009"); // asp->badGraph = 1;
|
||||
|
@ -56,6 +56,7 @@ import h.Agraph_s;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -324,7 +325,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -362,7 +363,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -402,7 +403,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class clusteredges__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class comp__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class fdpinit__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class grid__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.jmp_buf;
|
||||
|
||||
@ -317,7 +318,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -355,7 +356,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -395,7 +396,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class tlayout__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class xlayout__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -68,6 +68,7 @@ import h.gvlayout_features_t;
|
||||
import h.gvplugin_installed_t;
|
||||
import h.layout_type;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
@ -176,8 +177,8 @@ public class gvlayout__c {
|
||||
|
||||
//3 2g20jitdi8afuoei8p1mcfg9l
|
||||
// int gvlayout_select(GVC_t * gvc, const char *layout)
|
||||
private final static __struct__<gvlayout_features_t> dotgen_features = __struct__.from(gvlayout_features_t.class);
|
||||
private final static __struct__<gvlayout_engine_s> dotgen_engine = __struct__.from(gvlayout_engine_s.class);
|
||||
private final static __struct__<gvlayout_features_t> dotgen_features = JUtils.from(gvlayout_features_t.class);
|
||||
private final static __struct__<gvlayout_engine_s> dotgen_engine = JUtils.from(gvlayout_engine_s.class);
|
||||
static {
|
||||
dotgen_features.setInt("flags", 1<<0);
|
||||
dotgen_engine.setPtr("layout", function(gen.lib.dotgen.dotinit__c.class, "dot_layout"));
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class gvrender__c {
|
||||
@ -180,7 +181,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -218,7 +219,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -258,7 +259,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -48,6 +48,7 @@ import static smetana.core.JUtilsDebug.ENTERING;
|
||||
import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class nrtmain__c {
|
||||
@ -170,7 +171,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.jmp_buf;
|
||||
|
||||
@ -185,7 +186,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -223,7 +224,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -263,7 +264,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.jmp_buf;
|
||||
|
||||
@ -317,7 +318,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -355,7 +356,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -395,7 +396,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -53,6 +53,7 @@ import h.boxf;
|
||||
import h.pack_info;
|
||||
import h.pointf;
|
||||
import smetana.core.CString;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class pack__c {
|
||||
@ -320,7 +321,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -358,7 +359,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -398,7 +399,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -49,6 +49,7 @@ import static smetana.core.JUtilsDebug.LEAVING;
|
||||
import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.boxf;
|
||||
import h.pointf;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class ptest__c {
|
||||
@ -316,7 +317,7 @@ return pointfof_w_(x, y).copy();
|
||||
private static __struct__<pointf> pointfof_w_(double x, double y) {
|
||||
ENTERING("c1s4k85p1cdfn176o3uryeros","pointfof");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", x);
|
||||
r.setDouble("y", y);
|
||||
return r;
|
||||
@ -354,7 +355,7 @@ return boxfof_w_(llx, lly, urx, ury).copy();
|
||||
private static __struct__<boxf> boxfof_w_(double llx, double lly, double urx, double ury) {
|
||||
ENTERING("1vvsta5i8of59frav6uymguav","boxfof");
|
||||
try {
|
||||
final __struct__<boxf> b = __struct__.from(boxf.class);
|
||||
final __struct__<boxf> b = JUtils.from(boxf.class);
|
||||
b.getStruct("LL").setDouble("x", llx);
|
||||
b.getStruct("LL").setDouble("y", lly);
|
||||
b.getStruct("UR").setDouble("x", urx);
|
||||
@ -394,7 +395,7 @@ return add_pointf_w_(p.copy(), q.copy()).copy();
|
||||
private static __struct__<pointf> add_pointf_w_(final __struct__<pointf> p, final __struct__<pointf> q) {
|
||||
ENTERING("arrsbik9b5tnfcbzsm8gr2chx","add_pointf");
|
||||
try {
|
||||
final __struct__<pointf> r = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> r = JUtils.from(pointf.class);
|
||||
r.setDouble("x", p.getDouble("x") + q.getDouble("x"));
|
||||
r.setDouble("y", p.getDouble("y") + q.getDouble("y"));
|
||||
return r;
|
||||
|
@ -56,6 +56,7 @@ import static smetana.core.Macro.UNSUPPORTED;
|
||||
import h.Ppoly_t;
|
||||
import h.pointf;
|
||||
import h.tna_t;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
@ -104,8 +105,8 @@ try {
|
||||
if (setjmp(jbuf)!=0)
|
||||
UNSUPPORTED("8d9xfgejx5vgd6shva5wk5k06"); // return -1;
|
||||
/* generate the splines */
|
||||
evs.plus(0).getStruct().____(normv(evs.plus(0).getStruct()));
|
||||
evs.plus(1).getStruct().____(normv(evs.plus(1).getStruct()));
|
||||
evs.plus(0).getStruct().___(normv(evs.plus(0).getStruct()));
|
||||
evs.plus(1).getStruct().___(normv(evs.plus(1).getStruct()));
|
||||
Z.z().opl = 0;
|
||||
growops(4);
|
||||
Z.z().ops_route.plus(Z.z().opl).setStruct(inps.plus(0).getStruct());
|
||||
@ -134,8 +135,8 @@ return reallyroutespline_w_(edges, edgen, inps, inpn, ev0.copy(), ev1.copy());
|
||||
private static int reallyroutespline_w_(__ptr__ edges, int edgen, __ptr__ inps, int inpn, final __struct__<pointf> ev0, final __struct__<pointf> ev1) {
|
||||
ENTERING("13dxqzbgtpl4ubnnvw6ehzzi9","reallyroutespline");
|
||||
try {
|
||||
final __struct__<pointf> p1 = __struct__.from(pointf.class), p2 = __struct__.from(pointf.class), cp1 = __struct__.from(pointf.class), cp2 = __struct__.from(pointf.class), p = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> v1 = __struct__.from(pointf.class), v2 = __struct__.from(pointf.class), splitv = __struct__.from(pointf.class), splitv1 = __struct__.from(pointf.class), splitv2 = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), cp1 = JUtils.from(pointf.class), cp2 = JUtils.from(pointf.class), p = JUtils.from(pointf.class);
|
||||
final __struct__<pointf> v1 = JUtils.from(pointf.class), v2 = JUtils.from(pointf.class), splitv = JUtils.from(pointf.class), splitv1 = JUtils.from(pointf.class), splitv2 = JUtils.from(pointf.class);
|
||||
double maxd, d, t;
|
||||
int maxi, i, spliti;
|
||||
if (Z.z().tnan < inpn) {
|
||||
@ -161,8 +162,8 @@ try {
|
||||
return -1;
|
||||
if (splinefits(edges, edgen, p1, v1, p2, v2, inps, inpn)!=0)
|
||||
return 0;
|
||||
cp1.____(add(p1, scale(v1, 1 / 3.0)));
|
||||
cp2.____(sub(p2, scale(v2, 1 / 3.0)));
|
||||
cp1.___(add(p1, scale(v1, 1 / 3.0)));
|
||||
cp2.___(sub(p2, scale(v2, 1 / 3.0)));
|
||||
for (maxd = -1, maxi = -1, i = 1; i < inpn - 1; i++) {
|
||||
t = Z.z().tnas.plus(i).getDouble("t");
|
||||
p.setDouble("x", B0(t) * p1.getDouble("x") + B1(t) * cp1.getDouble("x") + B2(t) * cp2.getDouble("x") + B3(t) * p2.getDouble("x"));
|
||||
@ -171,9 +172,9 @@ try {
|
||||
{maxd = d; maxi = i;}
|
||||
}
|
||||
spliti = maxi;
|
||||
splitv1.____(normv(sub(inps.plus(spliti).getStruct(), inps.plus(spliti - 1).getStruct())));
|
||||
splitv2.____(normv(sub(inps.plus(spliti + 1).getStruct(), inps.plus(spliti).getStruct())));
|
||||
splitv.____(normv(add(splitv1, splitv2)));
|
||||
splitv1.___(normv(sub(inps.plus(spliti).getStruct(), inps.plus(spliti - 1).getStruct())));
|
||||
splitv2.___(normv(sub(inps.plus(spliti + 1).getStruct(), inps.plus(spliti).getStruct())));
|
||||
splitv.___(normv(add(splitv1, splitv2)));
|
||||
reallyroutespline(edges, edgen, inps, spliti + 1, ev0, splitv);
|
||||
reallyroutespline(edges, edgen, inps.plus(spliti), inpn - spliti, splitv,
|
||||
ev1);
|
||||
@ -195,7 +196,7 @@ return mkspline_w_(inps, inpn, tnas, ev0.copy(), ev1.copy(), sp0, sv0, sp1, sv1)
|
||||
private static int mkspline_w_(__ptr__ inps, int inpn, __ptr__ tnas, final __struct__<pointf> ev0, final __struct__<pointf> ev1, __ptr__ sp0, __ptr__ sv0, __ptr__ sp1, __ptr__ sv1) {
|
||||
ENTERING("29sok6jkfyobf83q130snkhmh","mkspline");
|
||||
try {
|
||||
final __struct__<pointf> tmp = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> tmp = JUtils.from(pointf.class);
|
||||
double c[][] = new double[2][2];
|
||||
double x[] = new double[2];
|
||||
double det01, det0X, detX1;
|
||||
@ -209,7 +210,7 @@ try {
|
||||
c[0][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct());
|
||||
c[1][0] = c[0][1];
|
||||
c[1][1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct());
|
||||
tmp.____(sub(inps.plus(i).getStruct(), add(scale(inps.plus(0).getStruct(), B01(tnas.plus(i).getStruct().getDouble("t"))),
|
||||
tmp.___(sub(inps.plus(i).getStruct(), add(scale(inps.plus(0).getStruct(), B01(tnas.plus(i).getStruct().getDouble("t"))),
|
||||
scale(inps.plus(inpn - 1).getStruct(), B23(tnas.plus(i).getStruct().getDouble("t"))))));
|
||||
x[0] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(0).getStruct(), tmp);
|
||||
x[1] += dot(tnas.plus(i).getStruct().getArrayOfStruct("a").plus(1).getStruct(), tmp);
|
||||
@ -344,7 +345,7 @@ try {
|
||||
int rooti, rootn;
|
||||
int ei;
|
||||
final __array_of_struct__ lps = __array_of_struct__.malloc(pointf.class, 2);
|
||||
final __struct__<pointf> ip = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> ip = JUtils.from(pointf.class);
|
||||
double t, ta, tb, tc, td;
|
||||
for (ei = 0; ei < edgen; ei++) {
|
||||
lps.plus(0).setStruct(edges.plus(ei).getStruct("a"));
|
||||
|
@ -59,6 +59,7 @@ import h.Ppoly_t;
|
||||
import h.pointf;
|
||||
import h.pointnlink_t;
|
||||
import h.triangle_t;
|
||||
import smetana.core.JUtils;
|
||||
import smetana.core.Memory;
|
||||
import smetana.core.Z;
|
||||
import smetana.core.__array_of_struct__;
|
||||
@ -98,7 +99,7 @@ private static jmp_buf jbuf = new jmp_buf();
|
||||
|
||||
//1 cc2hmcygbtg3adbwgkunssdhx
|
||||
// static deque_t dq
|
||||
//private final static __struct__<deque_t> dq = __struct__.from(deque_t.class);
|
||||
//private final static __struct__<deque_t> dq = JUtils.from(deque_t.class);
|
||||
|
||||
//1 3k2f2er3efsrl0210su710vf
|
||||
// static Ppoint_t *ops
|
||||
@ -117,7 +118,7 @@ ENTERING("2gub5b19vo2qexn56nw23wage","Pshortestpath");
|
||||
try {
|
||||
int pi, minpi;
|
||||
double minx;
|
||||
final __struct__<pointf> p1 = __struct__.from(pointf.class), p2 = __struct__.from(pointf.class), p3 = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class), p3 = JUtils.from(pointf.class);
|
||||
int trii, trij, ftrii, ltrii;
|
||||
int ei;
|
||||
final __array_of_struct__ epnls = __array_of_struct__.malloc(pointnlink_t.class, 2);
|
||||
@ -572,7 +573,7 @@ LEAVING("22a9ajg9t8ovqsigk3tyu3rkd","intersects");
|
||||
public static boolean between(__ptr__ pap, __ptr__ pbp, __ptr__ pcp) {
|
||||
ENTERING("uh5n18rzyevtb4cwpni70qpc","between");
|
||||
try {
|
||||
final __struct__<pointf> p1 = __struct__.from(pointf.class), p2 = __struct__.from(pointf.class);
|
||||
final __struct__<pointf> p1 = JUtils.from(pointf.class), p2 = JUtils.from(pointf.class);
|
||||
p1.setDouble("x", pbp.getDouble("x") - pap.getDouble("x"));
|
||||
p1.setDouble("y", pbp.getDouble("y") - pap.getDouble("y"));
|
||||
p2.setDouble("x", pcp.getDouble("x") - pap.getDouble("x"));
|
||||
|
160
src/h/ST_Agdesc_s.java
Normal file
160
src/h/ST_Agdesc_s.java
Normal file
@ -0,0 +1,160 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.Area;
|
||||
import smetana.core.amiga.AreaInt;
|
||||
import smetana.core.amiga.InternalData;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_Agdesc_s extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
public int directed; /* if edges are asymmetric */
|
||||
public int strict; /* if multi-edges forbidden */
|
||||
public int no_loop; /* if no loops */
|
||||
public int maingraph; /* if this is the top level graph */
|
||||
public int flatlock; /* if sets are flattened into lists in cdt */
|
||||
public int no_write; /* if a temporary subgraph */
|
||||
public int has_attrs; /* if string attr tables should be initialized */
|
||||
public int has_cmpnd; /* if may contain collapsed nodes */
|
||||
|
||||
public ST_Agdesc_s() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ST_Agdesc_s(StarStruct parent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ copy() {
|
||||
final ST_Agdesc_s result = new ST_Agdesc_s();
|
||||
result.directed = directed;
|
||||
result.strict = strict;
|
||||
result.no_loop = no_loop;
|
||||
result.maingraph = maingraph;
|
||||
result.flatlock = flatlock;
|
||||
result.no_write = no_write;
|
||||
result.has_attrs = has_attrs;
|
||||
result.has_cmpnd = has_cmpnd;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ other) {
|
||||
ST_Agdesc_s other2 = (ST_Agdesc_s) other;
|
||||
directed = other2.directed;
|
||||
strict = other2.strict;
|
||||
no_loop = other2.no_loop;
|
||||
maingraph = other2.maingraph;
|
||||
flatlock = other2.flatlock;
|
||||
no_write = other2.no_write;
|
||||
has_attrs = other2.has_attrs;
|
||||
has_cmpnd = other2.has_cmpnd;
|
||||
}
|
||||
|
||||
public class MyInternalData extends UnsupportedStarStruct implements InternalData {
|
||||
|
||||
@Override
|
||||
public Area getArea(String name) {
|
||||
final AreaInt result = new AreaInt();
|
||||
if (name.equals("directed")) {
|
||||
result.setInternal(directed);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("strict")) {
|
||||
result.setInternal(strict);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("no_loop")) {
|
||||
result.setInternal(no_loop);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("maingraph")) {
|
||||
result.setInternal(maingraph);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("flatlock")) {
|
||||
result.setInternal(flatlock);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("no_write")) {
|
||||
result.setInternal(no_write);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("has_attrs")) {
|
||||
result.setInternal(has_attrs);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("has_cmpnd")) {
|
||||
result.setInternal(has_cmpnd);
|
||||
return result;
|
||||
}
|
||||
return super.getArea(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct getInternalData() {
|
||||
return new MyInternalData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// struct Agdesc_s { /* graph descriptor */
|
||||
// unsigned directed:1; /* if edges are asymmetric */
|
||||
// unsigned strict:1; /* if multi-edges forbidden */
|
||||
// unsigned no_loop:1; /* if no loops */
|
||||
// unsigned maingraph:1; /* if this is the top level graph */
|
||||
// unsigned flatlock:1; /* if sets are flattened into lists in cdt */
|
||||
// unsigned no_write:1; /* if a temporary subgraph */
|
||||
// unsigned has_attrs:1; /* if string attr tables should be initialized */
|
||||
// unsigned has_cmpnd:1; /* if may contain collapsed nodes */
|
||||
// };
|
118
src/h/ST_Agiddisc_s.java
Normal file
118
src/h/ST_Agiddisc_s.java
Normal file
@ -0,0 +1,118 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStruct;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
|
||||
public class ST_Agiddisc_s extends UnsupportedStruct {
|
||||
|
||||
public CFunction open;
|
||||
public CFunction map;
|
||||
public CFunction alloc;
|
||||
public CFunction free;
|
||||
public CFunction print;
|
||||
public CFunction close;
|
||||
public CFunction idregister;
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new UnsupportedStarStruct() {
|
||||
@Override
|
||||
public Object call(String fieldName, Object... args) {
|
||||
if (fieldName.equals("open")) {
|
||||
return open.exe(args);
|
||||
}
|
||||
if (fieldName.equals("map")) {
|
||||
return map.exe(args);
|
||||
}
|
||||
if (fieldName.equals("idregister")) {
|
||||
return idregister.exe(args);
|
||||
}
|
||||
if (fieldName.equals("print")) {
|
||||
return print.exe(args);
|
||||
}
|
||||
return super.call(fieldName, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr(String fieldName) {
|
||||
if (fieldName.equals("print")) {
|
||||
return print;
|
||||
}
|
||||
return super.getPtr(fieldName);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "struct Agiddisc_s",
|
||||
// "{",
|
||||
// "void *(*open) (Agraph_t * g, Agdisc_t*)",
|
||||
// "long (*map) (void *state, int objtype, char *str, unsigned long *id, int createflag)",
|
||||
// "long (*alloc) (void *state, int objtype, unsigned long id)",
|
||||
// "void (*free) (void *state, int objtype, unsigned long id)",
|
||||
// "char *(*print) (void *state, int objtype, unsigned long id)",
|
||||
// "void (*close) (void *state)",
|
||||
// "void (*idregister) (void *state, int objtype, void *obj)",
|
||||
// "}");
|
||||
}
|
||||
|
||||
// struct Agiddisc_s { /* object ID allocator */
|
||||
// void *(*open) (Agraph_t * g, Agdisc_t*); /* associated with a graph */
|
||||
// long (*map) (void *state, int objtype, char *str, unsigned long *id,
|
||||
// int createflag);
|
||||
// long (*alloc) (void *state, int objtype, unsigned long id);
|
||||
// void (*free) (void *state, int objtype, unsigned long id);
|
||||
// char *(*print) (void *state, int objtype, unsigned long id);
|
||||
// void (*close) (void *state);
|
||||
// void (*idregister) (void *state, int objtype, void *obj);
|
||||
// };
|
95
src/h/ST_Agmemdisc_s.java
Normal file
95
src/h/ST_Agmemdisc_s.java
Normal file
@ -0,0 +1,95 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStruct;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_Agmemdisc_s extends UnsupportedStruct {
|
||||
|
||||
public CFunction open;
|
||||
public CFunction alloc;
|
||||
public CFunction resize;
|
||||
public CFunction free;
|
||||
public CFunction close;
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new UnsupportedStarStruct() {
|
||||
|
||||
@Override
|
||||
public Object call(String fieldName, Object... args) {
|
||||
if (fieldName.equals("open")) {
|
||||
return open.exe(args);
|
||||
}
|
||||
if (fieldName.equals("alloc")) {
|
||||
return alloc.exe(args);
|
||||
}
|
||||
return super.call(fieldName, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "struct Agmemdisc_s",
|
||||
// "{",
|
||||
// "void *(*open) (Agdisc_t*)",
|
||||
// "void *(*alloc) (void *state, size_t req)",
|
||||
// "void *(*resize) (void *state, void *ptr, size_t old, size_t req)",
|
||||
// "void (*free) (void *state, void *ptr)",
|
||||
// "void (*close) (void *state)",
|
||||
// "}");
|
||||
}
|
||||
|
||||
// struct Agmemdisc_s { /* memory allocator */
|
||||
// void *(*open) (Agdisc_t*); /* independent of other resources */
|
||||
// void *(*alloc) (void *state, size_t req);
|
||||
// void *(*resize) (void *state, void *ptr, size_t old, size_t req);
|
||||
// void (*free) (void *state, void *ptr);
|
||||
// void (*close) (void *state);
|
||||
// };
|
198
src/h/ST_Agtag_s.java
Normal file
198
src/h/ST_Agtag_s.java
Normal file
@ -0,0 +1,198 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.Area;
|
||||
import smetana.core.amiga.AreaInt;
|
||||
import smetana.core.amiga.InternalData;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_Agtag_s extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
public int objtype;
|
||||
public int mtflock;
|
||||
public int attrwf;
|
||||
public int seq;
|
||||
public int id;
|
||||
|
||||
public ST_Agtag_s(StarStruct parent) {
|
||||
}
|
||||
|
||||
public ST_Agtag_s() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getRealClass() {
|
||||
return Agtag_s.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ copy() {
|
||||
final ST_Agtag_s result = new ST_Agtag_s();
|
||||
result.objtype = objtype;
|
||||
result.mtflock = mtflock;
|
||||
result.attrwf = attrwf;
|
||||
result.seq = seq;
|
||||
result.id = id;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ other) {
|
||||
// if (other instanceof ST_Agtag_s) {
|
||||
final ST_Agtag_s other2 = (ST_Agtag_s) other;
|
||||
objtype = other2.objtype;
|
||||
mtflock = other2.mtflock;
|
||||
attrwf = other2.attrwf;
|
||||
seq = other2.seq;
|
||||
id = other2.id;
|
||||
// } else {
|
||||
// objtype = other.getInt("objtype");
|
||||
// mtflock = other.getInt("mtflock");
|
||||
// attrwf = other.getInt("attrwf");
|
||||
// seq = other.getInt("seq");
|
||||
// id = other.getInt("id");
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
public void memcopyFrom(Area source) {
|
||||
final ST_Agtag_s other2 = (ST_Agtag_s) source;
|
||||
objtype = other2.objtype;
|
||||
mtflock = other2.mtflock;
|
||||
attrwf = other2.attrwf;
|
||||
seq = other2.seq;
|
||||
id = other2.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
copyDataFrom(other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Area getArea(String name) {
|
||||
final AreaInt result = new AreaInt();
|
||||
if (name.equals("objtype")) {
|
||||
result.setInternal(objtype);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("mtflock")) {
|
||||
result.setInternal(mtflock);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("attrwf")) {
|
||||
result.setInternal(attrwf);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("seq")) {
|
||||
result.setInternal(seq);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("id")) {
|
||||
result.setInternal(id);
|
||||
return result;
|
||||
}
|
||||
return super.getArea(name);
|
||||
}
|
||||
|
||||
public class MyInternalData extends UnsupportedStarStruct implements InternalData {
|
||||
|
||||
@Override
|
||||
public Area getArea(String name) {
|
||||
final AreaInt result = new AreaInt();
|
||||
if (name.equals("objtype")) {
|
||||
result.setInternal(objtype);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("mtflock")) {
|
||||
result.setInternal(mtflock);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("attrwf")) {
|
||||
result.setInternal(attrwf);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("seq")) {
|
||||
result.setInternal(seq);
|
||||
return result;
|
||||
}
|
||||
if (name.equals("id")) {
|
||||
result.setInternal(id);
|
||||
return result;
|
||||
}
|
||||
return super.getArea(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct getInternalData() {
|
||||
return new MyInternalData();
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "struct Agtag_s",
|
||||
// "{",
|
||||
// "unsigned objtype:2",
|
||||
// "unsigned mtflock:1",
|
||||
// "unsigned attrwf:1",
|
||||
// "unsigned seq:(sizeof(unsigned) * 8 - 4)",
|
||||
// "unsigned long id",
|
||||
// "}");
|
||||
}
|
||||
|
||||
// struct Agtag_s {
|
||||
// unsigned objtype:2; /* see literal tags below */
|
||||
// unsigned mtflock:1; /* move-to-front lock, see above */
|
||||
// unsigned attrwf:1; /* attrs written (parity, write.c) */
|
||||
// unsigned seq:(sizeof(unsigned) * 8 - 4); /* sequence no. */
|
||||
// unsigned long id; /* client ID */
|
||||
// };
|
75
src/h/ST_arrowname_t.java
Normal file
75
src/h/ST_arrowname_t.java
Normal file
@ -0,0 +1,75 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CString;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class ST_arrowname_t extends UnsupportedStructAndPtr {
|
||||
|
||||
public CString name;
|
||||
public int type;
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
ST_arrowname_t other2 = (ST_arrowname_t) other;
|
||||
this.name = other2.name == null ? null : other2.name.duplicate();
|
||||
this.type = other2.type;
|
||||
}
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct arrowname_t",
|
||||
// "{",
|
||||
// "char *name",
|
||||
// "int type",
|
||||
// "}",
|
||||
// "arrowname_t");
|
||||
}
|
||||
|
||||
// typedef struct arrowname_t {
|
||||
// char *name;
|
||||
// int type;
|
||||
// } arrowname_t;
|
106
src/h/ST_arrowtype_t.java
Normal file
106
src/h/ST_arrowtype_t.java
Normal file
@ -0,0 +1,106 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
|
||||
public class ST_arrowtype_t extends UnsupportedStructAndPtr {
|
||||
|
||||
public int type;
|
||||
public double lenfact;
|
||||
public CFunction gen;
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
ST_arrowtype_t other2 = (ST_arrowtype_t) other;
|
||||
type = other2.type;
|
||||
lenfact = other2.lenfact;
|
||||
gen = other2.gen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String fieldName) {
|
||||
if (fieldName.equals("type")) {
|
||||
return type;
|
||||
}
|
||||
return super.getInt(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(String fieldName) {
|
||||
if (fieldName.equals("lenfact")) {
|
||||
return lenfact;
|
||||
}
|
||||
return super.getDouble(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr(String fieldName) {
|
||||
if (fieldName.equals("gen")) {
|
||||
return gen;
|
||||
}
|
||||
return super.getPtr(fieldName);
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct arrowtype_t",
|
||||
// "{",
|
||||
// "int type",
|
||||
// "double lenfact",
|
||||
// "void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag)",
|
||||
// "}",
|
||||
// "arrowtype_t");
|
||||
}
|
||||
|
||||
// typedef struct arrowtype_t {
|
||||
// int type;
|
||||
// double lenfact; /* ratio of length of this arrow type to standard arrow */
|
||||
// void (*gen) (GVJ_t * job, pointf p, pointf u, double arrowsize, double penwidth, int flag); /* generator function for
|
||||
// type */
|
||||
// } arrowtype_t;
|
170
src/h/ST_boxf.java
Normal file
170
src/h/ST_boxf.java
Normal file
@ -0,0 +1,170 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_boxf extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
|
||||
public final ST_pointf LL = new ST_pointf(this);
|
||||
public final ST_pointf UR = new ST_pointf(this);
|
||||
|
||||
public ST_boxf(StarStruct parent) {
|
||||
}
|
||||
|
||||
public ST_boxf() {
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void setStruct(__struct__ value) {
|
||||
// final ST_boxf other = (ST_boxf) value;
|
||||
// this.LL.setStruct(other.LL);
|
||||
// this.UR.setStruct(other.UR);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public __struct__ getStruct(String fieldName) {
|
||||
// if (fieldName.equals("LL")) {
|
||||
// return LL;
|
||||
// }
|
||||
// if (fieldName.equals("UR")) {
|
||||
// return UR;
|
||||
// }
|
||||
return super.getStruct(fieldName);
|
||||
}
|
||||
|
||||
public __struct__ getStructInternal(String fieldName) {
|
||||
if (fieldName.equals("LL")) {
|
||||
return LL;
|
||||
}
|
||||
if (fieldName.equals("UR")) {
|
||||
return UR;
|
||||
}
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStruct(String fieldName, __struct__ newData) {
|
||||
if (fieldName.equals("LL")) {
|
||||
this.LL.setStruct(newData);
|
||||
return;
|
||||
}
|
||||
if (fieldName.equals("UR")) {
|
||||
this.UR.setStruct(newData);
|
||||
return;
|
||||
}
|
||||
super.setStruct(fieldName, newData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ST_boxf copy() {
|
||||
final ST_boxf result = new ST_boxf();
|
||||
result.LL.copyDataFrom((__struct__) this.LL);
|
||||
result.UR.copyDataFrom((__struct__) this.UR);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ value) {
|
||||
final ST_boxf other = (ST_boxf) value;
|
||||
this.LL.setStruct(other.LL);
|
||||
this.UR.setStruct(other.UR);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void copyDataFrom(__ptr__ value) {
|
||||
// final ST_boxf other = (ST_boxf) value;
|
||||
// this.LL.setStruct(other.LL);
|
||||
// this.UR.setStruct(other.UR);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ value) {
|
||||
final ST_boxf other = (ST_boxf) value;
|
||||
this.LL.setStruct(other.LL);
|
||||
this.UR.setStruct(other.UR);
|
||||
}
|
||||
|
||||
class Amp extends UnsupportedStarStruct {
|
||||
|
||||
@Override
|
||||
public __struct__ getStruct(String fieldName) {
|
||||
if (fieldName.equals("LL")) {
|
||||
return LL;
|
||||
}
|
||||
if (fieldName.equals("UR")) {
|
||||
return UR;
|
||||
}
|
||||
return super.getStruct(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ getStruct() {
|
||||
return ST_boxf.this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new Amp();
|
||||
}
|
||||
|
||||
// public interface ST_boxf extends __ptr__ {
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct",
|
||||
// "{",
|
||||
// "pointf LL, UR",
|
||||
// "}",
|
||||
// "boxf");
|
||||
}
|
||||
|
||||
// typedef struct { pointf LL, UR; } boxf;
|
146
src/h/ST_dtdisc_s.java
Normal file
146
src/h/ST_dtdisc_s.java
Normal file
@ -0,0 +1,146 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_dtdisc_s extends UnsupportedStructAndPtr {
|
||||
|
||||
public int key; /* where the key begins in an object */
|
||||
public int size; /* key size and type */
|
||||
public int link; /* offset to Dtlink_t field */
|
||||
public CFunction makef; /* object constructor */
|
||||
public CFunction freef; /* object destructor */
|
||||
public CFunction comparf;/* to compare two objects */
|
||||
public CFunction hashf; /* to compute hash value of an object */
|
||||
public CFunction memoryf;/* to allocate/free memory */
|
||||
public CFunction eventf; /* to process events */
|
||||
|
||||
public ST_dtdisc_s(StarStruct parent) {
|
||||
}
|
||||
|
||||
public ST_dtdisc_s() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
class Amp extends UnsupportedStarStruct {
|
||||
|
||||
private final ST_dtdisc_s parent;
|
||||
|
||||
public Amp(ST_dtdisc_s me) {
|
||||
parent = me;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameThan(StarStruct other) {
|
||||
final Amp other2 = (Amp) other;
|
||||
return parent == other2.parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr(String fieldName) {
|
||||
if (fieldName.equals("memoryf")) {
|
||||
return memoryf;
|
||||
}
|
||||
if (fieldName.equals("eventf")) {
|
||||
return eventf;
|
||||
}
|
||||
if (fieldName.equals("comparf")) {
|
||||
return comparf;
|
||||
}
|
||||
if (fieldName.equals("makef")) {
|
||||
return makef;
|
||||
}
|
||||
return super.getPtr(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String fieldName) {
|
||||
if (fieldName.equals("key")) {
|
||||
return key;
|
||||
}
|
||||
if (fieldName.equals("size")) {
|
||||
return size;
|
||||
}
|
||||
if (fieldName.equals("link")) {
|
||||
return link;
|
||||
}
|
||||
return super.getInt(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ setPtr(String fieldName, __ptr__ newData) {
|
||||
if (fieldName.equals("memoryf")) {
|
||||
memoryf = (CFunction) newData;
|
||||
return newData;
|
||||
}
|
||||
return super.setPtr(fieldName, newData);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new Amp(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// struct _dtdisc_s
|
||||
// { int key; /* where the key begins in an object */
|
||||
// int size; /* key size and type */
|
||||
// int link; /* offset to Dtlink_t field */
|
||||
// Dtmake_f makef; /* object constructor */
|
||||
// Dtfree_f freef; /* object destructor */
|
||||
// Dtcompar_f comparf;/* to compare two objects */
|
||||
// Dthash_f hashf; /* to compute hash value of an object */
|
||||
// Dtmemory_f memoryf;/* to allocate/free memory */
|
||||
// Dtevent_f eventf; /* to process events */
|
||||
// };
|
101
src/h/ST_dtmethod_s.java
Normal file
101
src/h/ST_dtmethod_s.java
Normal file
@ -0,0 +1,101 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.CFunction;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStruct;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_dtmethod_s extends UnsupportedStruct {
|
||||
|
||||
public CFunction searchf;
|
||||
public int type;
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "struct _dtmethod_s",
|
||||
// "{",
|
||||
// "Dtsearch_f searchf",
|
||||
// "int type",
|
||||
// "}");
|
||||
@Override
|
||||
public ST_dtmethod_s copy() {
|
||||
final ST_dtmethod_s result = new ST_dtmethod_s();
|
||||
result.searchf = this.searchf;
|
||||
result.type = this.type;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new UnsupportedStarStruct() {
|
||||
@Override
|
||||
public int getInt(String fieldName) {
|
||||
if (fieldName.equals("type")) {
|
||||
return type;
|
||||
}
|
||||
return super.getInt(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr(String fieldName) {
|
||||
if (fieldName.equals("searchf")) {
|
||||
return searchf;
|
||||
}
|
||||
return super.getPtr(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object call(String fieldName, Object... args) {
|
||||
if (fieldName.equals("searchf")) {
|
||||
return searchf.exe(args);
|
||||
}
|
||||
return super.call(fieldName, args);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
234
src/h/ST_elist.java
Normal file
234
src/h/ST_elist.java
Normal file
@ -0,0 +1,234 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedArrayOfPtr;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__array_of_ptr__;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_elist extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
|
||||
public int size;
|
||||
private List list;
|
||||
|
||||
public ST_elist() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public ST_elist(StarStruct parent) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ other) {
|
||||
ST_elist other2 = (ST_elist) other;
|
||||
this.size = other2.size;
|
||||
this.list = other2.list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
ST_elist other2 = (ST_elist) other;
|
||||
this.size = other2.size;
|
||||
this.list = other2.list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ST_elist copy() {
|
||||
final ST_elist result = new ST_elist();
|
||||
result.size = this.size;
|
||||
result.list = this.list;
|
||||
return result;
|
||||
}
|
||||
|
||||
public boolean listNotNull() {
|
||||
return list != null;
|
||||
}
|
||||
|
||||
public void mallocEmpty(Class cl, int nb) {
|
||||
list = new ArrayList();
|
||||
while (list.size() < nb) {
|
||||
list.add(null);
|
||||
}
|
||||
}
|
||||
|
||||
class ArrayOfPtr extends UnsupportedArrayOfPtr {
|
||||
|
||||
private int pos;
|
||||
|
||||
private ArrayOfPtr(int pos) {
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __array_of_ptr__ plus(int delta) {
|
||||
return new ArrayOfPtr(pos + delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPtr(__ptr__ value) {
|
||||
list.set(pos, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr() {
|
||||
return (__ptr__) list.get(pos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Amp extends UnsupportedStarStruct {
|
||||
|
||||
@Override
|
||||
public int getInt(String fieldName) {
|
||||
if (fieldName.equals("size")) {
|
||||
return size;
|
||||
}
|
||||
return ST_elist.this.getInt(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInt(String fieldName, int data) {
|
||||
if (fieldName.equals("size")) {
|
||||
size = data;
|
||||
return;
|
||||
}
|
||||
ST_elist.this.setInt(fieldName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __array_of_ptr__ getArrayOfPtr(String fieldName) {
|
||||
if (fieldName.equals("list")) {
|
||||
if (list == null) {
|
||||
return null;
|
||||
}
|
||||
return new ArrayOfPtr(0);
|
||||
}
|
||||
return ST_elist.this.getArrayOfPtr(fieldName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new Amp();
|
||||
}
|
||||
|
||||
public void realloc(int nb) {
|
||||
if (list == null) {
|
||||
list = new ArrayList();
|
||||
}
|
||||
while (list.size() < nb) {
|
||||
list.add(null);
|
||||
}
|
||||
}
|
||||
|
||||
class Ptr extends UnsupportedStructAndPtr {
|
||||
|
||||
private final int pos;
|
||||
|
||||
public Ptr(int pos) {
|
||||
this.pos = pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ plus(int pointerMove) {
|
||||
return new Ptr(pos + pointerMove);
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr() {
|
||||
return (__ptr__) list.get(pos);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void free() {
|
||||
list = null;
|
||||
}
|
||||
|
||||
public void setInList(int idx, Object value) {
|
||||
list.set(idx, value);
|
||||
}
|
||||
|
||||
public __ptr__ getFromList(int i) {
|
||||
return (__ptr__) list.get(i);
|
||||
}
|
||||
|
||||
public __ptr__ getTheList() {
|
||||
if (list == null) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
return new Ptr(0);
|
||||
}
|
||||
|
||||
public __array_of_ptr__ getTheArray() {
|
||||
if (list == null) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
return new ArrayOfPtr(0);
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct elist",
|
||||
// "{",
|
||||
// "edge_t **list",
|
||||
// "int size",
|
||||
// "}",
|
||||
// "elist");
|
||||
}
|
||||
|
||||
// typedef struct elist {
|
||||
// edge_t **list;
|
||||
// int size;
|
||||
// } elist;
|
104
src/h/ST_nlist_t.java
Normal file
104
src/h/ST_nlist_t.java
Normal file
@ -0,0 +1,104 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_nlist_t extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
|
||||
// public __ptr__ list;
|
||||
public int size;
|
||||
private final List data = new ArrayList();
|
||||
|
||||
public ST_nlist_t(StarStruct parent) {
|
||||
}
|
||||
|
||||
public ST_nlist_t() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public void reallocEmpty(int n_nodes, Class<Agnode_s> class1) {
|
||||
while (data.size() < n_nodes) {
|
||||
data.add(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void allocEmpty(int n_nodes, Class<Agnode_s> class1) {
|
||||
data.clear();
|
||||
reallocEmpty(n_nodes, class1);
|
||||
}
|
||||
|
||||
public void setInList(int idx, Agnode_s value) {
|
||||
data.set(idx, value);
|
||||
}
|
||||
|
||||
public __ptr__ getFromList(int i) {
|
||||
return (__ptr__) data.get(i);
|
||||
}
|
||||
|
||||
public void resetList() {
|
||||
data.clear();
|
||||
}
|
||||
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct nlist_t",
|
||||
// "{",
|
||||
// "node_t **list",
|
||||
// "int size",
|
||||
// "}",
|
||||
// "nlist_t");
|
||||
}
|
||||
|
||||
// typedef struct nlist_t {
|
||||
// node_t **list;
|
||||
// int size;
|
||||
// } nlist_t;
|
211
src/h/ST_pointf.java
Normal file
211
src/h/ST_pointf.java
Normal file
@ -0,0 +1,211 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__array_of_ptr__;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.Area;
|
||||
import smetana.core.amiga.StarArrayOfPtr;
|
||||
import smetana.core.amiga.StarArrayOfStruct;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_pointf extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
|
||||
public double x;
|
||||
public double y;
|
||||
|
||||
public ST_pointf() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public class Amp extends UnsupportedStarStruct {
|
||||
|
||||
public double getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
public void setX(double value) {
|
||||
x = value;
|
||||
}
|
||||
|
||||
public void setY(double value) {
|
||||
y = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ getStruct() {
|
||||
return ST_pointf.this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(String fieldName) {
|
||||
return ST_pointf.this.getDouble(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStruct(__struct__ value) {
|
||||
ST_pointf.this.setStruct(value);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ copy() {
|
||||
final ST_pointf result = new ST_pointf();
|
||||
result.x = this.x;
|
||||
result.y = this.y;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStruct(__struct__ value) {
|
||||
final ST_pointf other2 = (ST_pointf) value;
|
||||
this.x = other2.x;
|
||||
this.y = other2.y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void memcopyFrom(Area source) {
|
||||
if (source instanceof StarArrayOfPtr) {
|
||||
final Amp other2 = (Amp) ((StarArrayOfPtr) source).getPtr();
|
||||
this.x = other2.getX();
|
||||
this.y = other2.getY();
|
||||
return;
|
||||
|
||||
}
|
||||
final ST_pointf other2 = (ST_pointf) source;
|
||||
this.x = other2.x;
|
||||
this.y = other2.y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
final ST_pointf other2 = (ST_pointf) other;
|
||||
this.x = other2.x;
|
||||
this.y = other2.y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ____(__ptr__ other) {
|
||||
if (other instanceof __array_of_ptr__) {
|
||||
Amp other2 = (Amp) other.getPtr();
|
||||
this.x = other2.getX();
|
||||
this.y = other2.getY();
|
||||
return;
|
||||
}
|
||||
if (other instanceof StarArrayOfPtr) {
|
||||
Amp other2 = (Amp) other.getPtr();
|
||||
this.x = other2.getX();
|
||||
this.y = other2.getY();
|
||||
return;
|
||||
}
|
||||
if (other instanceof StarArrayOfStruct) {
|
||||
Amp other2 = (Amp) other.getPtr();
|
||||
this.x = other2.getX();
|
||||
this.y = other2.getY();
|
||||
return;
|
||||
}
|
||||
System.err.println("other=" + other.getClass());
|
||||
System.err.println("other=" + other.getPtr().getClass());
|
||||
super.____(other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ other) {
|
||||
final ST_pointf other2 = (ST_pointf) other;
|
||||
this.x = other2.x;
|
||||
this.y = other2.y;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new Amp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(String fieldName) {
|
||||
if (fieldName.equals("x")) {
|
||||
return x;
|
||||
}
|
||||
if (fieldName.equals("y")) {
|
||||
return y;
|
||||
}
|
||||
return super.getDouble(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDouble(String fieldName, double data) {
|
||||
if (fieldName.equals("x")) {
|
||||
this.x = data;
|
||||
return;
|
||||
}
|
||||
if (fieldName.equals("y")) {
|
||||
this.y = data;
|
||||
return;
|
||||
}
|
||||
super.setDouble(fieldName, data);
|
||||
}
|
||||
|
||||
public ST_pointf(StarStruct parent) {
|
||||
}
|
||||
|
||||
// public interface ST_pointf extends __ptr__ {
|
||||
// public static List<String> DEFINITION = Arrays.asList(
|
||||
// "typedef struct pointf_s",
|
||||
// "{",
|
||||
// "double x, y",
|
||||
// "}",
|
||||
// "pointf");
|
||||
}
|
||||
|
||||
// typedef struct pointf_s { double x, y; } pointf;
|
264
src/h/ST_port.java
Normal file
264
src/h/ST_port.java
Normal file
@ -0,0 +1,264 @@
|
||||
/* ========================================================================
|
||||
* PlantUML : a free UML diagram generator
|
||||
* ========================================================================
|
||||
*
|
||||
* Project Info: http://plantuml.com
|
||||
*
|
||||
* If you like this project or if you find it useful, you can support us at:
|
||||
*
|
||||
* http://plantuml.com/patreon (only 1$ per month!)
|
||||
* http://plantuml.com/paypal
|
||||
*
|
||||
* This file is part of Smetana.
|
||||
* Smetana is a partial translation of Graphviz/Dot sources from C to Java.
|
||||
*
|
||||
* (C) Copyright 2009-2017, Arnaud Roques
|
||||
*
|
||||
* This translation is distributed under the same Licence as the original C program:
|
||||
*
|
||||
*************************************************************************
|
||||
* Copyright (c) 2011 AT&T Intellectual Property
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors: See CVS logs. Details at http://www.graphviz.org/
|
||||
*************************************************************************
|
||||
*
|
||||
* THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||
* LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
|
||||
*
|
||||
* ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
|
||||
* RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||
*
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package h;
|
||||
|
||||
import javax.swing.text.html.CSS;
|
||||
|
||||
import smetana.core.CString;
|
||||
import smetana.core.HardcodedStruct;
|
||||
import smetana.core.UnsupportedStarStruct;
|
||||
import smetana.core.UnsupportedStructAndPtr;
|
||||
import smetana.core.__ptr__;
|
||||
import smetana.core.__struct__;
|
||||
import smetana.core.amiga.Area;
|
||||
import smetana.core.amiga.StarStruct;
|
||||
|
||||
public class ST_port extends UnsupportedStructAndPtr implements HardcodedStruct {
|
||||
|
||||
public final ST_pointf p = new ST_pointf(this);
|
||||
public double theta;
|
||||
public ST_boxf.Amp bp;
|
||||
public int defined;
|
||||
public int constrained;
|
||||
public int clip;
|
||||
public int dyna;
|
||||
public int order;
|
||||
public int side;
|
||||
public CString name;
|
||||
|
||||
public ST_port(StarStruct parent) {
|
||||
}
|
||||
|
||||
public ST_port() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ___(__struct__ other) {
|
||||
ST_port other2 = (ST_port) other;
|
||||
this.p.___(other2.p);
|
||||
this.theta = other2.theta;
|
||||
this.bp = other2.bp;
|
||||
this.defined = other2.defined;
|
||||
this.constrained = other2.constrained;
|
||||
this.clip = other2.clip;
|
||||
this.dyna = other2.dyna;
|
||||
this.order = other2.order;
|
||||
this.side = other2.side;
|
||||
this.name = other2.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void copyDataFrom(__struct__ other) {
|
||||
ST_port other2 = (ST_port) other;
|
||||
this.p.___(other2.p);
|
||||
this.theta = other2.theta;
|
||||
this.bp = other2.bp;
|
||||
this.defined = other2.defined;
|
||||
this.constrained = other2.constrained;
|
||||
this.clip = other2.clip;
|
||||
this.dyna = other2.dyna;
|
||||
this.order = other2.order;
|
||||
this.side = other2.side;
|
||||
this.name = other2.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void memcopyFrom(Area other) {
|
||||
ST_port other2 = (ST_port) other;
|
||||
this.p.___(other2.p);
|
||||
this.theta = other2.theta;
|
||||
this.bp = other2.bp;
|
||||
this.defined = other2.defined;
|
||||
this.constrained = other2.constrained;
|
||||
this.clip = other2.clip;
|
||||
this.dyna = other2.dyna;
|
||||
this.order = other2.order;
|
||||
this.side = other2.side;
|
||||
this.name = other2.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ST_port copy() {
|
||||
final ST_port result = new ST_port();
|
||||
result.p.___(this.p);
|
||||
result.theta = this.theta;
|
||||
result.bp = this.bp;
|
||||
result.defined = this.defined;
|
||||
result.constrained = this.constrained;
|
||||
result.clip = this.clip;
|
||||
result.dyna = this.dyna;
|
||||
result.order = this.order;
|
||||
result.side = this.side;
|
||||
result.name = this.name;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public __struct__ getStruct(String fieldName) {
|
||||
if (fieldName.equals("p")) {
|
||||
return p;
|
||||
}
|
||||
return super.getStruct(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStruct(String fieldName, __struct__ newData) {
|
||||
if (fieldName.equals("p")) {
|
||||
p.copyDataFrom(newData);
|
||||
return;
|
||||
}
|
||||
super.setStruct(fieldName, newData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String fieldName) {
|
||||
if (fieldName.equals("constrained")) {
|
||||
return constrained != 0;
|
||||
}
|
||||
if (fieldName.equals("dyna")) {
|
||||
return dyna != 0;
|
||||
}
|
||||
return super.getBoolean(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBoolean(String fieldName, boolean data) {
|
||||
if (fieldName.equals("constrained")) {
|
||||
constrained = data ? 1 : 0;
|
||||
return;
|
||||
}
|
||||
super.setBoolean(fieldName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInt(String fieldName, int data) {
|
||||
if (fieldName.equals("constrained")) {
|
||||
constrained = data;
|
||||
return;
|
||||
}
|
||||
super.setInt(fieldName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String fieldName) {
|
||||
if (fieldName.equals("clip")) {
|
||||
return clip;
|
||||
}
|
||||
if (fieldName.equals("order")) {
|
||||
return order;
|
||||
}
|
||||
if (fieldName.equals("side")) {
|
||||
return side;
|
||||
}
|
||||
return super.getInt(fieldName);
|
||||
}
|
||||
|
||||
public class Amp extends UnsupportedStarStruct {
|
||||
}
|
||||
|
||||
@Override
|
||||
public StarStruct amp() {
|
||||
return new Amp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public __ptr__ getPtr(String fieldName) {
|
||||
if (fieldName.equals("bp")) {
|
||||
return bp;
|
||||
}
|
||||
return super.getPtr(fieldName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDouble(String fieldName, double data) {
|
||||
if (fieldName.equals("theta")) {
|
||||
this.theta = data;
|
||||
return;
|
||||
}
|
||||
super.setDouble(fieldName, data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(String fieldName) {
|
||||
if (fieldName.equals("theta")) {
|
||||
return theta;
|
||||
}
|
||||
return super.getDouble(fieldName);
|
||||
}
|
||||
|
||||
// "typedef struct port",
|
||||
// "{",
|
||||
// "pointf p",
|
||||
// "double theta",
|
||||
// "boxf *bp",
|
||||
// "boolean defined",
|
||||
// "boolean constrained",
|
||||
// "boolean clip",
|
||||
// "boolean dyna",
|
||||
// "unsigned char order",
|
||||
// "unsigned char side",
|
||||
// "char *name",
|
||||
// "}",
|
||||
// "port");
|
||||
}
|
||||
|
||||
// typedef struct port { /* internal edge endpoint specification */
|
||||
// pointf p; /* aiming point relative to node center */
|
||||
// double theta; /* slope in radians */
|
||||
// boxf *bp; /* if not null, points to bbox of
|
||||
// * rectangular area that is port target
|
||||
// */
|
||||
// boolean defined; /* if true, edge has port info at this end */
|
||||
// boolean constrained; /* if true, constraints such as theta are set */
|
||||
// boolean clip; /* if true, clip end to node/port shape */
|
||||
// boolean dyna; /* if true, assign compass point dynamically */
|
||||
// unsigned char order; /* for mincross */
|
||||
// unsigned char side; /* if port is on perimeter of node, this
|
||||
// * contains the bitwise OR of the sides (TOP,
|
||||
// * BOTTOM, etc.) it is on.
|
||||
// */
|
||||
// char *name; /* port name, if it was explicitly given, otherwise NULL */
|
||||
// } port;
|
@ -80,11 +80,11 @@ public class ErrorUml {
|
||||
return type;
|
||||
}
|
||||
|
||||
private int getPosition() {
|
||||
public final int getPosition() {
|
||||
return lineLocation.getPosition();
|
||||
}
|
||||
|
||||
public LineLocation getLineLocation() {
|
||||
public final LineLocation getLineLocation() {
|
||||
return lineLocation;
|
||||
}
|
||||
|
||||
|
@ -78,6 +78,7 @@ public class Option {
|
||||
private int nbThreads = 0;
|
||||
private int ftpPort = -1;
|
||||
private boolean hideMetadata = false;
|
||||
private int imageIndex = 0;
|
||||
|
||||
private File outputDir = null;
|
||||
private File outputFile = null;
|
||||
@ -254,6 +255,7 @@ public class Option {
|
||||
} else if (s.equalsIgnoreCase("-word")) {
|
||||
OptionFlags.getInstance().setWord(true);
|
||||
OptionFlags.getInstance().setQuiet(true);
|
||||
this.charset = "UTF-8";
|
||||
} else if (s.equalsIgnoreCase("-quiet")) {
|
||||
OptionFlags.getInstance().setQuiet(true);
|
||||
} else if (s.equalsIgnoreCase("-decodeurl")) {
|
||||
@ -308,6 +310,15 @@ public class Option {
|
||||
textProgressBar = true;
|
||||
} else if (s.equalsIgnoreCase("-nometadata")) {
|
||||
hideMetadata = true;
|
||||
} else if (s.equalsIgnoreCase("-pipeimageindex")) {
|
||||
i++;
|
||||
if (i == arg.length) {
|
||||
continue;
|
||||
}
|
||||
final String nb = arg[i];
|
||||
if (nb.matches("\\d+")) {
|
||||
this.imageIndex = Integer.parseInt(nb);
|
||||
}
|
||||
} else if (StringUtils.goLowerCase(s).startsWith("-ftp")) {
|
||||
final int x = s.indexOf(':');
|
||||
if (x == -1) {
|
||||
@ -533,4 +544,8 @@ public class Option {
|
||||
return pipeNoStdErr;
|
||||
}
|
||||
|
||||
public final int getImageIndex() {
|
||||
return imageIndex;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -140,6 +140,7 @@ public class OptionPrint {
|
||||
System.out.println(" -loopstats\t\tTo continuously print statistics about usage");
|
||||
System.out.println(" -splash\t\tTo display a splash screen with some progress bar");
|
||||
System.out.println(" -progress\t\tTo display a textual progress bar in console");
|
||||
System.out.println(" -pipeimageindex N\tTo generate the Nth image with pipe option");
|
||||
System.out.println();
|
||||
System.out.println("If needed, you can setup the environment variable GRAPHVIZ_DOT.");
|
||||
exit();
|
||||
|
@ -63,7 +63,6 @@ public class Pipe {
|
||||
public boolean managePipe() throws IOException {
|
||||
boolean error = false;
|
||||
final boolean noStdErr = option.isPipeNoStdErr();
|
||||
|
||||
do {
|
||||
final String source = readOneDiagram();
|
||||
if (source == null) {
|
||||
@ -93,7 +92,7 @@ public class Pipe {
|
||||
ps.println(result);
|
||||
} else {
|
||||
final OutputStream os = noStdErr ? new ByteArrayOutputStream() : ps;
|
||||
final DiagramDescription result = sourceStringReader.outputImage(os, 0, option.getFileFormatOption());
|
||||
final DiagramDescription result = sourceStringReader.outputImage(os, option.getImageIndex(), option.getFileFormatOption());
|
||||
if (result != null && "(error)".equalsIgnoreCase(result.getDescription())) {
|
||||
error = true;
|
||||
manageErrors(noStdErr ? ps : System.err, sourceStringReader);
|
||||
|
@ -199,7 +199,7 @@ public class SourceFileReader implements ISourceFileReader {
|
||||
try {
|
||||
os = new BufferedOutputStream(new FileOutputStream(suggested.getFile(0)));
|
||||
UmlDiagram.exportDiagramError(os, t, fileFormatOption, 42, null, blockUml.getFlashData(),
|
||||
UmlDiagram.getFailureText2(t));
|
||||
UmlDiagram.getFailureText2(t, blockUml.getFlashData()));
|
||||
} finally {
|
||||
if (os != null) {
|
||||
os.close();
|
||||
@ -264,5 +264,4 @@ public class SourceFileReader implements ISourceFileReader {
|
||||
return builder.getIncludedFiles();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
|
||||
private void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed,
|
||||
String graphvizVersion) throws IOException {
|
||||
exportDiagramError(os, exception, fileFormat, seed, getMetadata(), getFlashData(),
|
||||
getFailureText1(exception, graphvizVersion));
|
||||
getFailureText1(exception, graphvizVersion, getFlashData()));
|
||||
}
|
||||
|
||||
public static void exportDiagramError(OutputStream os, Throwable exception, FileFormatOption fileFormat, long seed,
|
||||
@ -309,8 +309,8 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
|
||||
return source.getPlainString();
|
||||
}
|
||||
|
||||
static private List<String> getFailureText1(Throwable exception, String graphvizVersion) {
|
||||
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception);
|
||||
static private List<String> getFailureText1(Throwable exception, String graphvizVersion, String textDiagram) {
|
||||
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception, textDiagram);
|
||||
strings.add("PlantUML (" + Version.versionString() + ") cannot parse result from dot/GraphViz.");
|
||||
if (exception instanceof EmptySvgException) {
|
||||
strings.add("Because dot/GraphViz returns an empty string.");
|
||||
@ -330,8 +330,8 @@ public abstract class UmlDiagram extends AbstractPSystem implements Diagram, Ann
|
||||
return strings;
|
||||
}
|
||||
|
||||
public static List<String> getFailureText2(Throwable exception) {
|
||||
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception);
|
||||
public static List<String> getFailureText2(Throwable exception, String textDiagram) {
|
||||
final List<String> strings = GraphvizCrash.anErrorHasOccured(exception, textDiagram);
|
||||
strings.add("PlantUML (" + Version.versionString() + ") has crashed.");
|
||||
GraphvizCrash.checkOldVersionWarning(strings);
|
||||
strings.add(" ");
|
||||
|
@ -149,7 +149,7 @@ public class InstructionIf extends WithNote implements Instruction, InstructionC
|
||||
if (branch.getLast().kill() == false) {
|
||||
return false;
|
||||
}
|
||||
if (elseBranch != null && elseBranch.getLast().kill() == false) {
|
||||
if (elseBranch != null && elseBranch.getLast()!=null && elseBranch.getLast().kill() == false) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -59,6 +59,7 @@ import net.sourceforge.plantuml.graphic.color.Colors;
|
||||
|
||||
public class CommandCreateClass extends SingleLineCommand2<ClassDiagram> {
|
||||
|
||||
public static final String DISPLAY_WITH_GENERIC = "[%g](.+?)(?:\\<(" + GenericRegexProducer.PATTERN + ")\\>)?[%g]";
|
||||
public static final String CODE = "[^%s{}%g<>]+";
|
||||
public static final String CODE_NO_DOTDOT = "[^%s{}%g<>:]+";
|
||||
|
||||
@ -76,13 +77,13 @@ public class CommandCreateClass extends SingleLineCommand2<ClassDiagram> {
|
||||
"(interface|enum|annotation|abstract[%s]+class|abstract|class|entity|circle)[%s]+"), //
|
||||
new RegexOr(//
|
||||
new RegexConcat(//
|
||||
new RegexLeaf("DISPLAY1", "[%g](.+)[%g]"), //
|
||||
new RegexLeaf("DISPLAY1", DISPLAY_WITH_GENERIC), //
|
||||
new RegexLeaf("[%s]+as[%s]+"), //
|
||||
new RegexLeaf("CODE1", "(" + CODE + ")")), //
|
||||
new RegexConcat(//
|
||||
new RegexLeaf("CODE2", "(" + CODE + ")"), //
|
||||
new RegexLeaf("[%s]+as[%s]+"), // //
|
||||
new RegexLeaf("DISPLAY2", "[%g](.+)[%g]")), //
|
||||
new RegexLeaf("DISPLAY2", DISPLAY_WITH_GENERIC)), //
|
||||
new RegexLeaf("CODE3", "(" + CODE + ")"), //
|
||||
new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), //
|
||||
new RegexLeaf("GENERIC", "(?:[%s]*\\<(" + GenericRegexProducer.PATTERN + ")\\>)?"), //
|
||||
@ -108,9 +109,10 @@ public class CommandCreateClass extends SingleLineCommand2<ClassDiagram> {
|
||||
final LeafType type = LeafType.getLeafType(StringUtils.goUpperCase(arg.get("TYPE", 0)));
|
||||
final Code code = Code.of(arg.getLazzy("CODE", 0)).eventuallyRemoveStartingAndEndingDoubleQuote("\"([:");
|
||||
final String display = arg.getLazzy("DISPLAY", 0);
|
||||
final String genericOption = arg.getLazzy("DISPLAY", 1);
|
||||
final String generic = genericOption != null ? genericOption : arg.get("GENERIC", 0);
|
||||
|
||||
final String stereotype = arg.get("STEREO", 0);
|
||||
final String generic = arg.get("GENERIC", 0);
|
||||
final ILeaf entity;
|
||||
if (diagram.leafExist(code)) {
|
||||
entity = diagram.getOrCreateLeaf(code, type, null);
|
||||
|
@ -89,13 +89,13 @@ public class CommandCreateClassMultilines extends CommandMultilines2<ClassDiagra
|
||||
new RegexLeaf("TYPE", "(interface|enum|abstract[%s]+class|abstract|class|entity)[%s]+"), //
|
||||
new RegexOr(//
|
||||
new RegexConcat(//
|
||||
new RegexLeaf("DISPLAY1", "[%g](.+)[%g]"), //
|
||||
new RegexLeaf("DISPLAY1", CommandCreateClass.DISPLAY_WITH_GENERIC), //
|
||||
new RegexLeaf("[%s]+as[%s]+"), //
|
||||
new RegexLeaf("CODE1", "(" + CommandCreateClass.CODE + ")")), //
|
||||
new RegexConcat(//
|
||||
new RegexLeaf("CODE2", "(" + CommandCreateClass.CODE + ")"), //
|
||||
new RegexLeaf("[%s]+as[%s]+"), // //
|
||||
new RegexLeaf("DISPLAY2", "[%g](.+)[%g]")), //
|
||||
new RegexLeaf("DISPLAY2", CommandCreateClass.DISPLAY_WITH_GENERIC)), //
|
||||
new RegexLeaf("CODE3", "(" + CommandCreateClass.CODE + ")"), //
|
||||
new RegexLeaf("CODE4", "[%g]([^%g]+)[%g]")), //
|
||||
new RegexLeaf("GENERIC", "(?:[%s]*\\<(" + GenericRegexProducer.PATTERN + ")\\>)?"), //
|
||||
@ -189,9 +189,10 @@ public class CommandCreateClassMultilines extends CommandMultilines2<ClassDiagra
|
||||
|
||||
final Code code = Code.of(arg.getLazzy("CODE", 0)).eventuallyRemoveStartingAndEndingDoubleQuote("\"([:");
|
||||
final String display = arg.getLazzy("DISPLAY", 0);
|
||||
final String genericOption = arg.getLazzy("DISPLAY", 1);
|
||||
final String generic = genericOption != null ? genericOption : arg.get("GENERIC", 0);
|
||||
|
||||
final String stereotype = arg.get("STEREO", 0);
|
||||
final String generic = arg.get("GENERIC", 0);
|
||||
|
||||
final ILeaf result;
|
||||
if (diagram.leafExist(code)) {
|
||||
|
@ -86,7 +86,8 @@ public class CommandHideShowByGender extends SingleLineCommand2<UmlDiagram> {
|
||||
return EntityGenderUtils.emptyFields();
|
||||
}
|
||||
if (portion == PORTION_MEMBER) {
|
||||
return EntityGenderUtils.emptyMembers();
|
||||
throw new IllegalArgumentException();
|
||||
// return EntityGenderUtils.emptyMembers();
|
||||
}
|
||||
return EntityGenderUtils.all();
|
||||
}
|
||||
@ -169,14 +170,23 @@ public class CommandHideShowByGender extends SingleLineCommand2<UmlDiagram> {
|
||||
}
|
||||
if (gender != null) {
|
||||
final boolean empty = arg.get("EMPTY", 0) != null;
|
||||
if (empty == true) {
|
||||
final boolean emptyMembers = empty && portion == PORTION_MEMBER;
|
||||
if (empty == true && emptyMembers == false) {
|
||||
gender = EntityGenderUtils.and(gender, emptyByGender(portion));
|
||||
}
|
||||
if (EntityUtils.groupRoot(classDiagram.getCurrentGroup()) == false) {
|
||||
gender = EntityGenderUtils.and(gender, EntityGenderUtils.byPackage(classDiagram.getCurrentGroup()));
|
||||
}
|
||||
|
||||
if (emptyMembers) {
|
||||
classDiagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(PORTION_FIELD)), PORTION_FIELD, arg
|
||||
.get("COMMAND", 0).equalsIgnoreCase("show"));
|
||||
classDiagram.hideOrShow(EntityGenderUtils.and(gender, emptyByGender(PORTION_METHOD)), PORTION_METHOD,
|
||||
arg.get("COMMAND", 0).equalsIgnoreCase("show"));
|
||||
} else {
|
||||
classDiagram.hideOrShow(gender, portion, arg.get("COMMAND", 0).equalsIgnoreCase("show"));
|
||||
}
|
||||
}
|
||||
return CommandExecutionResult.ok();
|
||||
}
|
||||
|
||||
|
@ -38,10 +38,10 @@ package net.sourceforge.plantuml.classdiagram.command;
|
||||
|
||||
public class GenericRegexProducer {
|
||||
|
||||
public final static String PATTERN = "[^\\<\\>]" + getGenericRegex(4);
|
||||
public final static String PATTERN = "[^\\<\\>/]" + getGenericRegex(4);
|
||||
|
||||
// \<[^\<\>]([^\<\>]|\<\>)*\>
|
||||
static final private String part1 = "(?:[^\\<\\>]|\\<";
|
||||
static final private String part1 = "(?:[^\\<\\>/]|\\<";
|
||||
static final private String part2 = "\\>)*";
|
||||
|
||||
static String getGenericRegex(int level) {
|
||||
|
@ -113,13 +113,13 @@ public class EntityGenderUtils {
|
||||
};
|
||||
}
|
||||
|
||||
static public EntityGender emptyMembers() {
|
||||
return new EntityGender() {
|
||||
public boolean contains(IEntity test) {
|
||||
return test.getBodier().getMethodsToDisplay().size() == 0
|
||||
&& test.getBodier().getFieldsToDisplay().size() == 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
// static public EntityGender emptyMembers() {
|
||||
// return new EntityGender() {
|
||||
// public boolean contains(IEntity test) {
|
||||
// return test.getBodier().getMethodsToDisplay().size() == 0
|
||||
// && test.getBodier().getFieldsToDisplay().size() == 0;
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ import net.sourceforge.plantuml.command.note.FactoryNoteOnEntityCommand;
|
||||
import net.sourceforge.plantuml.command.note.FactoryNoteOnLinkCommand;
|
||||
import net.sourceforge.plantuml.command.regex.RegexLeaf;
|
||||
import net.sourceforge.plantuml.command.regex.RegexOr;
|
||||
import net.sourceforge.plantuml.descdiagram.command.CommandArchimate;
|
||||
import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementFull;
|
||||
import net.sourceforge.plantuml.descdiagram.command.CommandCreateElementMultilines;
|
||||
import net.sourceforge.plantuml.descdiagram.command.CommandLinkElement;
|
||||
@ -111,6 +112,8 @@ public class DescriptionDiagramFactory extends UmlDiagramFactory {
|
||||
|
||||
cmds.add(new CommandHideShowSpecificClass());
|
||||
|
||||
cmds.add(new CommandArchimate());
|
||||
|
||||
return cmds;
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user