void feedInitialData(string setE, IIteratorInstance <IPathInfo> initial_data_instance) { string[] lines = setE.Split(new char[] { System.Environment.NewLine[0] }); foreach (string line in lines) { if (!line.Trim().Equals("")) { Trace.WriteLine(Rank + ": LINE = " + line); string[] edge_info_items = line.Split(' '); IPathInfoInstance edge = (IPathInfoInstance)Initial_data.createItem(); char item_type = edge_info_items [1] [0]; switch (item_type) { case 'c': DistanceInfo dist_instance_c = new DistanceInfo(); dist_instance_c.info_type = Info.PATH_INFO_TYPE_DISTANCE_TRIAL; dist_instance_c.vertex = int.Parse(edge_info_items [0]); dist_instance_c.distance = int.Parse(edge_info_items [2]); edge.Value = dist_instance_c; Trace.WriteLine(Rank + ": c " + dist_instance_c.info_type + " " + dist_instance_c.vertex + " " + dist_instance_c.distance); break; case 'd': DistanceInfo dist_instance_d = new DistanceInfo(); dist_instance_d.info_type = Info.PATH_INFO_TYPE_DISTANCE_TRIAL; dist_instance_d.vertex = int.Parse(edge_info_items [0]); dist_instance_d.distance = int.Parse(edge_info_items [2]); edge.Value = dist_instance_d; Trace.WriteLine(Rank + ": d " + dist_instance_d.info_type + " " + dist_instance_d.vertex + " " + dist_instance_d.distance); break; default: EdgeInfo edge_info = new EdgeInfo(); edge_info.info_type = Info.PATH_INFO_TYPE_EDGE; edge_info.vertex = int.Parse(edge_info_items[0]); edge_info.vertex_other = int.Parse(edge_info_items[1]); edge_info.weight = int.Parse(edge_info_items[2]); edge.Value = edge_info; Trace.WriteLine(Rank + ": edge " + edge_info.info_type + " " + edge_info.vertex + " " + edge_info.vertex_other + " " + edge_info.weight); break; } initial_data_instance.put(edge); } } initial_data_instance.finish(); }
public Divided_by_periods_data_spiro(Initial_data init_data2, string text) : base(init_data2, text) { }
public Spirogramm_Special_point(Divided_by_periods_data_spiro per, Initial_data init) { this.Period_job = per; this.initial_data = init; }
public Divided_by_periods_data(Initial_data init_data2, String text) { this.init_data = init_data2; this.combobox_3 = text; }