public final class SDDTreeDisjunction extends SDDTree
SDDTreeDisjunction, i.e., an SDD tree disjunction,
aka a decomposition, is a set of
disjunction elements,
where the primes of the elements form a partition of their respective variables
(their pair-wise conjunction logically evaluates to false,
their disjunction evaluates to true) and the subs are all different.CONSTANT_TYPE, DISJUNCTION_TYPE, LITERAL_TYPE| Modifier and Type | Method and Description |
|---|---|
<X> X |
apply(SDDFunction<X> f,
Vtree tree,
java.util.Map<SDDTree,X> m)
Applies the specified function on this SDD tree.
|
static SDDTreeDisjunction |
create(java.util.Set<SDDTreeConjunction> conjuncts) |
void |
destroy()
Notifies this object that it is no longer referenced.
|
protected boolean |
equivalent(java.lang.Object obj)
Indicates whether the specified object
is equivalent to this object.
|
java.util.List<Assignment> |
getAssignmentList(Vtree tree)
Returns the list of assignments of this SDD tree.
|
protected java.util.Map<java.lang.Object,SDDTreeDisjunction> |
getBuffer()
Returns the buffer that is used to decide the canonical objects.
|
SDDConstant |
getConstant()
Returns the constant associated with this SDD tree.
|
SDDTreeDisjunction |
getDisjunction()
Returns the disjunction associated with this SDD tree.
|
java.util.Collection<SDDTreeConjunction> |
getDisjuncts()
Returns an iterable on the SDDTreeDisjunct of this disjunction.
|
SDDVariable |
getLiteral()
Returns the literal associated with this SDD tree.
|
Assignment |
getOneAssignment(Vtree tree)
Returns one assignment for this SDDTree defined on the specified vtree.
|
int |
hashCode() |
void |
insertSubSDDTrees(java.util.Set<CanonicalWatched> set)
Adds all the sub SDD trees (including this one) of this SDD tree to the specified set.
|
boolean |
isConstant()
Indicates whether this SDD tree is a constant.
|
boolean |
isDisjunction()
Indicates whether this SDD tree is a disjunction.
|
boolean |
isFalse()
Indicates whether this SDD tree is the false constant.
|
boolean |
isLiteral()
Indicates whether this SDD tree is a literal.
|
int |
nbDisjuncts()
Returns the number of disjuncts of this disjunction.
|
java.math.BigInteger |
nbModels(Vtree tree,
java.util.Map<SDDTreeDisjunction,java.math.BigInteger> records)
Returns the number of models of this SDD tree.
|
static void |
printBuffer(java.io.PrintStream out)
Prints in the specified print stream
the current state of the buffer for SDDTreeDisjunction.
|
void |
saveToDot(DotStream out,
java.util.Map<SDDTree,java.lang.String> sddTrees,
java.util.Map<SDDTreeConjunction,java.lang.String> conjs,
NameGenerator gen)
Prints a dot representation of this SDD tree in the specified string builder
given the specified names for SDDTrees and SDDTreeConjunction,
as well as a counter to create more names.
|
int |
saveToString(java.lang.StringBuilder bui,
java.util.Map<SDDTree,java.lang.String> sddTrees,
java.util.Map<SDDTreeConjunction,java.lang.String> conjs,
int counter)
Prints a string representation of this SDD tree in the specified string builder,
given the specified names for SDDTrees and SDDTreeConjunction,
as well as a counter to create more names.
|
java.lang.String |
toString() |
compareTo, DEBUG_VERIFY_VTREE, isNot, isTrueequals, getCanonical, print, unwatch, unwatchAll, verifyValidity, watchpublic static SDDTreeDisjunction create(java.util.Set<SDDTreeConjunction> conjuncts)
public int hashCode()
hashCode in class CanonicalWatchedpublic java.lang.String toString()
toString in class java.lang.Objectprotected boolean equivalent(java.lang.Object obj)
CanonicalWatchedequivalent in class CanonicalWatchedobj - the object compared to this object.public void destroy()
CanonicalWatcheddestroy in class CanonicalWatchedprotected java.util.Map<java.lang.Object,SDDTreeDisjunction> getBuffer()
CanonicalWatchedgetBuffer in class CanonicalWatchedpublic java.util.Collection<SDDTreeConjunction> getDisjuncts()
public boolean isConstant()
SDDTreeisConstant in class SDDTreepublic boolean isFalse()
SDDTreepublic SDDConstant getConstant()
SDDTreegetConstant in class SDDTreeSDDTree.isConstant()public boolean isLiteral()
SDDTreepublic SDDVariable getLiteral()
SDDTreegetLiteral in class SDDTreeSDDTree.isLiteral()public boolean isDisjunction()
SDDTreeisDisjunction in class SDDTreepublic SDDTreeDisjunction getDisjunction()
SDDTreegetDisjunction in class SDDTreeSDDTree.isDisjunction()public int saveToString(java.lang.StringBuilder bui,
java.util.Map<SDDTree,java.lang.String> sddTrees,
java.util.Map<SDDTreeConjunction,java.lang.String> conjs,
int counter)
SDDTreesaveToString in class SDDTreebui - the string building where this SDD tree must be written.sddTrees - the names of the SDD Trees.conjs - the names of the SDD tree conjunctions.counter - the number of names already created.public void saveToDot(DotStream out, java.util.Map<SDDTree,java.lang.String> sddTrees, java.util.Map<SDDTreeConjunction,java.lang.String> conjs, NameGenerator gen)
SDDTreepublic java.util.List<Assignment> getAssignmentList(Vtree tree)
SDDTreegetAssignmentList in class SDDTreetree - the vtree upon which this SDD tree is defined.public Assignment getOneAssignment(Vtree tree)
SDDTreegetOneAssignment in class SDDTreetree - the vtree upon which this SDD tree is defined.public int nbDisjuncts()
public static void printBuffer(java.io.PrintStream out)
out - the print stream.CanonicalWatched.print(java.io.PrintStream)public void insertSubSDDTrees(java.util.Set<CanonicalWatched> set)
SDDTreeinsertSubSDDTrees in class SDDTreeset - the set where the sub SDD trees of this SDD tree are to be added.public java.math.BigInteger nbModels(Vtree tree, java.util.Map<SDDTreeDisjunction,java.math.BigInteger> records)
SDDTreenbModels in class SDDTreetree - the vtree upon which this SDDTree is defined.records - a map that records the results already computed.SDDTree.getAssignmentList(sdd.Vtree).public <X> X apply(SDDFunction<X> f, Vtree tree, java.util.Map<SDDTree,X> m)
SDDTree