public GSS create(Item item, GSS cu, Node cn, int ci) { Node w = cn; GSS v = makeGSS(item, ci); if (v.addEdge(w, cu)) { if (toPop.containsKey(v)) { for (Node z : toPop.get(v)) { Node x = getNodeP(item, w, z); add(item, cu, z.getRightExtent(), x); } } } return v; }
public void pop(GSS cu, Node cn, int ci) { if (!cu.equals(start)) { if (!toPop.containsKey(cu)) { toPop.put(cu, new HashSet<Node>()); } toPop.get(cu).add(cn); Item cnt = cu.getItem(); for (Entry<Node, Set<GSS>> e : cu.getEdges().entrySet()) { Node w = e.getKey(); for (GSS u : e.getValue()) { Node x = getNodeP(cnt, w, cn); add(cnt, u, ci, x); } } } }