public void VariousProbabilitiesCheck()
        {
            //1 No corrextion
            double expected = 0.015;
            int    digitsInput = 2, digitsOutput = 2;

            double[] distortionto1Probability       = { 0.1, 0.0 };
            double[] distortionto0Probability       = { 0.3, 0.1 };
            double[] distortiontoInverseProbability = { 0.3, 0.5 };
            int      linesInTruthTable              = 4;

            int[] truthTable = { 0, 1, 2, 3 };
            ProbabilitiesCalcWithCorrection prCalc = new ProbabilitiesCalcWithCorrection(distortionto0Probability,
                                                                                         distortionto1Probability, distortiontoInverseProbability, digitsInput, digitsOutput,
                                                                                         truthTable, linesInTruthTable);
            double actual = prCalc.GetCorrectResultProbability();
            //Assert.AreEqual(expected, actual, 0.00001, "Fail in class logic");
        }
        public void ManyOperandsSingleResultDigitCheck()
        {
            //1 No corrextion
            double expected = 0.5;
            int    digitsInput = 3, digitsOutput = 1;

            double[] distortionto1Probability       = { 0.0, 0.0, 0.0 };
            double[] distortionto0Probability       = { 0.0, 0.0, 0.0 };
            double[] distortiontoInverseProbability = { 0.5, 0.5, 0.5 };
            int      linesInTruthTable              = 8;

            int[] truthTable = { 0, 1, 0, 1, 0, 1, 0, 1 };
            ProbabilitiesCalcWithCorrection prCalc = new ProbabilitiesCalcWithCorrection(distortionto0Probability,
                                                                                         distortionto1Probability, distortiontoInverseProbability, digitsInput, digitsOutput,
                                                                                         truthTable, linesInTruthTable);
            double actual = prCalc.GetCorrectResultProbability();

            Assert.AreEqual(expected, actual, 0.00001, "Fail for many operands");
        }
        public void ElementaryTest()
        {
            //1 No corrextion
            double expected = 0.5;
            int    digitsInput = 1, digitsOutput = 1;

            double[] distortionto1Probability       = { 0.0 };
            double[] distortionto0Probability       = { 0.0 };
            double[] distortiontoInverseProbability = { 0.5 };
            int      linesInTruthTable              = 2;

            int[] truthTable = { 0, 1 };
            ProbabilitiesCalcWithCorrection prCalc = new ProbabilitiesCalcWithCorrection(distortionto0Probability,
                                                                                         distortionto1Probability, distortiontoInverseProbability, digitsInput, digitsOutput,
                                                                                         truthTable, linesInTruthTable);
            double actual = prCalc.GetCorrectResultProbability();

            Assert.AreEqual(expected, actual, 0.00001, "Elementary test Fail");
        }