public static void ToWebPage(this IEnumerable <Choosability.Graph> graphs, string relativePath, bool directed = true, bool fivePlus = true, bool useLaplacian = true, bool compressName = true, bool lowPlus = false) { var maker = new GraphPictureMaker(graphs); maker.CompressName = compressName; var path = Path.Combine(@"C:\Users\landon\Dropbox\Public\Web\GraphData", relativePath); MakePictures.MakeWebpage(maker, path, directed: directed, showFactors: false, lowPlus: lowPlus, fivePlus: fivePlus, useLaplacian: useLaplacian); Path.Combine(GraphDataWebRoot, relativePath, "index.html").ToBrowser(); }
public static void Go() { using (var graphEnumerator = new GraphEnumerator(WinnersFile, 2, MaxVertices)) { if (TreesOnly) { graphEnumerator.FileRoot = @"C:\Users\landon\Google Drive\research\Graph6\trees\trees"; } else if (TreesOrTreesPlusEdgeOnly) { graphEnumerator.FileRoot = @"C:\Users\landon\Google Drive\research\Graph6\degree5treesplusedge\geng"; } else if (Planar) { graphEnumerator.FileRoot = @"C:\Users\landon\Google Drive\research\Graph6\planar\planar_conn."; } else { graphEnumerator.FileRoot = @"C:\Users\landon\Google Drive\research\Graph6\graph"; } foreach (var g in graphEnumerator.EnumerateGraph6File(Filter, EnumerateWeightings)) { System.Console.Write("checking " + g.ToGraph6() + " with degrees [" + string.Join(",", g.VertexWeight) + "] ..."); var mind = new Choosability.FixerBreaker.KnowledgeEngine.Slim.Super.SuperSlimMind(g, false, SwapMode); mind.MaxPot = Delta; mind.OnlyConsiderNearlyColorableBoards = NearColorings; var template = new Template(g.VertexWeight.Select((ambientDegree, v) => Delta - (ambientDegree - g.Degree(v))).ToList()); var win = mind.Analyze(template, null); if (win) { System.Console.ForegroundColor = ConsoleColor.Blue; System.Console.WriteLine(" fixer wins"); System.Console.ForegroundColor = ConsoleColor.White; graphEnumerator.AddWinner(g); _wonWeightings.Add(g.VertexWeight); if (MakeWebPage) { MakePictures.MakeWebpage(WinnersFile, Path.Combine(WebpageRoot, Path.GetFileNameWithoutExtension(WinnersFile))); } } else { System.Console.ForegroundColor = ConsoleColor.Red; System.Console.WriteLine(" breaker wins"); System.Console.ForegroundColor = ConsoleColor.White; } } } }
public static void ToWebPageSimple(this IEnumerable <Choosability.Graph> graphs, string relativePath, int K = 0) { var maker = new GraphPictureMaker(graphs); maker.NameGraph6 = true; maker.K = K; var path = Path.Combine(@"C:\Users\landon\Dropbox\Public\Web\GraphData", relativePath); MakePictures.MakeWebpage(maker, path, directed: false, showFactors: false, lowPlus: false, fivePlus: false, useLaplacian: false); Path.Combine(GraphDataWebRoot, relativePath, "index.html").ToBrowser(); }