public static void TestHarness_ComparisonWithDrezner() { GenericChartForm charts = new GenericChartForm(); charts.BackColor = Color.White; charts.Text = "Plots of Genz vs. Drezner"; charts.setChartCounts(5, 3); for (int i = 0; i < 15; ++i) { charts[i].axis_height = 20; charts[i].legend_height = 30; } TestHarness_ComparisonWithDrezner_Subtest(-2, 0, charts[0, 0]); TestHarness_ComparisonWithDrezner_Subtest(-1, 0, charts[1, 0]); TestHarness_ComparisonWithDrezner_Subtest(0, 0, charts[2, 0]); TestHarness_ComparisonWithDrezner_Subtest(+1, 0, charts[3, 0]); TestHarness_ComparisonWithDrezner_Subtest(+2, 0, charts[4, 0]); TestHarness_ComparisonWithDrezner_Subtest(-2, +0.5, charts[0, 1]); TestHarness_ComparisonWithDrezner_Subtest(-1, +0.5, charts[1, 1]); TestHarness_ComparisonWithDrezner_Subtest(0, +0.5, charts[2, 1]); TestHarness_ComparisonWithDrezner_Subtest(+1, +0.5, charts[3, 1]); TestHarness_ComparisonWithDrezner_Subtest(+2, +0.5, charts[4, 1]); TestHarness_ComparisonWithDrezner_Subtest(-2, -0.5, charts[0, 2]); TestHarness_ComparisonWithDrezner_Subtest(-1, -0.5, charts[1, 2]); TestHarness_ComparisonWithDrezner_Subtest(0, -0.5, charts[2, 2]); TestHarness_ComparisonWithDrezner_Subtest(+1, -0.5, charts[3, 2]); TestHarness_ComparisonWithDrezner_Subtest(+2, -0.5, charts[4, 2]); charts.ShowDialog(); }
public static void TestHarness_LOOP() { RandomAugmented random = RandomAugmented.getSeededRandomAugmented(); ArrayList pool1 = new ArrayList(); ArrayList pool2 = new ArrayList(); for (int i = 0; i < 10; ++i) { pool1.Add(new Point2D(random.NextDouble(), random.NextDouble())); pool2.Add(new Point2D(random.NextDouble(), random.NextDouble())); } double m, c; findHull(pool1, pool2, out m, out c); ArrayList hull = new ArrayList(); hull.Add(new Point2D(0, c)); hull.Add(new Point2D(1, m + c)); GenericChartForm charts = new GenericChartForm(); charts.setChartCounts(1, 1); charts[0].addSeries(new Series("Pool1", ChartType.Point, pool1)); charts[0].addSeries(new Series("Pool2", ChartType.Point, pool2)); charts[0].addSeries(new Series("Hull", ChartType.Line, hull)); charts[0].Refresh(); charts.ShowDialog(); }
public static void TestHarness_Irregularity() { Series series1 = new Series("Genz", ChartType.Line); Series series2 = new Series("Genz", ChartType.Line); Series series3 = new Series("Genz", ChartType.Line); Series series4 = new Series("Genz", ChartType.Line); for (int i = 0; i <= 300; ++i) { series1.addPoint(i, CNorm_2D(0, 0, 0.0)); series2.addPoint(i, CNorm_2D(0, 0, 0.5)); series3.addPoint(i, CNorm_2D(2, 1, 0.2)); series4.addPoint(i, CNorm_2D(-2, 0, -0.7)); } GenericChartForm charts = new GenericChartForm(); charts.BackColor = Color.White; charts.Text = "Plots of Genz instabilities"; charts.setChartCounts(2, 2); charts[0, 0].legend_height = 0; charts[0, 0].title = "x=0, y=0, rho=0"; charts[0, 0].addSeries(series1); charts[1, 0].legend_height = 0; charts[1, 0].title = "x=0, y=0, rho=0.5"; charts[1, 0].addSeries(series2); charts[0, 1].legend_height = 0; charts[0, 1].title = "x=2, y=1, rho=0.2"; charts[0, 1].addSeries(series3); charts[1, 1].legend_height = 0; charts[1, 1].title = "x=-2, y=0, rho=-0.7"; charts[1, 1].addSeries(series4); charts.ShowDialog(); }