use of catdata.fpql.XExp.XSchema in project fql by CategoricalData.
the class EnrichViewer method merge.
private static Triple<XSchema, XPoly<String, String>, XPoly<String, String>> merge(XSchema isa, XSchema mat, String isa0, String mat0, String merged) {
Set<String> nodes = new HashSet<>();
Set<Triple<String, String, String>> arrows = new HashSet<>();
Set<Pair<List<String>, List<String>>> eqs = new HashSet<>();
nodes.addAll(isa.nodes);
nodes.addAll(mat.nodes);
arrows.addAll(isa.arrows);
arrows.addAll(mat.arrows);
eqs.addAll(isa.eqs);
eqs.addAll(mat.eqs);
XSchema ret1 = new XSchema(new LinkedList<>(nodes), new LinkedList<>(arrows), new LinkedList<>(eqs));
return new Triple<>(ret1, idPoly(isa, isa0, merged), idPoly(mat, mat0, merged));
}
Aggregations