Class: Lm::QuineMcCluskey
- Inherits:
-
Object
- Object
- Lm::QuineMcCluskey
- Defined in:
- lib/lm/quine_mc_cluskey.rb
Instance Method Summary collapse
-
#initialize(chart) ⇒ QuineMcCluskey
constructor
A new instance of QuineMcCluskey.
- #prime_implicants ⇒ Object
Constructor Details
#initialize(chart) ⇒ QuineMcCluskey
Returns a new instance of QuineMcCluskey.
5 6 7 |
# File 'lib/lm/quine_mc_cluskey.rb', line 5 def initialize(chart) @chart = chart end |
Instance Method Details
#prime_implicants ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/lm/quine_mc_cluskey.rb', line 9 def prime_implicants curchart = @chart loop do newchart = curchart.reduced break if newchart.keys == curchart.keys curchart = newchart end curchart end |