- java.lang.Object
-
- org.logicng.transformations.qmc.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longcomputeUndefNum(Tristate[] bits)Computes a number representing the number and position of the UNDEF states in the bit array.protected intcountNonNegativeBits(Tristate[] bits)Counts the number of non-negative bits of a given tristate vector.booleanequals(Object o)inthashCode()StringtoString()
-
-
-
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
-
-