@Override public EdgeList getInEdges(final ATerm x) { return getNode(x).getInEdges(); }
@Override public EdgeList getInEdges(final ATerm x) { return getNode(x).getInEdges(); }
@Override public Iterator<WME> getMatches() { final Node object = initNode(); return toWMEs(object.getInEdges().getEdges(_role), EdgeDirection.FORWARD); }
@Override public Iterator<WME> getMatches() { final Node object = initNode(); return toWMEs(object.getInEdges().getEdges(_role), EdgeDirection.FORWARD); }
while (!node.getInEdges().isEmpty()) final Edge inEdge = node.getInEdges().get(0); node = inEdge.getFrom(); if (cycle.contains(node))
while (!node.getInEdges().isEmpty()) final Edge inEdge = node.getInEdges().get(0); node = inEdge.getFrom(); if (cycle.contains(node))
protected Iterator<WME> getMatches(final Individual s, @SuppressWarnings("unused") final Role r, final Node o) { Iterator<WME> i1 = IteratorUtils.emptyIterator(); Iterator<WME> i2 = IteratorUtils.emptyIterator(); final Role invRole = _role.getInverse(); if (s != null) { i1 = toWMEs(getEdges(s.getOutEdges(), _role, o), EdgeDirection.FORWARD); if (invRole != null) i2 = toWMEs(getEdges(s.getInEdges(), invRole, o), EdgeDirection.BACKWARD); } else { assert s == null; i1 = toWMEs(getEdges(o.getInEdges(), _role, null), EdgeDirection.FORWARD); if (invRole != null) i2 = toWMEs(getEdges(((Individual) o).getOutEdges(), invRole, null), EdgeDirection.BACKWARD); } return !i1.hasNext() ? i2 : !i2.hasNext() ? i1 : IteratorUtils.concat(i1, i2); }
protected Iterator<WME> getMatches(final Individual s, @SuppressWarnings("unused") final Role r, final Node o) { Iterator<WME> i1 = IteratorUtils.emptyIterator(); Iterator<WME> i2 = IteratorUtils.emptyIterator(); final Role invRole = _role.getInverse(); if (s != null) { i1 = toWMEs(getEdges(s.getOutEdges(), _role, o), EdgeDirection.FORWARD); if (invRole != null) i2 = toWMEs(getEdges(s.getInEdges(), invRole, o), EdgeDirection.BACKWARD); } else { assert s == null; i1 = toWMEs(getEdges(o.getInEdges(), _role, null), EdgeDirection.FORWARD); if (invRole != null) i2 = toWMEs(getEdges(((Individual) o).getOutEdges(), invRole, null), EdgeDirection.BACKWARD); } return !i1.hasNext() ? i2 : !i2.hasNext() ? i1 : IteratorUtils.concat(i1, i2); }
for (int j = 0; j < node.getInEdges().size(); j++) final Edge e = node.getInEdges().get(j); final Individual subj = e.getFrom(); subj._applyNext[Node.ALL] = 0;
for (int j = 0; j < node.getInEdges().size(); j++) final Edge e = node.getInEdges().get(j); final Individual subj = e.getFrom(); subj._applyNext[Node.ALL] = 0;
for (final Edge edge : node.getInEdges()) // update edge dependencies
for (final Edge edge : node.getInEdges()) // update edge dependencies
for (int i = 0; i < node.getInEdges().size(); i++) final Edge e = node.getInEdges().get(i);
for (int i = 0; i < node.getInEdges().size(); i++) final Edge e = node.getInEdges().get(i);
edge = obj.getInEdges().getExactEdge(subj, role, obj);
edge = obj.getInEdges().getExactEdge(subj, role, obj);
for (int j = 0; j < node.getInEdges().size(); j++) final Edge e = node.getInEdges().get(j);
for (int j = 0; j < node.getInEdges().size(); j++) final Edge e = node.getInEdges().get(j);
if (_nodes.get(succ.getName()) != succ) throw new InternalReasonerException("Invalid edge to a non-existing node: " + edge + " " + _nodes.get(succ.getName()) + "(" + _nodes.get(succ.getName()).hashCode() + ")" + succ + "(" + succ.hashCode() + ")"); if (!succ.getInEdges().hasEdge(edge)) throw new InternalReasonerException("Invalid edge: " + edge); if (succ.isMerged())
if (_nodes.get(succ.getName()) != succ) throw new InternalReasonerException("Invalid edge to a non-existing node: " + edge + " " + _nodes.get(succ.getName()) + "(" + _nodes.get(succ.getName()).hashCode() + ")" + succ + "(" + succ.hashCode() + ")"); if (!succ.getInEdges().hasEdge(edge)) throw new InternalReasonerException("Invalid edge: " + edge); if (succ.isMerged())