Beispiel #1
0
 public static void RunAndPrintTests(string binary, CheckConstants checks)
 {
     (bool testResult, double tValue) = SingleBitTest(binary, checks.Check1);
     Console.Write($"-Single Bit Test- \n Result: {testResult} \n Value: {tValue} \n");
     (testResult, tValue) = PairBitTest(binary, checks.Check2);
     Console.Write($"-Pair Bit Test- \n Result: {testResult} \n Value: {tValue} \n");
     (testResult, tValue) = BlockTest(binary, checks.Check4);
     Console.Write($"-Single Bit Test- \n Result: {testResult} \n Value: {tValue} \n");
     (testResult, tValue) = AutocorelationTest(binary, checks.Check5);
     Console.Write($"-Autocorelation Test- \n Result: {testResult} \n Value: {tValue} \n");
 }
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)}");
        }