Example #1
0
        public static bool DotIsNuclear(Dot[,] dots, Dot dot)
        {
            if (!dot.Value)
            {
                Console.WriteLine("Вы реально балбес-_-");
                return(false);
            }
            List <Edge> edges = Sheaf.GetSheaf(dots, dot);

            return(edges.Count == 1);
        }
Example #2
0
        public string GetNukeConsoleOutputString()
        {
            StringBuilder str = new StringBuilder();

            str.Append(string.Format("Ядро функции {0}:\n", ToString()));
            foreach (Dot dot in NuclearDotsList)
            {
                str.Append(string.Format("\tГрань {0}, ядровая точка - {1}\n", Sheaf.GetSheaf(Values, dot)[0].GetCommonDotsString(), dot));
            }
            return(str.ToString());
        }
Example #3
0
        public List <Edge> GetNuke()
        {
            List <Edge> result = new List <Edge>();

            foreach (Dot dot in NuclearDotsList)
            {
                if (!ExtraData.ListContainsEdge(Sheaf.GetSheaf(Values, dot)[0], result))
                {
                    result.Add(Sheaf.GetSheaf(Values, dot)[0]);
                }
            }
            return(result);
        }
Example #4
0
        public static List <Edge> GetMaxEdges(Dot[,] functionValues)
        {
            List <Edge> result = new List <Edge>();

            foreach (Dot dot in functionValues)
            {
                if (dot.Value)
                {
                    AddEdges(Sheaf.GetSheaf(functionValues, dot), result);
                }
            }
            return(result);
        }