y"> public List > GetParetoList (List > y)
{
DeleteDominated (y);
return y;
}
3.3 Лістинг програмного коду
public class Graph
{
public ZedGraphControl DisplayGrahpics (Panel panel, int [] x, int [] y, int [] pareto_x, int [] pareto_y)
{
var control = new ZedGraphControl ();
control.Width = panel.Width;
control.Height = panel.Height;
GraphPane myPane = control.GraphPane;
// Set the title and axis labels
myPane.Title.IsVisible = false;
// myPane.Title.Text = title;
myPane.XAxis.Title.IsVisible = false;
myPane.YAxis.Title.IsVisible = false;
myPane.YAxis.Scale.MaxAuto = true;
myPane.Legend.IsVisible = false;
PointPairList list1 = new PointPairList ();
for (int i = 0; i
list1.Add (x [i], y [i]);
LineItem curve1 = myPane.AddCurve ("label", list1, Color.Black, SymbolType.Circle);
curve1.Symbol.Fill = new Fill (Color.Black);
curve1.Symbol.Size = 7;
curve1.Line.IsVisible = false;
PointPairList list2 = new PointPairList ();
for (int i = 0; i
list2.Add (pareto_x [i], pareto_y [i]);
LineItem curve2 = myPane.AddCurve ("label", list2, Color.Red, SymbolType.Circle);
curve2.Symbol.Fill = new Fill (Color.Red);
curve2.Symbol.Size = 7;
curve2.Line.IsVisible = false;
// Fill the axis background with a color gradient
myPane.Chart.Fill = new Fill (Color.White, Color.FromArgb (255, 255, 166), 45.0F);
control.AxisChange ();
// expand the range of the Y axis slightly to accommodate the labels
myPane.YAxis.Scale.Max + = myPane.YAxis.Scale.MajorStep;
return control;
}
}
public class File
{
private StreamWriter writer;
private StreamReader reader;
public void WriteData (List > y, string fileName)
{
writer = new StreamWriter (new FileStream (fileNam...