//Constructor
 public Simplification(TruthTable truthTable)
 {
     _nonSimplifiedTruthTable     = truthTable.NormalRows;
     _groupedOnes                 = new List <List <Row> >();
     _groupedZeros                = new List <List <Row> >();
     _simplificationStepsForOnes  = new List <List <List <Row> > >();
     _simplificationStepsForZeros = new List <List <List <Row> > >();
     _numberOfVariables           = truthTable.NumberOfVariables;
 }
예제 #2
0
        public void ProcessDnf()
        {
            var variables = BinaryTree.PropositionalVariables.Get_Distinct_PropositionalVariables_Chars();

            DnfNormalComponents     = Dnf.ProcessDnf(NormalRows.ToList(), variables);
            DnfSimplifiedComponents = Dnf.ProcessDnf(SimplifiedRows, variables);
            if (DnfNormalComponents.Count != 0)
            {
                DnfNormalBinaryTree     = BinaryTree.DnfBinaryTree(DnfNormalComponents);
                DnfSimplifiedBinaryTree = BinaryTree.DnfBinaryTree(DnfSimplifiedComponents);
                DnfTruthTable           = new TruthTable(DnfNormalBinaryTree);
            }
        }