Ejemplo n.º 1
0
        public static BitBunch And(BitBunch mbfir, BitBunch mbsec)
        {
            BitBunch tBitBunch = new BitBunch();

            for (int i = 0; i < mbfir.mCount; i++)
            {
                tBitBunch.AddBit(mbfir.GetBit(i) & mbsec.GetBit(i));
            }
            return(tBitBunch);
        }
Ejemplo n.º 2
0
        // Find the Entity having the key bitbunch
        List <UEntity> FindAllEntity(BitBunch mBitBunch)
        {
            List <UEntity> mList = new List <UEntity> ();

            for (int i = 0; i < mEntityCount; i++)
            {
                if (BitBunch.Equal(BitBunch.And(mBitBunch, mUEntity [i].mAllBitBunch), mBitBunch))
                {
                    mList.Add(mUEntity[i]);
                }
            }
            return(mList);
        }
Ejemplo n.º 3
0
 public static bool Equal(BitBunch mbfir, BitBunch mbsec)
 {
     if (mbfir.mCount != mbsec.mCount)
     {
         return(false);
     }
     for (int i = 0; i < mbfir.mCount; i++)
     {
         if (mbfir.GetBit(i) != mbsec.GetBit(i))
         {
             return(false);
         }
     }
     return(true);
 }