Algorithm-QuineMcCluskey
view release on metacpan or search on metacpan
- Do-while using is_LequivalentR() was supposed to be comparing
hash keys, but a 'keys' had been left off on one side.
Fixing that saves at least one loop.
- Avoid calling recurse_solve() if the reduced primes hash is
empty.
2015-1-6
- Added new object-creating methods dual() and complement().
- Added tests for the new methods.
2015-1-1
- No default parameters for find_essentials(). The primes
hash must be passed in, while the binary-formatted terms
are collectd from the object.
- Found spots in QM.pm and Util.pm where a "sum map {}"
construct can be replaced with "any {}", which has the
advantage of early break out of the loop on a match.
2014-12-3
- The weight count in find_primes() and the cost count in
recursive_solve() were using sum of a map block using
split. A match in list context is much simpler, changed
them to that (and put the function for it in Util.pm).
2014-11-27
- Add \Q and \E around don't-care character in maskmatcher()
substitution code in case someone chose a substitution
metacharacter as their don't-care character.
2014-11-26
- Was looping around remel() for each arrayref in the hash.
Now just pass the hash in directly (this necessitated
changing one of the outer loops in purge_essentials,
and remel() becomes remels()).
2014-11-13
- The test with don't-care terms randomly fails two thirds
of the time. Separate it into its own file, and add
debugging statements.
2014-11-4
- Extended the object test to consider minterms, maxterms,
and columnstrings methods of creation.
- deAlias considered finished and merged into the master
branch.
2014-10-31
- Added columnstring attribute, and wrote bitstring code
for setting and getting it.
- Changed minterms, maxterms, and dontcares back to
'rw', allowing the columnstring attribute to set them.
2014-10-28
- Changed to_boolean() to take an argument list instead of
automatically using the covers attribute internally. This
will allow the user (or the test files) to check terms before
or during minimization.
- Separated out the var-by-var code from to_boolean(). Now it
calls a new method to_boolean_term() for each individual term
in the covers (or other) list, for easier output manipulation.
2014-09-28
- The 'covers' attribute gets changed from ArrayRef[Int] to
ArrayRef[Str].
2014-09-21
- Added namespace::autoclean as recommended in the Moose Best
Practices manual.
- Changed the all the "terms" attributes to 'ro'.
2014-09-19
- For internal clarity, renamed allterms() to all_bit_terms(),
and minmax_terms() to minmax_bit_terms().
- Methods maskmatch() and maskmatches() now combined into a single
method (one called the other, but there was no reason for the
separate internal function, and it saved re-creating
utility variables over and over).
- Check if there's an overlap between the don't-care list and
the min or max term list, and call it an error if there is.
- Attributes actually check their type now (thanks Moose) so
the qw operators around the term lists are now removed in
the documentation and in the test files.
2014-08-20
- No more default arguments (in the form of $self->get_primes())
for row_dom(), col_dom(), and purge_essentials()). Always
pass in the argument -- it's less confusing that way.
- Trim Util.pm of tobits() -- it's embedded in BUILD now.
2014-08-19
- More work in find_primes(). An array slice in a hash isn't
working as originally coded (I seem to recall the rules
changing some time ago). Changed it to two statements for
now.
2014-07-07
- After looking over the labeling in the run.t file, added
a new attribute, "title". We can now say what the A::QMcC
object actually represents.
- Broke up run.t into separate test files. The original
file was compact and in theory easy to add to, but I was
having trouble figuring out what was causing my Moose
errors. Plus, there were too many eval calls in the code.
- The original code changed the minterms, maxterms, and
dontcares attributes from the passed-in list of decimal
into bitstrings, and saved them back in the attributes.
We can't do that now, because Moose has set those fields
typed as 'ArrarRef[Int]'.
So, set up three new fields that represent the three fields
in their bitstring form: min_bits, max_bits, and dc_bits.
2014-04-30
- Moosified ("has" declarations) the attributes.
- Achieved a compile-error-free version using Moose instead
of Alias. Now to make it runtime-error-free.
- As part of the compilation process, moved from a Makefile.PL
base (which was creating errors of its own) to Build.PL,
which Just Works.
- Turned attributes boolean, imp, and bits into a local
variables as they were only used in single functions.
- Defined and made use of predicate functions for attributes
minterms, maxterms, and dontcares. Simplifies some sanity
checks.
- Added methods allterms() and minmax_terms() to simplify
coding.
- List::MoreUtils isn't actually being used in A::QMcC (it is
used in A::QMcC::Util though).
0.01 2006-06-24T21:32-0500
First version, released on an unsuspecting world. Supports
single-output problems only.
( run in 1.640 second using v1.01-cache-2.11-cpan-39bf76dae61 )