예제 #1
0
        public TwoThreeTree <T> SymmetricDifference(TwoThreeTree <T> B)
        {
            TwoThreeTree <T> ANB = Difference(B);      //A\B
            TwoThreeTree <T> BNA = B.Difference(this); //B\A

            return(ANB.Union(BNA));
        }
예제 #2
0
        public bool IsSupersetOf(IEnumerable <T> other)
        {
            if (other.Count() == 0)
            {
                return(true);
            }
            TwoThreeTree <T> B = new TwoThreeTree <T>(_comp);

            B.AddRange(other);
            TwoThreeTree <T> C = B.Difference(this);//B\A.
            Int32            c = C._count;

            if (c == 0)
            {
                return(true);
            }
            return(false);
        }