This commit is contained in:
Eric Mertens 2022-11-16 21:23:40 -08:00
parent 1351653c8e
commit a928216332

View File

@ -63,7 +63,7 @@ auto QuineMcCluskey(
std::vector<std::set<std::string>> nextbatch;
nextbatch.resize(current.size()-1);
for (std::size_t ones = 0; ones+1 < nextbatch.size(); ones++) {
for (std::size_t ones = 0; ones+1 < current.size(); ones++) {
if (!current[ones+1].empty()) {
for (auto const& t1 : current[ones]) {
for (auto const& t2 : current[ones+1]) {
@ -245,7 +245,7 @@ auto Compute(
auto const terms = QuineMcCluskey(p, sensor.size(), cases);
std::cout << (p ? "\nTRUE\n" : "\nFALSE\n");
for (auto const s : sensor) {
std::cout << char('A'+s);
std::cout << char('A'+s-1);
}
std::cout << std::endl;
for (auto const& term : terms) {