public static bool DotIsRegular(Dot dot, Edge edge, Function function) { Sheaf sheaf = new Sheaf(dot, function); List <Dot> coveredBySheafDots = new List <Dot>(); foreach (Edge currentEdge in sheaf.Edges) { if (!ExtraData.EdgesAreEqual(edge, currentEdge)) { foreach (Dot currentDot in currentEdge.DotList) { if (!ExtraData.ListContainsDot(currentDot, edge.DotList)) { coveredBySheafDots.Add(currentDot); } } } } foreach (Dot currentDot in coveredBySheafDots) { Sheaf currentSheaf = new Sheaf(currentDot, function); if (ExtraData.SheafIsSubsheaf(sheaf, currentSheaf)) { return(true); } } return(false); }
public static bool EdgeIsCoveredByNuke(List <Dot> coveredDots, Edge edge) { foreach (Dot dot in edge.DotList) { if (!ExtraData.ListContainsDot(dot, coveredDots)) { return(false); } } return(true); }
public List <Dot> GetCoveredDots() { List <Dot> result = new List <Dot>(); foreach (Edge edge in Edges) { foreach (Dot dot in edge.DotList) { if (!ExtraData.ListContainsDot(dot, result)) { result.Add(dot); } } } return(result); }
public static List <Dot> GetCoveredByNukeDots(Function function) { List <Dot> result = new List <Dot>(); List <Dot> nuclearDots = function.NuclearDotsList; List <Edge> nuke = function.Nuke; foreach (Edge edge in nuke) { foreach (Dot dot in edge.DotList) { if (!ExtraData.ListContainsDot(dot, nuclearDots) && !ExtraData.ListContainsDot(dot, result)) { result.Add(dot); } } } return(result); }
public bool ContainsDot(Dot dot) { return(ExtraData.ListContainsDot(dot, DotList)); }