- java.lang.Object
-
- org.logicng.transformations.qmc.TermTable
-
public class TermTable extends Object
A term table in the Quine–McCluskey algorithm. The term table is used for the line and column dominance checks.- Since:
- 1.4.0
- Version:
- 2.0.0
-
-
Field Summary
Fields Modifier and Type Field Description protected Vector<Formula>columnHeadersprotected Vector<Term>lineHeadersprotected Vector<Vector<Boolean>>matrixColumnsprotected Vector<Vector<Boolean>>matrixLines
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeleteColumn(int colIndex)Deletes a column at a given index.protected voiddeleteLine(int lineIndex)Deletes a line at a given index.protected booleaneliminateColumnDominance()Performs elimination of columns by dominance.protected booleaneliminateLineDominance()Performs elimination of lines by dominance.protected StringformatBits(Tristate[] bits)protected StringformatMatrixLine(Vector<Boolean> booleans, int size)protected Vector<Formula>initializeColumnHeaders(LinkedHashSet<Term> terms)Initialize the column headers with the mintermsStringtoString()
-
-
-
Method Detail
-
initializeColumnHeaders
protected Vector<Formula> initializeColumnHeaders(LinkedHashSet<Term> terms)
Initialize the column headers with the minterms- Parameters:
terms- the terms- Returns:
- the column headers
-
eliminateColumnDominance
protected boolean eliminateColumnDominance()
Performs elimination of columns by dominance.- Returns:
trueif an elimination was performed,falseotherwise
-
eliminateLineDominance
protected boolean eliminateLineDominance()
Performs elimination of lines by dominance.- Returns:
trueif an elimination was performed,falseotherwise
-
deleteColumn
protected void deleteColumn(int colIndex)
Deletes a column at a given index.- Parameters:
colIndex- the index
-
deleteLine
protected void deleteLine(int lineIndex)
Deletes a line at a given index.- Parameters:
lineIndex- the index
-
-