|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blog.ObjGenGraph.Node blog.ObjGenGraph.IntegerNode
public static class ObjGenGraph.IntegerNode
Constructor Summary | |
---|---|
ObjGenGraph.IntegerNode()
|
Method Summary | |
---|---|
protected java.lang.Object |
correspondingObj(java.lang.Integer i)
Method that can be overridden by subclasses so that the iterator for this node returns objects corresponding to integers, not the integers themselves. |
boolean |
dependsOnIdOrder(EvalContext context)
Returns true if the iteration order for satisfiers of this node depends on the iteration order for object identifiers in the given context. |
java.util.Set |
getParents()
|
boolean |
isFinite()
Returns true if every call to this node's iterator
method returns an iterator over a finite set. |
ObjectIterator |
iterator(EvalContext context,
java.util.Set externallyDistinguished,
boolean returnPOPApps,
java.util.Map desiredPOPParentObjs,
java.util.Map otherPOPParentObjs,
boolean includeGuaranteed)
Returns an iterator over the objects that satisfy this node in the given context. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjGenGraph.IntegerNode()
Method Detail |
---|
public java.util.Set getParents()
public ObjectIterator iterator(EvalContext context, java.util.Set externallyDistinguished, boolean returnPOPApps, java.util.Map desiredPOPParentObjs, java.util.Map otherPOPParentObjs, boolean includeGuaranteed)
ObjGenGraph.Node
The obvious algorithm for enumerating objects that satisfy
a node is by recursion in the object generation graph. But
that algorithm would get stuck in cycles. Thus, we terminate
the recursion at the parents of POPNodes. A non-root node's
iterator
method will be called repeatedly, with
larger and larger lists of satisfying objects for the parents
of POP nodes.
Since we're calling iterator
repeatedly, we
need a way to get distinct objects each time. Thus, we
specify a list of desired objects for each POP
node parent. All the returned objects must satisfy a POP
application involving at least one of these desired objects
and possibly some of the additional objects specified in
otherPOPParentObjs
. The desired parent
objects will always be objects that were not included in
the previous calls to iterator
, so the objects
returned will be distinct from those returned previously.
As an exception, if includeGuaranteed
is true,
then the returned objects may also be guaranteed objects,
objects that satisfy a POP application with an empty tuple of
generating objects, or the satisfiers of TermNodes.
iterator
in class ObjGenGraph.Node
desiredPOPParentObjs
- Map from Node to ListotherPOPParentObjs
- Map from Node to Listpublic boolean isFinite()
ObjGenGraph.Node
iterator
method returns an iterator over a finite set.
isFinite
in class ObjGenGraph.Node
public boolean dependsOnIdOrder(EvalContext context)
ObjGenGraph.Node
dependsOnIdOrder
in class ObjGenGraph.Node
protected java.lang.Object correspondingObj(java.lang.Integer i)
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |