Beispiel #1
0
        public void AutocorelationTest(bool expectedTestResult, double expectedTValue, double check, string binaryText)
        {
            (bool testResult, double tValue) = GolombTests.AutocorelationTest(binaryText, check);
            tValue = Math.Round(tValue, 3);

            Assert.Equal(expectedTValue, tValue);
            Assert.Equal(expectedTestResult, testResult);
        }
Beispiel #2
0
        private static void Linear()
        {
            CheckConstants checks = new CheckConstants()
            {
                Check1 = 3.841458820694124,
                Check2 = 5.991464547107979,
                Check4 = 9.487729036781154,
                Check5 = 1.959963984540054
            };
            string str = LinearFeedback.LinearRegresion("1000001");

            Console.WriteLine(str);
            GolombTests.RunAndPrintTests(str, checks);
        }
Beispiel #3
0
        private static void TestGolomb()
        {
            CheckConstants checks = new CheckConstants()
            {
                Check1 = 3.841458820694124,
                Check2 = 5.991464547107979,
                Check4 = 9.487729036781154,
                Check5 = 1.959963984540054
            };
            string text = "01001001011001110110111101110010011010010111001101100010011001010110110001101111011101100110000101110011";

            Console.WriteLine($"T1: {GolombTests.SingleBitTest(text, checks.Check1)}");
            Console.WriteLine($"T2: {GolombTests.PairBitTest(text, checks.Check2)}");
            Console.WriteLine($"T4: {GolombTests.BlockTest(text, checks.Check4)}");
        }