public ISimpleSet <T> Union(ISimpleSet <T> other)
        {
            var set = new SimpleHashSet <T>();

            foreach (var item in this.Concat(other))
            {
                set.Add(item);
            }
            return(set);
        }
        public ISimpleSet <T> Diff(ISimpleSet <T> other)
        {
            var set = new SimpleHashSet <T>();

            foreach (var item in this)
            {
                if (!other.Contains(item))
                {
                    set.Add(item);
                }
            }
            return(set);
        }
Example #3
0
 public DuplicateFinder(ISimpleSet <int> hashSet)
 {
     HashSet = hashSet;
 }