Пример #1
0
        public void Set(BIKey key, int bit)
        {
            EwahCompressedBitArray bitmap;
            EwahCompressedBitArray emptyBitmap;

            if (_bitmaps.ContainsKey(key))
            {
                bitmap = _bitmaps[key];
            }
            else
            {
                bitmap = new EwahCompressedBitArray();
                _bitmaps.Add(key, bitmap);
            }

            if (_emptyBitmaps.ContainsKey(key.Group))
            {
                emptyBitmap = _emptyBitmaps[key.Group];
            }
            else
            {
                emptyBitmap = new EwahCompressedBitArray();
                _emptyBitmaps.Add(key.Group, emptyBitmap);
            }

            bitmap.Set(bit);

            emptyBitmap.Not();
            emptyBitmap.Set(bit);
            emptyBitmap.Not();

            _maxBitSize = (_maxBitSize < (bit + 1) ? (bit + 1) : _maxBitSize);
        }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            BIKey compare = obj as BIKey;

            if (compare == null)
            {
                return(false);
            }

            return(compare._group.Equals(_group) && compare._key.Equals(_key));
        }
Пример #3
0
        private EwahCompressedBitArray getEmptyBitmap(BIKey key)
        {
            EwahCompressedBitArray bitmap;

            if (_emptyBitmaps.ContainsKey(key.Group))
            {
                bitmap = (EwahCompressedBitArray)_emptyBitmaps[key.Group].Clone();
                bitmap.SetSizeInBits(_maxBitSize, true);
            }
            else
            {
                bitmap = getFilledBitmap(true);
            }

            return(bitmap);
        }
Пример #4
0
 public static BICriteria equalsOrEmpty(BIKey key)
 {
     return(new BICriteria(key, Operator.EQUALS_OR_EMPTY));
 }
Пример #5
0
 public static BICriteria notEquals(BIKey key)
 {
     return(new BICriteria(key, Operator.NOT_EQUALS));
 }
Пример #6
0
 public static BICriteria equals(BIKey key)
 {
     return(new BICriteria(key, Operator.EQUALS));
 }
Пример #7
0
 public BICriteria orEqualsOrEmpty(BIKey key)
 {
     return(or(new BICriteria(key, Operator.EQUALS_OR_EMPTY)));
 }
Пример #8
0
 public BICriteria orEquals(BIKey key)
 {
     return(or(new BICriteria(key, Operator.EQUALS)));
 }
 public static BICriteria notEqualsOrEmpty(BIKey key)
 {
     return new BICriteria(key, Operator.NOT_EQUALS_OR_EMPTY);
 }
Пример #10
0
 public BICriteria andNotEqualsOrEmpty(BIKey key)
 {
     return(and(new BICriteria(key, Operator.NOT_EQUALS_OR_EMPTY)));
 }
 private BICriteria(BIKey key, Operator criteriaOperator)
 {
     _key = key;
     _criteriaOperator = criteriaOperator;
 }
 public BICriteria orNotEqualsOrEmpty(BIKey key)
 {
     return or(new BICriteria(key, Operator.NOT_EQUALS_OR_EMPTY));
 }
 public BICriteria orNotEquals(BIKey key)
 {
     return or(new BICriteria(key, Operator.NOT_EQUALS));
 }
 public BICriteria orEmptyOnly(BIKey.BIGroup group)
 {
     return or(new BICriteria(new BIKey(group, null), Operator.EMPTY_ONLY));
 }
 public BICriteria andEqualsOrEmpty(BIKey key)
 {
     return and(new BICriteria(key, Operator.EQUALS_OR_EMPTY));
 }
 public BICriteria andEquals(BIKey key)
 {
     return and(new BICriteria(key, Operator.EQUALS));
 }
Пример #17
0
 private BICriteria(BIKey key, Operator criteriaOperator)
 {
     _key = key;
     _criteriaOperator = criteriaOperator;
 }
Пример #18
0
 public BICriteria andNotEquals(BIKey key)
 {
     return(and(new BICriteria(key, Operator.NOT_EQUALS)));
 }
        private EwahCompressedBitArray getEmptyBitmap(BIKey key)
        {
            EwahCompressedBitArray bitmap;

            if (_emptyBitmaps.ContainsKey(key.Group))
            {
                bitmap = (EwahCompressedBitArray)_emptyBitmaps[key.Group].Clone();
                bitmap.SetSizeInBits(_maxBitSize, true);
            }
            else
                bitmap = getFilledBitmap(true);

            return bitmap;
        }
 public static BICriteria emptyOnly(BIKey.BIGroup group)
 {
     return new BICriteria(new BIKey(group, null), Operator.EMPTY_ONLY);
 }
 public static BICriteria notEquals(BIKey key)
 {
     return new BICriteria(key, Operator.NOT_EQUALS);
 }
 public static BICriteria equals(BIKey key)
 {
     return new BICriteria(key, Operator.EQUALS);
 }
        public void Set(BIKey key, int bit)
        {
            EwahCompressedBitArray bitmap;
            EwahCompressedBitArray emptyBitmap;

            if (_bitmaps.ContainsKey(key))
                bitmap = _bitmaps[key];
            else
            {
                bitmap = new EwahCompressedBitArray();
                _bitmaps.Add(key, bitmap);
            }

            if (_emptyBitmaps.ContainsKey(key.Group))
                emptyBitmap = _emptyBitmaps[key.Group];
            else
            {
                emptyBitmap = new EwahCompressedBitArray();
                _emptyBitmaps.Add(key.Group, emptyBitmap);
            }

            bitmap.Set(bit);

            emptyBitmap.Not();
            emptyBitmap.Set(bit);
            emptyBitmap.Not();

            _maxBitSize = (_maxBitSize < (bit + 1) ? (bit + 1) : _maxBitSize);
        }