示例#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
文件: BICriteria.cs 项目: Lanayx/hlc2
 public static BICriteria equalsOrEmpty(BIKey key)
 {
     return(new BICriteria(key, Operator.EQUALS_OR_EMPTY));
 }
示例#5
0
文件: BICriteria.cs 项目: Lanayx/hlc2
 public static BICriteria notEquals(BIKey key)
 {
     return(new BICriteria(key, Operator.NOT_EQUALS));
 }
示例#6
0
文件: BICriteria.cs 项目: Lanayx/hlc2
 public static BICriteria equals(BIKey key)
 {
     return(new BICriteria(key, Operator.EQUALS));
 }
示例#7
0
文件: BICriteria.cs 项目: Lanayx/hlc2
 public BICriteria orEqualsOrEmpty(BIKey key)
 {
     return(or(new BICriteria(key, Operator.EQUALS_OR_EMPTY)));
 }
示例#8
0
文件: BICriteria.cs 项目: Lanayx/hlc2
 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
文件: BICriteria.cs 项目: Lanayx/hlc2
 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
文件: BICriteria.cs 项目: Lanayx/hlc2
 private BICriteria(BIKey key, Operator criteriaOperator)
 {
     _key = key;
     _criteriaOperator = criteriaOperator;
 }
示例#18
0
文件: BICriteria.cs 项目: Lanayx/hlc2
 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);
        }