Example #1
0
        public void WrongAlgorithmParameter()
        {
            IPointGenerator xsquared  = new XSquaredPointListGenerator(10);
            Benchmark       benchmark = new Benchmark("WrongParameter", xsquared);

            benchmark.Execute(3, 100, 1);
        }
Example #2
0
        public void ExecuteBenchmarkOnePoints()
        {
            IPointGenerator xsquared  = new XSquaredPointListGenerator(10);
            Benchmark       benchmark = new Benchmark("grid", xsquared);

            benchmark.Execute(1, 10001, 1000);
        }
        public void DistrubutionIsNotEqual()
        {
            IPointGenerator pointGenerator = new XSquaredPointListGenerator(10);
            int             count          = 10000;
            int             width          = 200;
            int             height         = 200;

            pointGenerator.CreateList(width, height, count);
            List <Point> output = pointGenerator.GetList();
            double       countXLargerThanHundred   = output.Count(c => c.X > 100);
            double       countYLargerThanHundred   = output.Count(c => c.Y > 100);
            double       percentXLargerThanHundret = countXLargerThanHundred / count;
            double       percentYLargerThanHundret = countYLargerThanHundred / count;

            Assert.AreEqual(0.75, percentXLargerThanHundret, 0.01);
            Assert.AreEqual(0.75, percentYLargerThanHundret, 0.01);
        }
 public void CreateInterfaceDerivative()
 {
     IPointGenerator randomgenerator   = new RandomPointListGenerator(10);
     IPointGenerator functiongenerator = new XSquaredPointListGenerator(10);
 }
Example #5
0
 private void Benchmark()
 {
     IPointGenerator xsquared = new XSquaredPointListGenerator();
     Benchmark benchmark = new Benchmark("grid", xsquared);
     benchmark.Execute(100, 1000, 1000);
 }
Example #6
0
 private void GenerateSquaredPoints()
 {
     IPointGenerator pointGenerator = new XSquaredPointListGenerator(10);
     pointGenerator.CreateList(width, height, count);
     points = pointGenerator.GetList();
 }