Skip to content

Commit

Permalink
Do not try and combine an implicant with itself
Browse files Browse the repository at this point in the history
  • Loading branch information
j- committed Feb 20, 2017
1 parent d25be93 commit 9ac943e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const getPrimeImplicants = (minterms: Minterm[], dontcares: Minterm[]): I
// For all implicants in this list
for (let i = 0; i < implicants.length; i++) {
// For all implicants below this one
for (let j = i; j < implicants.length; j++) {
for (let j = i + 1; j < implicants.length; j++) {
const left = implicants[i];
const right = implicants[j];
if (!Implicant.canCombine(left, right)) {
Expand Down

0 comments on commit 9ac943e

Please sign in to comment.