public EdgeList getEdgesTo(final Node x, final Role r) { return _outEdges.getEdgesTo(x).getEdges(r); }
final public EdgeList getRSuccessorEdges(final Role r) { return _outEdges.getEdges(r); }
final public EdgeList getRSuccessorEdges(final Role r) { return _outEdges.getEdges(r); }
private static EdgeList getEdges(final EdgeList edges, final Role r, final Node o) { return o == null ? edges.getEdges(r) : edges.getEdgesTo(r, o); }
final public EdgeList getRPredecessorEdges(final Role r) { return _inEdges.getEdges(r); }
private static EdgeList getEdges(final EdgeList edges, final Role r, final Node o) { return o == null ? edges.getEdges(r) : edges.getEdgesTo(r, o); }
final public EdgeList getRPredecessorEdges(final Role r) { return _inEdges.getEdges(r); }
public EdgeList getEdgesTo(final Node x, final Role r) { return _outEdges.getEdgesTo(x).getEdges(r); }
public EdgeList getRNeighborEdges(final Role r) { if (null == r) return new EdgeList(); // TODO : this is really ugly. final EdgeList neighbors = _outEdges.getEdges(r); final Role invR = r.getInverse(); // inverse of datatype properties is not defined if (invR != null) neighbors.addAll(_inEdges.getEdges(invR)); return neighbors; }
public EdgeList getRNeighborEdges(final Role r) { if (null == r) return new EdgeList(); // TODO : this is really ugly. final EdgeList neighbors = _outEdges.getEdges(r); final Role invR = r.getInverse(); // inverse of datatype properties is not defined if (invR != null) neighbors.addAll(_inEdges.getEdges(invR)); return neighbors; }
@Override public Iterator<WME> getInnerIterator(final Individual ind) { return toWMEs(ind.getOutEdges().getEdges(_role), EdgeDirection.FORWARD); } };
@Override public Iterator<WME> getInnerIterator(final Individual ind) { return toWMEs(ind.getOutEdges().getEdges(_role), EdgeDirection.FORWARD); } };
final public Set<Node> getRSuccessors(final Role r, final ATermAppl c) { final Set<Node> result = new HashSet<>(); final EdgeList edges = _outEdges.getEdges(r); for (int i = 0, n = edges.size(); i < n; i++) { final Edge edge = edges.get(i); final Node other = edge.getNeighbor(this); if (other.hasType(c)) result.add(other); } return result; }
final public Set<Node> getRSuccessors(final Role r, final ATermAppl c) { final Set<Node> result = new HashSet<>(); final EdgeList edges = _outEdges.getEdges(r); for (int i = 0, n = edges.size(); i < n; i++) { final Edge edge = edges.get(i); final Node other = edge.getNeighbor(this); if (other.hasType(c)) result.add(other); } return result; }
@Override public Iterator<WME> getMatches() { final Node object = initNode(); return toWMEs(object.getInEdges().getEdges(_role), EdgeDirection.FORWARD); }
@Override public Iterator<WME> getMatches() { final Individual subject = initNode(); return toWMEs(subject.getOutEdges().getEdges(_role), EdgeDirection.FORWARD); }
@Override public Iterator<WME> getMatches() { final Individual subject = initNode(); return toWMEs(subject.getOutEdges().getEdges(_role), EdgeDirection.FORWARD); }
@Override public Iterator<WME> getMatches() { final Node object = initNode(); return toWMEs(object.getInEdges().getEdges(_role), EdgeDirection.FORWARD); }
final EdgeList edges = _outEdges.getEdges(r); for (int i = 0; i < edges.size(); i++)
final EdgeList edges = _outEdges.getEdges(r); for (int i = 0; i < edges.size(); i++)