public final class VtreeNode extends Vtree
VtreeNode, i.e., a vtree node,
is a binary node in a vtree.| Modifier and Type | Method and Description |
|---|---|
boolean |
addVariables(java.util.Set<Variable> s)
Adds the variables in this vtree to the specified set.
|
boolean |
contains(Vtree vt)
Indicates whether this vtree contains the specified vtree.
|
static VtreeNode |
create(Vtree l,
Vtree r) |
protected void |
destroy()
Notifies this object that it is no longer referenced.
|
boolean |
equivalent(java.lang.Object o)
Indicates whether the specified object
is equivalent to this object.
|
boolean |
findPathTo(Vtree vt,
java.util.List<VtreeNode> path)
Stores in the specified list the ``path''
from this vtree to the specified vtree (excluded).
|
protected java.util.Map<java.lang.Object,VtreeNode> |
getBuffer()
Returns the buffer that is used to decide the canonical objects.
|
int |
getDepth()
Returns the depth of this vtree.
|
Vtree |
getLeft()
Returns the left child of this vtree node.
|
Vtree |
getRight()
Returns the right child of this vtree node.
|
java.util.Set<Variable> |
getVariables()
Returns the collection of variables
that decorate the leaves of this vtree.
|
int |
hashCode() |
boolean |
isLeaf()
Indicates whether this vtree is a leaf.
|
static void |
printBuffer(java.io.PrintStream out)
Prints in the specified print stream
the current state of the buffer for VtreeNode.
|
java.lang.String |
toString() |
equals, getCanonical, print, unwatch, unwatchAll, verifyValidity, watchpublic int hashCode()
hashCode in class CanonicalWatchedpublic boolean equivalent(java.lang.Object o)
CanonicalWatchedequivalent in class CanonicalWatchedo - the object compared to this object.public java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Set<Variable> getVariables()
VtreegetVariables in class Vtreepublic boolean isLeaf()
Vtreepublic boolean addVariables(java.util.Set<Variable> s)
VtreeaddVariables in class Vtrees - the set where the variables in this vtree should be inserted.public Vtree getLeft()
public Vtree getRight()
protected java.util.Map<java.lang.Object,VtreeNode> getBuffer()
CanonicalWatchedgetBuffer in class CanonicalWatchedprotected void destroy()
CanonicalWatcheddestroy in class CanonicalWatchedpublic int getDepth()
Vtreepublic boolean contains(Vtree vt)
Vtreepublic boolean findPathTo(Vtree vt, java.util.List<VtreeNode> path)
VtreefindPathTo in class Vtreevt - the vtree to which a path is requested.path - the list where the path is recorded.public static void printBuffer(java.io.PrintStream out)
out - the print stream.CanonicalWatched.print(java.io.PrintStream)