Esempio n. 1
0
        public static void Test1()
        {
            Random    rnd = new Random();
            Histogram h   = new Histogram(10, 0, 1);

            for (int i = 0; i < 10000; i++)
            {
                h.add(rnd.NextDouble());
            }

            Console.WriteLine("Test 1\n");
            Console.WriteLine("Frequency Histogram\n");
            h.plotFrequency();
            Console.WriteLine("\nCumulative Frequency\n");
            h.plotCumulative();
        }
Esempio n. 2
0
        public static void Test1()
        {
            Random rnd = new Random();
            Histogram h = new Histogram(10, 0, 1);

            for (int i = 0; i < 10000; i++)
            {
                h.add(rnd.NextDouble());
            }

            Console.WriteLine("Test 1\n");
            Console.WriteLine("Frequency Histogram\n");
            h.plotFrequency();
            Console.WriteLine("\nCumulative Frequency\n");
            h.plotCumulative();
        }
Esempio n. 3
0
        public static void Test2()
        {
            Random    rnd = new Random();
            Histogram h   = new Histogram(10, 0, 10);

            for (int i = 0; i < 1000; i++)
            {
                double sum = 0;

                for (int j = 0; j < 10; j++)
                {
                    sum += rnd.NextDouble();
                }

                h.add(sum);
            }

            Console.WriteLine("Test 2\n");
            Console.WriteLine("Frequency Histogram\n");
            h.plotFrequency();
            Console.WriteLine("\nCumulative Frequency\n");
            h.plotCumulative();
        }
Esempio n. 4
0
        public static void Test2()
        {
            Random rnd = new Random();
            Histogram h = new Histogram(10, 0, 10);

            for (int i = 0; i < 1000; i++)
            {
                double sum = 0;

                for (int j = 0; j < 10; j++)
                {
                    sum += rnd.NextDouble();
                }

                h.add(sum);
            }

            Console.WriteLine("Test 2\n");
            Console.WriteLine("Frequency Histogram\n");
            h.plotFrequency();
            Console.WriteLine("\nCumulative Frequency\n");
            h.plotCumulative();
        }