Beispiel #1
0
 /**
  * Simplifies the function first by finding the prime minterms and them the essential prime imlicants
  */
 public List <Implicant> simplify()
 {
     this.findPrimeImplicants();
     //System.Console.WriteLine(this.primeImplicantString());
     //this.getImplicantChartString();
     this.primeImplicantMapping = new ImplicantChart(this.primeImplicants);
     this.essentialImplicants.AddRange(this.primeImplicantMapping.findEssential());
     this.fullySimplified     = true;
     this.essentialImplicants = Implicant.RemoveDuplicatesInList(this.essentialImplicants);
     return(this.essentialImplicants);
 }
Beispiel #2
0
        /**
         * Prints the chart for the prime minterms, and runs the find primes function if necessary
         */
        public String getImplicantChartString()
        {
            if (!this.foundPrimes)
            {
                this.findPrimeImplicants();
            }

            if (this.primeImplicantMapping == null)
            {
                this.primeImplicantMapping = new ImplicantChart(this.primeImplicants);
                this.primeImplicantMapping.findEssential();
            }

            return(this.primeImplicantMapping.ToString());
        }