Example #1
0
        public static void RingSolvingStatistic(int[] facesSizes, int limit, TextWriter writer)
        {
            var facesToString = FacesToString(facesSizes);

            for (int i = 3; i < 30; i++)
            {
                for (int j = 3; j < 30; j++)
                {
                    if (i == j && i + j < 32)
                    {
                        var solving = new RingSolving(i, j, facesSizes, limit);
                        if (solving.ring != null)
                        {
                            writer.WriteLine("(" + i + "," + j + ") with facesSizes " + facesToString + "exists");
                            Console.WriteLine("Exists");
                        }
                        else
                        {
                            writer.WriteLine("(" + i + "," + j + ") with facesSizes " + facesToString + "doesn't exist");
                            Console.WriteLine("Doesn't exist");
                        }
                        writer.Flush();
                    }
                }
            }
            writer.Flush();
            writer.Close();
        }
Example #2
0
        public static bool DoesBiarcExist(int x, int y, List <int> facesSizes, int limit)
        {
            var solving  = new RingSolving(x, y, facesSizes.ToArray(), limit);
            var solution = solving.ring;
            var graph    = new ArcGraph(RingSolving.CreateOuterBoundaryOfBiarc(x, y), "Birac" + x + "," + y, facesSizes);

            if (solution != null)
            {
                var reconstruction = new TriarcReconstruction(graph, solution);
                reconstruction.ReconstructTriarc();
                return(true);
            }
            return(false);
        }