private static void Generate(int i) { var Graph = new MyGrapg(P, LinkLimit, Total, Min + i * Step); Graph.FastGenerateV2(); Graph.Save(AppDomain.CurrentDomain.BaseDirectory + $@"\{Path}\{LinkLimit}-{Min+i * Step}.json"); }
private static void GraphInfo(int kof) { var graphInfo = new GraphInfo(); graphInfo.AlwaysAvalible = kof * 1000; for (int i = 0; i < Iteration; i++) { var graph = new MyGrapg(1, 5, Total, Total / 10); graph.Load(AppDomain.CurrentDomain.BaseDirectory + $@"\100k-5\{LinkLimit}-{kof * 1000}.json"); var init = new Random().Next(graph.CompleteNodes.Count); graph.Run(graph.CompleteNodes.ElementAt(init)); graphInfo.All.Add(graph.NeedDays); } graphInfo.MaxDistance = graphInfo.All.Max(); graphInfo.MinDistance = graphInfo.All.Min(); graphInfo.MedianDistance = graphInfo.All[graphInfo.All.Count / 2]; GraphInfos.Add(graphInfo); Console.WriteLine($"[{kof * 1000}] Complete!"); }