mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 15:32:40 -04:00
removed some not needed code
This commit is contained in:
parent
6392e371b6
commit
390391c3a4
@ -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
|
||||
*/
|
||||
|
@ -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()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user