use of de.neemann.digital.analyse.quinemc.primeselector.PrimeSelector in project Digital by hneemann.
the class MinimizerQuineMcCluskey method minimize.
@Override
public void minimize(List<Variable> vars, BoolTable boolTable, String resultName, ExpressionListener listener) throws ExpressionException, FormatterException {
QuineMcCluskey qmc = createQuineMcCluskey(vars).fillTableWith(boolTable);
PrimeSelector ps = new PrimeSelectorDefault();
Expression e = qmc.simplify(ps).getExpression();
if (ps.getAllSolutions() != null) {
for (ArrayList<TableRow> i : ps.getAllSolutions()) {
listener.resultFound(resultName, QuineMcCluskey.addAnd(null, i, vars));
}
} else {
listener.resultFound(resultName, e);
}
}
Aggregations