예제 #1
0
 public virtual void Intersection(FastFixedSetFactory <E> .FastFixedSet <E> set)
 {
     int[] extdata = set.GetData();
     int[] intdata = data;
     for (int i = intdata.Length - 1; i >= 0; i--)
     {
         intdata[i] &= extdata[i];
     }
 }
예제 #2
0
 public virtual void Complement(FastFixedSetFactory <E> .FastFixedSet <E> set)
 {
     int[] extdata = set.GetData();
     int[] intdata = data;
     for (int i = intdata.Length - 1; i >= 0; i--)
     {
         intdata[i] &= ~extdata[i];
     }
 }
예제 #3
0
            public virtual FastFixedSetFactory <E> .FastFixedSet <E> GetCopy()
            {
                FastFixedSetFactory <E> .FastFixedSet <E> copy = new FastFixedSetFactory <E> .FastFixedSet <E
                                                                                                            >(factory);

                int arrlength = data.Length;

                int[] cpdata = new int[arrlength];
                System.Array.Copy(data, 0, cpdata, 0, arrlength);
                copy.SetData(cpdata);
                return(copy);
            }
예제 #4
0
 public virtual bool Contains(FastFixedSetFactory <E> .FastFixedSet <E> set)
 {
     int[] extdata = set.GetData();
     int[] intdata = data;
     for (int i = intdata.Length - 1; i >= 0; i--)
     {
         if ((extdata[i] & ~intdata[i]) != 0)
         {
             return(false);
         }
     }
     return(true);
 }
예제 #5
0
 internal FastFixedSet(FastFixedSetFactory <E> factory)
 {
     this.factory           = factory;
     this.colValuesInternal = factory.GetInternalValuesCollection();
     this.data = new int[factory.GetDataLength()];
 }