Module logicng

Class Term


  • public class Term
    extends Object
    A term in the Quine–McCluskey algorithm. A term represents a set of minterms of a canonical DNF and has its own representation as a vector of tristates. Two minterms are considered equals if their bit representation is equals (independent of their associated minterms)
    Since:
    1.4.0
    Version:
    2.0.0
    • Field Detail

      • termClass

        protected final int termClass
      • used

        protected boolean used
      • undefNum

        protected final long undefNum
    • Method Detail

      • countNonNegativeBits

        protected int countNonNegativeBits​(Tristate[] bits)
        Counts the number of non-negative bits of a given tristate vector.
        Parameters:
        bits - the tristate vector
        Returns:
        the number of non-negative bits
      • computeUndefNum

        protected long computeUndefNum​(Tristate[] bits)
        Computes a number representing the number and position of the UNDEF states in the bit array.
        Parameters:
        bits - the bit array
        Returns:
        the computed number
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object