public static IEnumerable<Hypothesis> SmallestGeneralizers(IEnumerable<Hypothesis> generalBorder,
                                                            Example example,
                                                            Hypothesis h)
 {
     var generalized = h + example;
     yield return generalized;
 }
 public static IEnumerable<Hypothesis> SmallestSpecifiers(IEnumerable<Hypothesis> specificBorder,
                                                          Example example,
                                                          Hypothesis h)
 {
     if (h.Left <= example.X - 1) yield return new Hypothesis(h.Left, example.X - 1, h.Bottom, h.Top);
     if (example.X + 1 <= h.Right) yield return new Hypothesis(example.X + 1, h.Right, h.Bottom, h.Top);
     if (example.Y + 1 <= h.Top) yield return new Hypothesis(h.Left, h.Right, example.Y + 1, h.Top);
     if (h.Bottom <= example.Y - 1) yield return new Hypothesis(h.Left, h.Right, h.Bottom, example.Y - 1);
 }
 public bool IsConsistent(Example example)
 {
     bool inArea = Left <= example.X && example.X <= Right &&
                   Bottom <= example.X && example.Y <= Top;
     //inArea = !IsEmpty();
     return example.Goal ? inArea : !inArea;
 }