public abstract class SDDTree extends CanonicalWatched implements java.lang.Comparable<SDDTree>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
CONSTANT_TYPE |
protected java.lang.String |
DISJUNCTION_TYPE |
protected java.lang.String |
LITERAL_TYPE |
| Constructor and Description |
|---|
SDDTree() |
| Modifier and Type | Method and Description |
|---|---|
abstract <X> X |
apply(SDDFunction<X> f,
Vtree tree,
java.util.Map<SDDTree,X> m)
Applies the specified function on this SDD tree.
|
int |
compareTo(SDDTree t) |
static void |
DEBUG_VERIFY_VTREE(Vtree tree,
SDDTree sdd) |
abstract java.util.List<Assignment> |
getAssignmentList(Vtree tree)
Returns the list of assignments of this SDD tree.
|
abstract SDDConstant |
getConstant()
Returns the constant associated with this SDD tree.
|
abstract SDDTreeDisjunction |
getDisjunction()
Returns the disjunction associated with this SDD tree.
|
abstract SDDVariable |
getLiteral()
Returns the literal associated with this SDD tree.
|
abstract Assignment |
getOneAssignment(Vtree tree)
Returns one assignment for this SDDTree defined on the specified vtree.
|
abstract void |
insertSubSDDTrees(java.util.Set<CanonicalWatched> set)
Adds all the sub SDD trees (including this one) of this SDD tree to the specified set.
|
abstract boolean |
isConstant()
Indicates whether this SDD tree is a constant.
|
abstract boolean |
isDisjunction()
Indicates whether this SDD tree is a disjunction.
|
abstract boolean |
isFalse()
Indicates whether this SDD tree is the false constant.
|
abstract boolean |
isLiteral()
Indicates whether this SDD tree is a literal.
|
protected void |
isNot(java.lang.String type)
Throws an error saying that this object is not of specified type.
|
boolean |
isTrue()
Indicates whether this SDD tree is the true constant.
|
abstract java.math.BigInteger |
nbModels(Vtree tree,
java.util.Map<SDDTreeDisjunction,java.math.BigInteger> records)
Returns the number of models of this SDD tree.
|
abstract 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.
|
abstract 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.
|
destroy, equals, equivalent, getBuffer, getCanonical, hashCode, print, unwatch, unwatchAll, verifyValidity, watchprotected final java.lang.String CONSTANT_TYPE
protected final java.lang.String DISJUNCTION_TYPE
protected final java.lang.String LITERAL_TYPE
public abstract boolean isConstant()
public abstract boolean isFalse()
public final boolean isTrue()
public abstract SDDConstant getConstant()
isConstant()public abstract boolean isLiteral()
public abstract SDDVariable getLiteral()
isLiteral()public abstract boolean isDisjunction()
public abstract SDDTreeDisjunction getDisjunction()
isDisjunction()protected void isNot(java.lang.String type)
type - the type that this object is not.public abstract java.util.List<Assignment> getAssignmentList(Vtree tree)
tree - the vtree upon which this SDD tree is defined.public abstract Assignment getOneAssignment(Vtree tree)
tree - the vtree upon which this SDD tree is defined.public abstract java.math.BigInteger nbModels(Vtree tree, java.util.Map<SDDTreeDisjunction,java.math.BigInteger> records)
tree - the vtree upon which this SDDTree is defined.records - a map that records the results already computed.getAssignmentList(sdd.Vtree).public abstract void insertSubSDDTrees(java.util.Set<CanonicalWatched> set)
set - the set where the sub SDD trees of this SDD tree are to be added.public abstract int saveToString(java.lang.StringBuilder bui,
java.util.Map<SDDTree,java.lang.String> sddTrees,
java.util.Map<SDDTreeConjunction,java.lang.String> conjs,
int counter)
bui - 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 abstract void saveToDot(DotStream out, java.util.Map<SDDTree,java.lang.String> sddTrees, java.util.Map<SDDTreeConjunction,java.lang.String> conjs, NameGenerator gen)
out - the dot stream where this SDD tree must be written.sddTrees - the names of the SDD Trees.conjs - the names of the SDD tree conjunctions.gen - the name generator (to generate dot node names).public int compareTo(SDDTree t)
compareTo in interface java.lang.Comparable<SDDTree>public abstract <X> X apply(SDDFunction<X> f, Vtree tree, java.util.Map<SDDTree,X> m)
X - the type of object returned by the function.f - the function to apply.tree - the tree on which this SDD tree is defined.m - a map that stores the results.