Module logicng

Class DTreeLeaf


  • public class DTreeLeaf
    extends DTree
    A leaf in a DTree.
    Since:
    2.0.0
    Version:
    2.0.0
    • Field Detail

      • id

        protected final int id
      • clause

        protected final Formula clause
      • clauseSize

        protected final int clauseSize
      • literals

        protected int[] literals
      • separatorBitSet

        protected final BitSet separatorBitSet
      • staticClauseIds

        protected final int[] staticClauseIds
    • Constructor Detail

      • DTreeLeaf

        public DTreeLeaf​(int id,
                         Formula clause)
        Constructs a new leaf with the given id and clause.
        Parameters:
        id - the id
        clause - the clause
    • Method Detail

      • 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
      • staticClauseIds

        public int[] staticClauseIds()
      • isSubsumed

        protected boolean isSubsumed()
      • 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
      • clause

        public Formula clause()
        Returns the leaf's clause.
        Returns:
        the leaf's clause
      • literals

        public int[] literals()
        Returns the literal integers of the clause.
        Returns:
        literals integers of the clause
      • clauseSize

        public int clauseSize()
        Returns the size of the leaf's clause.
        Returns:
        the size of the leaf's clause
      • getId

        public int getId()
        Returns the leaf's id.
        Returns:
        the leaf's id