Algorithm-QuineMcCluskey
view release on metacpan or search on metacpan
Revision history for Algorithm-QuineMcCluskey
1.01
2019-12-03
- Debug changes only, does not affect the operation of the
non-debug code:
Smart comments had some obsolete variables that are now
changed. The chart() function, used by Smart comments, made
use of firstidx(), which was provided by a module that is no
longer included. Changed the code in chart() to use the any()
function from List::Util instead.
- Minor correction to README.md.
1.00
2019-02-10
- Moved the formatting functions to_boolean() and
to_boolean_term() over to Logic::Minimizer. Tie::Cycle is no
longer used, and gets removed from the build requirement in
Build.PL.
- README is now README.md.
- With Logic::Minimizer finally released yesterday, it's time to
send this off to CPAN.
2018-10-06
- Removed the terms parameter from find_essentials(),
covered_least(), and row_dominance(), which we already
had in other structures. This shortened the loops and reduced
the number of loop structures needed. Another speed-up.
2018-09-29
- Replace columns(), a function that rotated the primes
hash using grep and any(), with new function transpose(),
which does the same thing using hash keys, and which NYTProf
says is faster.
2018-08-30
- Examining remels() more closely, it became obvious that
it was using maskedmatch() as an block argument to indexes()
for every single term against every single element three
loops deep. Since maskedmatch() has a set-up cost, this
seems wasteful. Created a new function maskedmatchindexes(),
which sets up the masks before going through the list once.
- Which means we no longer are using the indexes() function
from List::MoreUtils, which is now removed.
2018-08-29
- We now use Logic::Minimizer as a base class.
- Consequently, removed attributes and methods that are
now in Logic::Minimizer, and are provided automatically.
- Use L::M's catch_errors() for attribute validation.
- Update Build.PL with Logic::Minimizer requirement.
- And updated the version number everywhere.
0.19
2019-07-31
- There was more processing than needed in least_covered() to do
what was basically a find-the-minimum loop, plus it was
throwing away information that had to be re-created by the
next line of code.
Consolidated all of that, resulting in fewer hash-of-array
manipulations, and changed the return value from the single
term to the term plus its covers.
This won't result in a significant speed increase, as most
terms are already eliminated by the time we reach this code,
but it does simplify it and make it more readable.
- A side-effect of the above is that countels() is no longer
needed, and was removed.
- Also, while I was doing A-B comparisons, the new version of the
function was named covered_least(), and it stayed that way.
- Streamlined remels() some more, and changed it from a function
that got called multiple times for each item in a list, to a
function that is called once with a list.
- Moved the next-level-implicant check of version 0.18 outward
two loops (some duplicates still popped up as two different
terms could bit flip to the same implicant). Moved the push
operation of those implicants outward too, using the keys
of the hash used in checking for them.
- Created width=>6 tests in new files 28-solve.t and 29-solve.t.
0.18
2018-07-10
- Check for existence of next-level implicant before pushing it
on the list. Which means the next loop runs shorter, saving time.
- Since we only consider Hamming distances of 1 when comparing
covers, it doesn't make sense to have a separate Hamming
distance function to find the sole difference position. Merged
the code of hdist() and diffpos() into new function hammingd1pos(),
which lets us skip the list-checking functions. Since this function
is embedded four loops deep, this also saves time.
- Function remels() was checking item by item even in cases where
the list items to remove were the entire list. Streamlined that.
- The Hamming distance change above meant pairwise() isn't needed
now, which was the cause of the version requirement change of
List::MoreUtils. Put the older version number back in the
requirement.
0.17
2018-06-21
- Require latest version (0.428) of List::MoreUtils, as there seems
to be a crash-worthy side-effect happening with its earlier version
and Perl 5.26, as reported by Slaven Rezic.
- Upped the version req's of Tie::Cycle, namespace::autoclean, and
Module::Build while I was at it.
0.16
2017-02-27
- The test in 24-solve.t, "A problem with sixteen possible covers",
had typos in four of its covers, all involving the term that
should have been BC'D' (the D variable was missing its complement
symbol).
0.15
2017-01-31
- Stupidly didn't upgrade the version number in QuineMcCluskey.pm.
- Fix tests in 24-solve.t and 27-solve.t that had a typo in their
solution sets.
0.14
2017-01-19
- Had set the weed-out-expensive-solutions cost at the start of
the loop at 2**width, wrongly thinking that that would be the
maximum cost. Found a couple cases where that's not true,
( run in 0.893 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )