public bool Evaluate(LongByte key)
        {
            int i = 0;

            foreach (int _ in LongByte.GetSetBits(key.Value & Key.Value, true))
            {
                if (++i == 2)
                {
                    return(false);
                }
            }

            return(true);
        }
Esempio n. 2
0
        public void SetKey(ColumnRegistration[] registrations)
        {
            if (registrations is null)
            {
                throw new ArgumentNullException(nameof(registrations));
            }

            LongByte lb = 0;

            for (int x = 0; x < registrations.Length; x++)
            {
                lb.SetBit(x, this.Headers.Contains(registrations[x].Header));
            }

            this.Key = lb;
        }
Esempio n. 3
0
        public bool Evaluate(LongByte key)
        {
            LongByte tlb = this.Key;

            return((tlb & key) == 0 || key.Count < 2 || (tlb.Count > 1 && tlb.Count < key.Count));
        }