- java.lang.Object
-
- org.logicng.knowledgecompilation.dnnf.datastructures.dtree.DTree
-
- org.logicng.knowledgecompilation.dnnf.datastructures.dtree.DTreeNode
-
public class DTreeNode extends DTree
An internal node in a DTree.- Since:
- 2.0.0
- Version:
- 2.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]clauseContentsprotected intdepthprotected DTreeLeaf[]leafsprotected DTreeleftprotected int[]leftClauseContentsprotected DTreeLeaf[]leftLeafsprotected BitSetlocalLeftVarSetprotected BitSetlocalRightVarSetprotected DTreerightprotected int[]rightClauseContentsprotected DTreeLeaf[]rightLeafsprotected intsizeprotected DnnfSatSolversolverprotected int[]staticClauseIdsprotected BitSetstaticSeparatorBitSetprotected SortedSet<Variable>staticVariableSetprotected intwidestSeparator-
Fields inherited from class org.logicng.knowledgecompilation.dnnf.datastructures.dtree.DTree
staticSeparator, staticVariables, staticVarSet
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheKey(BitSet key, int numberOfVariables)Sets the cache key according to this tree.voidcountUnsubsumedOccurrences(int[] occurrences)Counts the number of unsubsumed occurrences for each variable in occurrences.intdepth()Returns the depth of this tree.BitSetdynamicSeparator()The dynamic separator of this DTree.protected voidexcludeUnitLeafs(List<DTreeLeaf> leafs)voidinitialize(DnnfSatSolver solver)Initializes the DTree.List<DTreeLeaf>leafs()DTreeleft()Returns the left DTreeDTreeright()Returns the right DTreeintsize()Returns the size of the DTree.int[]staticClauseIds()SortedSet<Variable>staticVariableSet()StringtoString()protected voidvarSet(int[] clausesContents, BitSet localVarSet)intwidestSeparator()Returns the widest separator of this tree.-
Methods inherited from class org.logicng.knowledgecompilation.dnnf.datastructures.dtree.DTree
staticVarSet
-
-
-
-
Field Detail
-
left
protected final DTree left
-
right
protected final DTree right
-
size
protected final int size
-
solver
protected DnnfSatSolver solver
-
staticSeparatorBitSet
protected final BitSet staticSeparatorBitSet
-
staticClauseIds
protected final int[] staticClauseIds
-
depth
protected final int depth
-
widestSeparator
protected int widestSeparator
-
leafs
protected final DTreeLeaf[] leafs
-
leftLeafs
protected final DTreeLeaf[] leftLeafs
-
rightLeafs
protected final DTreeLeaf[] rightLeafs
-
clauseContents
protected int[] clauseContents
-
leftClauseContents
protected int[] leftClauseContents
-
rightClauseContents
protected int[] rightClauseContents
-
localLeftVarSet
protected BitSet localLeftVarSet
-
localRightVarSet
protected BitSet localRightVarSet
-
-
Method Detail
-
left
public DTree left()
Returns the left DTree- Returns:
- the left DTree
-
right
public DTree right()
Returns the right DTree- Returns:
- the right DTree
-
initialize
public void initialize(DnnfSatSolver solver)
Description copied from class:DTreeInitializes the DTree.- Specified by:
initializein classDTree- Parameters:
solver- a specializes DNNF SAT solver
-
size
public int size()
Description copied from class:DTreeReturns the size of the DTree.
-
dynamicSeparator
public BitSet dynamicSeparator()
Description copied from class:DTreeThe dynamic separator of this DTree. "Dynamic" means that subsumed clauses are ignored during the separator computation.- Specified by:
dynamicSeparatorin classDTree- Returns:
- The dynamic separator of this DTree
-
varSet
protected void varSet(int[] clausesContents, BitSet localVarSet)
-
staticClauseIds
public int[] staticClauseIds()
-
cacheKey
public void cacheKey(BitSet key, int numberOfVariables)
Sets the cache key according to this tree.- Parameters:
key- the key to setnumberOfVariables- the number of variables
-
countUnsubsumedOccurrences
public void countUnsubsumedOccurrences(int[] occurrences)
Description copied from class:DTreeCounts the number of unsubsumed occurrences for each variable in occurrences.The parameter occurrences should be modified by the method accordingly.
- Specified by:
countUnsubsumedOccurrencesin classDTree- Parameters:
occurrences- The current number of occurrences for each variable which should be modified accordingly
-
depth
public int depth()
Description copied from class:DTreeReturns the depth of this tree.
-
widestSeparator
public int widestSeparator()
Description copied from class:DTreeReturns the widest separator of this tree.- Specified by:
widestSeparatorin classDTree- Returns:
- the widest separator
-
-