public bool HasAllBoundary(Point p) { return(Boundary.Cast <bool>().Select((b, i) => new { IsSet = b, index = i }).Where(bf => bf.IsSet).All(bf => p.Boundary[bf.index])); }
public int[] HasNotBoundary(Point p) { var res = Boundary.Cast <bool>().Select((b, i) => new { IsSet = b, index = i }).Where(bf => bf.IsSet && !p.Boundary[bf.index]).Select(bf => bf.index).ToArray(); return(res); }