removed some not needed code

This commit is contained in:
hneemann 2017-03-06 12:28:04 +01:00
parent 6392e371b6
commit 390391c3a4
2 changed files with 1 additions and 18 deletions

View File

@ -163,23 +163,6 @@ public class QuineMcCluskey {
return new QuineMcCluskey(variables, newRows, np);
}
QuineMcCluskey removeDuplicates() {
TableRows newRows = new TableRows();
for (TableRow r : rows) {
TableRow i = newRows.findRow(r);
if (i == null) {
newRows.add(r);
} else {
i.addSource(r.getSource());
}
}
rows.clear();
rows.addAll(newRows);
return this;
}
/**
* @return true id simplification is complete
*/

View File

@ -51,7 +51,7 @@ public class QuineMcCluskeyRegressionTest extends TestCase {
System.out.println("--");
while (!t.isFinished()) {
System.out.println(FormatToExpression.FORMATTER_JAVA.format(t.getExpression()));
t = t.simplifyStep().removeDuplicates();
t = t.simplifyStep();
}
t.simplifyPrimes(new PrimeSelectorDefault());
assertEquals("A || C", FormatToExpression.FORMATTER_JAVA.format(t.getExpression()));