use of catdata.fql.decl.Mapping in project fql by CategoricalData.
the class LeftKanSigma method fullSigmaWithAttrs.
public static Quad<Instance, Map<Node, Map<Object, Integer>>, Map<Node, Map<Integer, Object>>, Map<Object, List<Pair<String, Object>>>> fullSigmaWithAttrs(PSMInterp inter, Mapping f, Instance i, Transform t, Instance JJJ, Integer xxx) throws FQLException {
Mapping F = deAttr(f);
Pair<Instance, Map<Attribute<Node>, Map<Object, Object>>> I = deAttr(inter, i, F.source);
Integer kkk = inter.guid;
Instance JJJ0 = null;
Transform ttt = null;
if (JJJ != null) {
inter.guid = xxx;
Pair<Instance, Map<Attribute<Node>, Map<Object, Object>>> JJJ0X = deAttr(inter, JJJ, F.target);
Pair<Instance, Map<Attribute<Node>, Map<Object, Object>>> qqq = delta(f, F, JJJ0X);
ttt = deAttr(f.source, I, qqq, t);
JJJ0 = JJJ0X.first;
inter.guid = kkk;
}
// System.out.println("!!!!!!!!!!!!!!!");
LeftKan D = new LeftKan(inter.guid, F, I.first, ttt, JJJ0);
Pair<Instance, Map<Object, List<Pair<String, Object>>>> hhh = sigma(D);
inter.guid = D.fresh;
Map<Node, Map<Object, Integer>> etables = makeE(D.ua);
Instance j = hhh.first;
Instance ret = reAttr(etables, f.target, j, I.second);
return new Quad<>(ret, etables, D.utables, hhh.second);
}
use of catdata.fql.decl.Mapping in project fql by CategoricalData.
the class LeftKanSigma method deAttr.
private static Mapping deAttr(Mapping f) throws FQLException {
Mapping ret = f.clone();
deAttr(ret.source);
deAttr(ret.target);
for (Attribute<Node> k : ret.am.keySet()) {
Attribute<Node> v = ret.am.get(k);
Node src = new Node(k.name);
Node dst = new Node(v.name);
Edge srcE = new Edge(k.name + "_edge", k.source, src);
Edge dstE = new Edge(v.name + "_edge", v.source, dst);
ret.nm.put(src, dst);
ret.em.put(srcE, new Path(ret.target, dstE));
}
ret.am.clear();
return ret;
}
Aggregations