Module logicng

Class DTreeNode


  • public class DTreeNode
    extends DTree
    An internal node in a DTree.
    Since:
    2.0.0
    Version:
    2.0.0
    • Field Detail

      • left

        protected final DTree left
      • right

        protected final DTree right
      • size

        protected final int size
      • staticSeparatorBitSet

        protected final BitSet staticSeparatorBitSet
      • staticClauseIds

        protected final int[] staticClauseIds
      • depth

        protected final int depth
      • widestSeparator

        protected int widestSeparator
      • 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
    • Constructor Detail

      • DTreeNode

        public DTreeNode​(DTree left,
                         DTree right)
        Constructs a new DTree node with the given left and right DTree.
        Parameters:
        left - the left DTree
        right - the right DTree
    • 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: DTree
        Initializes the DTree.
        Specified by:
        initialize in class DTree
        Parameters:
        solver - a specializes DNNF SAT solver
      • size

        public int size()
        Description copied from class: DTree
        Returns the size of the DTree.
        Specified by:
        size in class DTree
        Returns:
        the size of the DTree
      • dynamicSeparator

        public BitSet dynamicSeparator()
        Description copied from class: DTree
        The dynamic separator of this DTree. "Dynamic" means that subsumed clauses are ignored during the separator computation.
        Specified by:
        dynamicSeparator in class DTree
        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 set
        numberOfVariables - the number of variables
      • countUnsubsumedOccurrences

        public void countUnsubsumedOccurrences​(int[] occurrences)
        Description copied from class: DTree
        Counts the number of unsubsumed occurrences for each variable in occurrences.

        The parameter occurrences should be modified by the method accordingly.

        Specified by:
        countUnsubsumedOccurrences in class DTree
        Parameters:
        occurrences - The current number of occurrences for each variable which should be modified accordingly
      • depth

        public int depth()
        Description copied from class: DTree
        Returns the depth of this tree.
        Specified by:
        depth in class DTree
        Returns:
        the depth of this tree
      • widestSeparator

        public int widestSeparator()
        Description copied from class: DTree
        Returns the widest separator of this tree.
        Specified by:
        widestSeparator in class DTree
        Returns:
        the widest separator
      • excludeUnitLeafs

        protected void excludeUnitLeafs​(List<DTreeLeaf> leafs)